-- Leo's gemini proxy

-- Connecting to dece.space:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en

Gemini CGI scripts


This page presents my various Gemini CGI scripts and approach to writing them. You can access the public repository over the first link below. If you want to see my general-purpose script repository (mostly Bash/Python tooling), this is a different repository, at the second link below. If I'm speaking gibberish and this is confusing but you are interested to know more, check out the “about” section at the end of this page.

Gemini scripts repository

Common scripts repository


Documentation for the scripts


lists


This is a listing manager: create lists, add items, pop items, etc. I use it to note songs and albums to listen to, movies to watch, books to read and more, but it's sufficiently generic to be used for many more purposes.

lists public instance


trikiff


This is a note tool designed to make it easy to record “three good things” that happened in your day. If you are not familiar with this idea, the Greater Good Science Center of Berkeley has a good presentation on their In Action website.

trikiff public instance

Three Good Things on GGIA.


Server software


Opal


I wrote the CGI-only server Opal to be able to access my scripts from a wide set of clients (PC, mobile, smart fridge, whatever).

Opal page


smolcgi.py


The scripts repository contains this library which is used by most scripts. It provides helpers for common Python CGI scripts needs: redirections, ask for client cert, etc.


About CGI scripts


What?


CGI scripts are scripts that get executed on a server when it receives a client request (e.g. from a Gemini browser). The script receives a lot of variables to describe the request: hostname, URL path, client cert data, query parameters, etc. The server then returns the standard output of the script to the client. For example, if you would make the program `uptime` accessible from a CGI server, requesting the appropriate URL would make your client show the uptime of the server. Cool!


Why?


Discussions about Gemini apps are common. Some people really want apps but struggle with the limitations of the protocol, mostly the very narrow way to communicate TO a server. Some others consider Gemini as a read-only protocol, where the query part of an URL is only there to search for content. I'm somewhat on the fence here: I think Gemini is not suitable for full-fledged apps and will frustrate everyone in trying to bend the protocol this way, but I also think we can allow ourselves to do a bit more than simply “search content”. My scripts hopefully illustrate what are sane Gemini apps!


How?


You can of course use them on your own server. All the scripts are licenced with WTFPLv2!


If you want to try them, you can also use them directly on my server, using the public instance links for each one below, but please do not abuse the services nor use them for things that you would consider personal; I'll of course respect your privacy but you'll have to trust me on it, and on my ability to keep my server secure. Also, no warranty, blah blah blah…

-- Response ended

-- Page fetched on Thu May 9 14:52:19 2024