-- Leo's gemini proxy

-- Connecting to tilde.club:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en

2022-07-03 14:22:34


My script to make a gemlog


Here is the script I am using to create my gemlog.

The script assumes an index.gmi file where to add your log entries already exists.

The script uses nano, because that's my editor of choice. You can easily modify it to use a different editor.

I have built this script to pre-format entries in a way that works for me, but that is also easy to change by changing anything after the line '# $title'.

I am no coder, so I am well aware there are a 100000 better ways to do this. :)


> #!/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// /-}.gmi"

> echo $entryname

> sed -i "$ a => [path where you want the entry saved]/$entryname $now $title" [path to your gemlog index]/index.gmi

> echo "$now2

>

> # $title

>

>

>

> ---

>

>

> => gemini://[path to your gemlog index]/index.gmi Back to the gemlog

> => gemini://[path to your gemini capsule's main page] Home"> [path to your gemlog entry]$entryname

> nano [path to where you want the entry to be saved]/$entryname

>

>


---


Back to the journal

Back to the Main Hall


-- Response ended

-- Page fetched on Tue May 21 03:52:45 2024