๐Ÿ‘ฝ jynx

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"
  • "}else if($1=="=>"){$1="";$0=$0""}else{$1="

    ";$0=$0"

    "}{print$0}}' > t.html && pandoc -o t.epub t.html

    3 years ago

    Links

    gemini://gemini.conman.org/boston.gemini

    Actions

    ๐Ÿ‘‹ Join Station

    2 Replies

    ๐Ÿ‘ฝ bencollversphone

    "| bash |" LOL, that's a wide open security hole. ยท 3 years ago

    ๐Ÿ‘ฝ jynx

    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