I've been meaning to do this forever. My tool for converting gemtext to HTML can now be installed with pip and used both as a standalone CLI tool (it installs the binary "gmi2html") and as a library.
I'm going to add output redirection too eventually, but this is it for now.
UPDATE: A lib that prints stuff to stdout is obviously shit... I changed it so that the gmi2html.convert function returns a string instead.
The repo at notabug.org
-- CC0 Björn Wärmedal