// Back

Bash Scripts

Some useful bash scripts I made.

Gemini gemlog

Writing a new gemlog and adding it to the gemlog index

Replace “path” with the path where the relevant files and directories are.

#!/bin/bash

echo "Greetings!"
echo "This is a script to make a gemini blog."
echo "Title?"
read title
var=`date +"%FORMAT_STRING"`
now=`date +"%Y-%m-%d"`
now2=`date +"%Y-%m-%d %T"`
entryfilename=`echo "$title" | sed 's/./\L&/g'`
entryname="$now-${entryfilename// /-}.gemini"
echo $entryname
sed -i "$ a => gemini://path/$entryname $now  $title" /path/index.gemini
echo "$now2

# $title



---


=> gemini://path/index.gemini Back to the journal
=> gemini://path/ Back to the Main Hall"> /path/$entryname
nano /path/$entryname

Syncing my local folder with the Gemini host folder

Replace “path” with the path where the relevant files and directories are.

rsync -azvP -e "ssh -i /path/id_key" /path/ user:/path

To do

scripts


© 2020 Melyanna. Some rights reserved.

CC BY-SA 4.0. RSS