💾 Archived View for xoc3.io › blog › 2021-07-26 captured on 2023-11-14 at 07:54:39. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
i realized that amfora blogs have a lot of great content for terminal/cli type stuff. so i made a bash function that lets me quickly search through gemini blogs using the geminispace search engine.
here is are those aliases/functions:
urlencode() { python -c "$(echo -e 'import sys,urllib.parse as ul;\nprint(ul.quote(sys.argv[1]))')" "$*" } ams() { amfora "gemini://geminispace.info/search?$(urlencode $@)" }
the basics of the urlencode function came from this stack overflow post:
https://unix.stackexchange.com/questions/159253/decoding-url-encoding-percent-encoding
i modified it a bit to make it a bit more usable. besides that, the rest is pretty straight forward. `ams` stands for "amfora search".
i'll try to make gemini my first goto place before i open ddg.gg.