💾 Archived View for tilde.club › ~talideon captured on 2024-12-17 at 11:05:06. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

🚧 View Differences

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

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():
    if "QUERY_STRING" not in os.environ:
        print("10 Please enter a query...", end="\r\n")
        return

    print("20 text/gemini", end="\r\n")
    print("# Gemini test\n")
    print("This is a successful response!\n")
    print("## Environment\n")
    print("```")
    for key, value in os.environ.items():
        print(key, "=", value)
    print("```\n")
    print("## Query string\n")
    print("```")
    print(parse.unquote(os.environ["QUERY_STRING"]))
    print("```")


if __name__ == "__main__":
    main()

Here it is

User interaction looks to be super limited with Gemini, with queries really being practically restricted simple search. I guess you could do something more sophisticated with some clever path manipulation via PATH_INFO or by tying some state to client certificates, but you'd probably need something more sophisticated than CGI for that.

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.