Posts tagged with "finger"

SmolServe - A lightweight multi-protocol small web server

2 min read; 10 GFI

As Rogallo got close to being "stable", I did a fair bit of work on its documentation. Something that I wanted to include in the site was a good collection of up-to-date screenshots. These are all created on the fly. To do this, of course, requires something that looks like a Gemini server.

Initially, this was simple: Rogallo only supported Gemini capsules, so I could illustrate most things just using Gemtext files in the local filesystem (with an admonition in the documentation to point out that Rogallo was for more than viewing local files). This, of course, wasn't going to scale when I added Finger support, and neither was it going to work well for Gopher support.

The solution seemed obvious: use a lightweight local server for these protocols. With this need in place SmolServe was born. As mentioned when I released Rogallo v1.5.0, this isn't a project to build a comprehensive smolweb server. The aim is to build myself a minimal just-good-enough server that helps me with local testing and documentation.

As it stands, SmolServe supports Gemini, Gopher, Finger and Spartan. Or, rather, it supports a just-enough-to-get-by version of each of those protocols. None are implemented in a way that would serve as a "production" server; they're implemented to allow me to generate screenshots for the Rogallo documentation, involving any of the supported protocols, without the need to rely on services I don't control and which aren't local.

The big benefit of SmolServe is the exec support. With this, you can run up the server and then have it run another command. Once that command finishes its work, SmolServe will close down too. This means that, when it comes to producing the Rogallo documentation, I can just have the server running when I need it. Pulling some snippets from the Rogallo Makefile:

run      := uv run
smol     := $(run) smolserve --config $(docs)server/smolserve.toml
smolexec := $(smol) exec --
mkdocs   := $(smolexec) mkdocs

##############################################################################
# Documentation.
.PHONY: docs
docs:
    $(mkdocs) build

.PHONY: rtfm
rtfm:
    $(mkdocs) serve --livereload

.PHONY: publishdocs
publishdocs: clean-docs
    $(mkdocs) gh-deploy

The idea is that, when I build the documentation, I actually run smolserve, which in turn runs mkdocs, which then produces the documentation while the local server is available.

I also use this sort of approach for local testing of the content of my capsule that lives over on tilde.team.

.PHONY: view
view:
    uv run smolserve --config smolserve.toml exec rogallo open gemini://localhost/

My aim now is that, if I add any other protocols to Rogallo, I'll add a just-good-enough version of them to SmolServe to help me with testing and documentation. For the moment, though, I think it's in a stable and usable state.

Port79 v1.0.0

1 min read; 10 GFI

I've just bumped Port79 to v1.0.0. There's no significant change in this release, other than the addition of the usual dunder-based metadata that is common in Python libraries; somehow I'd managed to leave it out in the last couple of releases.

Now that I've successfully added finger support to Rogallo, and the library is working out well, there didn't seem much point in letting it hang around in zero-point-whatever-land.

Port79 v0.2.0

1 min read; 8 GFI

A quick update to Port79. When I kicked this off I'd set up the FingerURI class so that it was pretty permissive in what it would accept. So, for example, you could do any of:

>>> FingerURI("davep")
FingerURI('finger://davep/')
>>> FingerURI("davep@example.com")
FingerURI('finger://example.com/davep')
>>> FingerURI("finger://example.com/davep")
FingerURI('finger://example.com/davep')

Nice and handy, right? Accept pretty much any input and turn it into a finger URI. However, once I started to add finger support to Rogallo, I realised that this wasn't as helpful as I'd like as it meant I couldn't use it to actually check for a valid URI. It would be more useful to have the class be strict about only being passed finger: URIs.

So now, the first two examples give an error.

>>> FingerURI("davep")
port79.exceptions.URIError: Invalid URI scheme: ''. Expected 'finger'
>>> FingerURI("davep@example.com")
port79.exceptions.URIError: Invalid URI scheme: ''. Expected 'finger'

Instead, if you want the more relaxed approach, you should use the from_string method.

>>> FingerURI.from_string("davep")
FingerURI('finger://davep/')
>>> FingerURI.from_string("davep@example.com")
FingerURI('finger://example.com/davep')

With this change I can confidently use FingerURI to test if any given input is an actual finger URI, and this also makes it work in a similar way to GeminiURI in Wasat.

Port79 - A finger protocol library for Python

1 min read; 10 GFI

Now that Rogallo is starting to settle down somewhat, with all the main Gemini Protocol work falling into place, I've been thinking about adding one or two adjacent protocols. The two most common and obvious ones are Finger and Gopher. While I'm still undecided about adding the latter, the former seems like a fun one to include (if only because I've had an account on plan.cat for around four years now).

With that in mind, much like I did with Wasat, I wrote a spec for what I wanted and pointed Antigravity at it. The result is Port79. As well as providing a library, there's also a small finger clone CLI, which can be run with python -m port79 (if it's installed as a library) or with port79 (if installed along with any command scripts).

$ port79 davep@tilde.team

hello [removed],

Project:
  Rogallo: https://rogallo.davep.dev/

Plan:
  Currently building gemini://tilde.team/~davep/

Pronouns: he/him

$ port79 davep@plan.cat
Login: davep                            Name: Dave Pearson
Directory: /home/davep                 Shell: /bin/plan.cat
Last login Mon Jul 20 19:06:33 2026 UTC
No Mail.
Plan:
Rogallo v0.12.0, with some more QoL changes:
https://blog.davep.org/2026/07/20/rogallo-v0-12-0.html

To be clear: this isn't intended to be a serious finger command (like, why would anyone even need that?), it's just a tool within the library that can be used to do some testing within a development (v)environment.

At some point soon I'll be adding port79 as a dependency of Rogallo and adding finger as a "native protocol".