SPACECOOKIE.GOPHERMAP(5) File Formats Manual SPACECOOKIE.GOPHERMAP(5)

spacecookie.gophermapgophermap file format supported by spacecookie(1)

A gophermap file allows to describe a gopher menu without the need to include redundant information. The format supported by spacecookie(1) has originally been introduced by Bucktooth and is supported by most popular gopher server daemons like for example pygopherd(8).

A gophermap file stored as ‘.gophermap’ in a directory under the gopher root of spacecookie(1) is parsed and used as a gopher menu instead of the automatically generated default variant. This allows users to customize the directory listings by specifying informational text, links to files, (other) directories, gopher servers or protocols themselves.

The format is plain text and line based. Both Unix and DOS style line endings are allowed. spacecookie(1) distinguishes between two types of lines:

Info lines are lines of text in a gophermap which don't have any special format requirements except that they may not contain any tab characters.

Any text which may contain anything but tabs.

They are also rendered als plain text without any associated links to gopher clients which support them. Info lines are technically not part of the gopher protocol nor mentioned in RFC1436, but this protocol extension is widely supported and used.

The usual purpose is to display additional text, headings and decorative elements which are not directly related to other resources served via gopher:

+------------------------------+
| Welcome to my Gopher Server! |
+------------------------------+

Below you can find a collection of files I deemed
interesting or useful enough to publish them.

Empty lines are interpreted as info lines which have no content.

Lines describing menu entries are of the following form. All spaces are for readability only and must not be present in the actual format. Everything in brackets may be omitted, the semantics of which are explained below.

gopherfiletypeNAME\t [SELECTOR [\tSERVER [\tPORT]]]
File type character indicating the file type of the linked resource to the client. See RFC1436 for a list of valid file types. Additionally, spacecookie(1) supports ‘i’ which indicates an info line and ‘h’ which indicates an HTML document.
Name of the linked resource which will show up as the text of the menu entry. May contain any characters except newlines and tabs. NAME must always be terminated by a tab.
Gopher selector the entry should link to. Same restrictions in terms of characters apply as for NAME, but there should only be a tab character afterwards if another field is specified. If it is omitted, the value of NAME is used. If the SELECTOR starts with ‘/’, it is interpreted as an absolute path and given to the client as-is. If it starts with ‘URL:’, it is assumed that it is a link to another protocol and passed to the client without modification (see below). In all other cases, it is assumed that the selector is a relative path and is converted to an absolute path before serving the menu to a client.

You can read more about ‘URL:’ links which are another common gopher protocol extension in this email from John Goerzen.

Describes the server SELECTOR should be retrieved from. Same character restrictions apply and it must come after a tab character as well. If it is omitted, the hostname of the server generating the menu is used.
Describes the port SERVER is running on. Must come after a tab and is terminated by the end of the line or file. If this field is left out, the server generating the menu uses its own port.

A gophermap file may contain any number of menu and info lines. They are then converted to actual gopher protocol menu entries clients understand line by line as described above.

Tabs are marked with ‘^I’ for clarity.

spacecookie
===========

Welcome to spacecookie's gopher page!

Get a copy either by downloading the latest
stable release or cloning the development version:

hGitHub page^I	URL:https://github.com/sternenseemann/spacecookie/
9latest tarball^I	/software/releases/spacecookie-0.3.0.0.tar.gz

The following documentation resources should get you started:

0README^I	README.md
1man pages^I	manpages/

Other gopher server daemons (the first link only works
if this server is running on port 70):

1pygopherd^I	/devel/gopher/pygopherd^I	gopher.quux.org
1Bucktooth^I	/buck^I	gopher.floodgap.com^I	70

pygopherd(8), Bucktooth's gophermap documentation and the file type list from RFC1436.

spacecookie(1), spacecookie.json(5)

The spacecookie.gophermap documentation has been written by sternenseemann, sterni-spacecookie@systemli.org.

April 18, 2023 Nixpkgs