gmni -j once gemini://gemini.conman.org/boston.gemini 2>/dev/null | sed 's/^=> /gemini:\/\/gemini.conman.org/g;s/ .*//g' | sed 's/^gem/gmni -j once gem/g;s/$/ 2>\/dev\/null/g' | bash | awk '{if($1=="#"){$1="
";$0=$0"
"}else if($1=="*"){$1="";$0=$0"
"}{print$0}}' > t.html && pandoc -o t.epub t.html3 years ago
Links
gemini://gemini.conman.org/boston.gemini
Actions
2 Replies
"| bash |" LOL, that's a wide open security hole. ยท 3 years ago
Proof of concept gemini to epub as a one liner using conman.org as a test. Works. awk code to convert gmi to html stolen from https://codegolf.stackexchange.com/questions/220044/convert-gemtext-to-html ยท 3 years ago
https://codegolf.stackexchange.com/questions/220044/convert-gemtext-to-html
Source