💾 Archived View for rawtext.club › ~sloum › geminilist › 001214.gmi captured on 2020-09-24 at 02:02:03. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
James Tomasino tomasino at lavabit.com
Sat May 30 22:53:06 BST 2020
- - - - - - - - - - - - - - - - - - -
There was an offhand request for a converter from gophermap to thenative text/gemini format in the IRC channel. I had an awk scriptwritten already to parse gophermaps, so I made some quick adjustmentsand can share the results here:
https://github.com/jamestomasino/dotfiles-minimal/blob/master/bin/gophermap2gemini.awk
Currently it detects html links, telnet links, and remaining linkablegopher types and formats those into the =
link pattern. I am checkingURLs for spaces and escaping those, since spaced URLs do actually workin gopher but won't in gemini due to link line parsing. I'm defaultingto code-fencing all type i lines in the file unless the lines match theformatting for a header (#, ##, ###, but not ####), or an unordered list.
It's in GNU awk and untested on BSD. I'm guessing it'll explode therebrilliantly.
For those of you looking to batch-convert or cross-serve content, it maybe useful. Hack it up and enjoy.
PS: do we have a name for the text/gemini format itself? The spec-specjust refers to it by media type.