💾 Archived View for tilde.club › ~talideon captured on 2023-04-26 at 13:25:36. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

Keith Gaughan

I'm not super sure what I should do with this capsule. I've wanted to experiment with it for a while but don't really have a *reason* to use it. I guess I'll just have to come up with something. I'm sure I'll think of something. It'll probably end up be a refuge for stuff I don't think it suited to the web.

What am I up to right now?

I'm currently seeing what's possible with the Gemini server running here. I believe it's Gemserv, and it seems to be able to run CGI scripts, but I'm only experimenting right now.

Gemserv

Spec

Proxied site

Here's my initial demo script before I write something up:

#!/usr/bin/env python3

import os
from urllib import parse


def main():
    print("20 text/gemini", end="\r\n")
    print("# Gemini test\n")
    print("This is a successful response! Didn't expect this to work!\n")
    print("# Environment\n")
    print("```")
    for key, value in os.environ.items():
        print(key, "=", value)
    print("```\n")
    print("# Query string\n")
    print("```")
    print(parse.parse_qs(os.environ.get("QUERY_STRING", "")))
    print("```\n")


if __name__ == "__main__":
    main()

I'm still trying to figure out a sensible way to handle user input. The spec isn't particularly clear as to the format of the <META> field in responses to 1x requests. I'm guessing you get back whatever the user typed as one big, unstructured lump, which would make user interaction difficult. While the ability to present a client certificate would help deal with auth, it's hard to do anything remotely useful with a url-encoded blob of text. I think you'd need to squeeze some kind of state into the PATH_INFO at least, but at least here on tilde.club with Gemserv, that doesn't seem possible.

I've been thinking of writing a simple desktop client with Tk. It's been something like two decades since I've done that.

Elsewhere

Weblog

Tumblelog

Github

Stack Overflow

I used to use Twitter, but went cold turkey early on during The Event.