💾 Archived View for drew.monster › log › gemini_first.gmi captured on 2023-01-29 at 02:16:12. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
15 Apr 2021
`drew.monster` is now operating a Gemini-first policy.
I've added a line to the script which uploads my Gemini stuff to my server, adding a line which looks for (recently edited) `.gmi` files, seds them up a bit to put links into standard markdown format, pandocs the results and saves them to HTML files. It pulls in a header and footer to complete the HTML, then the whole shaboodle is uploaded. My Gemini and web servers now point to the same directory.
Here's the line I added, it's *monstrous*:
find . -mtime -1 -iname "*.gmi" -exec sh -c 'for f do cat head.txt > $(echo "$f" | sed 's/\.gmi/.html/g'); cat "$f" | sed -e "s/^=> \([^[:space:]]*\) \+\([^[:space:]].*\)/[\2](\1)<br \/>/g" -e "s/^=> \([^[:space:]].*\)/[\1](\1)/" -e "s/\(\[.*\]\)\(([^:]*\)\.gmi)/\1\2.html)/g" | pandoc >> $(echo "$f" | sed 's/\.gmi/.html/g'); cat tail.txt >> $(echo "$f" | sed 's/\.gmi/.html/g');done' sh {} \; &&
But it works.
The whole script, such that it is, is here:
https://gitlab.com/uoou/dotfiles/-/tree/master/stow/bin/home/drew/.local/bin/upgem
A little bit of CSS and I'm pretty happy with the results.
TO GEMINI FIRST! 🍷