This is a text-only version of the following page on https://raymii.org:
Title : Site updates, raymii.org now also available on Gopher
Author : Remy van Elst
Date : 10-03-2019
URL : https://raymii.org/s/blog/Site_updates_raymii.org_now_on_gopher.html
Format : Markdown/HTML
### Introduction to Gopher
I've made some new improvements to this website. Raymii.org is generated using
my self-written static site generator named ingsoc and it now supports Gopher.
You can browse to [gopher://raymii.org:70] using your favorite gopher browser
(`lynx` or [DiggieDog for Android]) to view all the articles here on
gopherspace. If you don't have a gopher browser, you can use [the floodgap http
to gopher proxy]
Gopher is a protocol for information transfer over the internet that was very
popular before HTTP took over as the dominant protocol, but there is still a
community of gopher users that prefer the simplicity of the protocol over the
more complex and large protocols more often encountered. Note that not all
browsers support gopher, or have incomplete support. If you want to know more
about Gopher, [read this article]. The reason for me to add Gopher support
for my site is just that I like tinkering and text-based simple stuff. Gopher
fits that bill.
### Static site generator
Due to [this excellent guide] on `pygopherd` and how to create a `Gophermap`
(sort of `index.html` file) I was able to get up and running quickly. I made an
Ansible playbook to install and configure `Pygopherd` and updated my static site
generator to [generate the gophermap]
If you want to setup a gopher server, it can be as simple as:
apt-get install pygopherd
Afterwards, edit the file `/var/gopher/gophermap`. Or remove it and place files
My static site generator's gopher part is simple. It takes the Markdown files,
uses the header for meta information like title and date and puts that meta
information in a dict. Using a `lambda` and an `OrderedDict` the items are
stored in another list, sorted by date:
gopherItems = collections.OrderedDict(sorted(parsedFiles.items(), reverse=True, key=lambda item: dateutil.parser.parse(item
The metadata looks like this:
title: "Site updates, raymii.org now also available on Gopher"
author: "Remy van Elst"
Then, using a `for` loop, every item is written to the `gophermap` file:
with open('gophermap', 'w') as gopherMapFile:
for filename, values in gopherItems.items():
itemLine = "0" + str(values['title']) + " (" + str(values['date']) + ")\t"
itemLine += str(filename) + ".txt\traymii.org\t70\n"
gopherMapFile.write("1This server runs on Pygopherd\t/devel/gopher/pygopherd\tgopher.quux.org\t70\n")
Not the most elegant Python, if I would write the generator from scratch today
I'd probably use templates (`jinja2`), but this works fine for now.
There is a Gopher only RSS feed, which uses the regular RSS feed generator code
and a gopher links section, which is a seperate `gophermap` in the `links`
folder. It's filled via the config file of the static site generator:
'label': "Jan Piet Mens' gopherspace"
After all the files have been created, the generator does a `git commit` and a
`git push`. The servers all poll the repository and if there are changes, they
`pull` the new site. Hassle free deployment. After all, it's just static HTML.
Images and links are not handled yet. You basically get the Markdown I write on
which this site is generated. Just as the plain text file link you can click at
If you use the gopher version of Raymii.org, [please let me know].
[Last year I did some site updates focussed on accessibility].
Consider sponsoring me on Github. It means the world to me if you show you
r appreciation and you'll help pay the server costs.
ou can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60 days.
All the text on this website is free as in freedom unless stated otherwise.
This means you can use it in any way you want, you can copy it, change it
the way you like and republish it, as long as you release the (modified)
content under the same license to give others the same freedoms you've got
and place my name and a link to this site with the article as source.
This site uses Google Analytics for statistics and Google Adwords for
advertisements. You are tracked and Google knows everything about you.
Use an adblocker like ublock-origin if you don't want it.
All the code on this website is licensed under the GNU GPL v3 license
unless already licensed under a license which does not allows this form
of licensing or if another license is stated on that page / in that software:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
Just to be clear, the information on this website is for ment for educational
purposes and you use it at your own risk. I do not take responsibility if you
screw something up. Use common sense, do not rm -rf / as root for example.
If you have any questions then do not hesitate to contact me.
See https://raymii.org/s/static/About.html for details.