Going underground again

Published: March 04, 2013
Tags: meta minimalism gopher

In January of 2008, I mirrored the whole www.luke.maurits.id.au website in gopherspace, as best I could. This was back when the whole maurits.id.au domain ran on a single machine which lived under my desk at home, running NetBSD, giving me total control over everything. In April 2010 I moved all my stuff to an external host that I only had FTP access to and couldn't run arbitrary processes on, and thus by necessity my gopher presence vanished. Now that, as of December 2011, I am back in total control of my hosting, I can gopher it up again and have finally gotten around to doing so: I'm back in gopherspace! I doubt anybody even noticed the roughly 3 year downtime, but it feels good nevertheless.

Previously I used Pygopherd as my gopher server, but I've been unable to get this running on my current host. I think maybe the last release of Pygopherd (which is now over ten years old!) is no longer compatible with the most modern versions of Python. I tried contacting the author about it, but didn't hear back. So now I am running on Gophernicus, a "a one-man mission to modernize gopher, the precursor of the evil that is WWW". Gophernicus is written in C, rather than Python, and is designed to run from inetd, rather than as a standalone daemon. The latest release, 1.4, didn't support chroot when I came across it, so I wrote a patch to add that functionality and sent it to the author, who got back to me very quickly. I imagine the chroot support will be in 1.5, whenever that comes out.

The gophermap files and the text versions of all pages are generated by the same script that generates all my HTML pages, so maintaining the gopher mirror as a near-exact duplicate takes no extra effort and the gopher version of the site is always updated at the same time as the web version. Right now I am doing HTML to plain text conversion using the html2txt command line program, which is really old and crufty. I'm surprised to find out that there actually aren't that many solutions to this problem out there. There's a Python library called html2text, but it only converts HTML to Markdown, and I'm not sure I want that. Markdown is great for writing webpages (and my homebrew CMS uses it), but I find the way links are done a little clunky for actual reading. I know there's something out there that replaces links with inline numbered references, like [1], [2], [3], and puts the URLS at the bottom of the page, but I can't remember what it is. I'm thinking of writing my own Python library to handle this, to give me total control over how things are rendered. Naturally I'll use PrettyTable to handle <table> tags, which will serve as a nice test case for PrettyTable. I'm just not sure what to call it, since anything remotely like html2text will just cause confusion...

Feeds
Archives
Top tags