How to write a gophermap file
=============================

A gophermap consists of two different types of lines:

* Lines that are just text
* Lines that are links

All lines have the same format.

A line consists of the following elements:

* Content type
* Text (description)
* Path and file
* Server
* Port

The content type is just one character.
The content type and text are written without anything in
between.

So, if the content type is "1" and the text is "See this!",
this becomes:

  "1Seethis!"

The other elements are delimited with a TAB.

Content type
------------

The most important content types are:

i - Just text
0 - A text file
1 - A link to a gophermap file (usually a subdirectory,
   or a gophermap on a different server)
9 - Binary file
I - Image file

Path and file
-------------

This is the local path (on the server) and the name of the
file. It your gopherhole is hosted at occ.deadnet.se, the path
is something like:

  "/users/<username>/"

and could be followed with a subdirectory.

An example of a complete path and file:

   "/users/matto/occ-2022.txt"

Server
------

This is the FQDN of the server, like:

   "occ.deadnet.se"

Port
----

This is the port of the daemon of the gopher server, default is
port 70.

For just text lines, use "-" for the elements, except for the
port, there you use 0.

Examples
========

In the examples below, a TAB is represented with five spaces.
In your gophermap, use real TAB's.

A simple text line:

   "iThis is just text     -     -     0"

A link to a text file:

  "0The 2022 challenge     /users/matto/occ-2022.txt     occ.deadnet.se     70"

A link to a gophermap:

   "1See this link     /phlog     triapul.cz     70"


Fetching a gophermap from the gopherspace
=========================================

You can fetch gophperpages with netcat.

Use the following format:

   "printf "<path-and-filename>\r\n" | nc <hostname> <port>

(The content type is not a part of this command.)

Example:

   printf "phlog\r\n" | nc triapul.cz 70