[ANN] Garden Gnome Society!

Björn Wärmedal bjorn.warmedal at gmail.com
Fri Dec 4 07:10:07 GMT 2020


> Brilliant work, Björn! I try to water another community garden plant
> each day, but I usually have to pick a bunch of them at random before I
> find one that needs watering. Thanks for making this a MUCH easier
> process.

Thank you, Gary! It was exactly that problem I intended to solve :)

> This is awesome! I know botany from the tildeverse, but have never used
> it! I was wondering, could you, or someone else, teach me how to attach
> my output from astrobotany to my index page of my gemini capsule?

Hey, Vidak! Good question, and I'm happy to help :)

It's surprisingly simple, actually! There are a few curl-like command
line utilities for gemini out there. When I was planning on making
this I looked at https://github.com/makeworld-the-better-one/gemget at
first. It ended up not working for me for two reasons: it doesn't
(yet) support client certificates -- which AstroBotany requires to let
you walk the community garden or visit your own plant -- and the Go
version on my Raspberry Pi was incompatible (that's probably a
solvable problem, but I would still need the client cert support).

I ended up writing my own in python3:
https://github.com/makeworld-the-better-one/gemget

Python3 is great for me, because it works on my laptop and my RPi
without needing to compile anything. This tool is *really* basic for
now. There's no error checking, it decodes everything to UTF-8 before
pushing it to stdout, and the response header line is included in the
output. And there's no server cert validation of any kind (i.e. no
known-hosts database). But it works for the purpose of fetching
AstroBotany info!

Basically: find where your browser keeps your client cert, run
"gemcall -c <path to cert> -k <path to cert key> -u
gemini://astrobotany.mozz.us/app/plant" and you'll get text output. Be
sure to not have the colour setting turned on for that client cert, as
that will ruin the experience for some people visiting your capsule.
Then you just have to figure out which lines from the output you want!
Put it in a cron job or systemd.timer if you can, and it's fully
automated.

Cheers,
ew0k


More information about the Gemini mailing list