Gophermap
Encyclopedia
A gophermap file is a means of defining menus for gopher content. The gophermap provides a virtual view of the content available allowing one to rename files, hide them, or even link to content on other servers. The gophermap is supported by both Bucktooth
Bucktooth
Bucktooth is one of the modern servers for Internet Gopher written by Cameron Kaiser. Instead of using the .link and .cap files found in the University of Minnesota gopherd, bucktooth uses the gophermap format....

 and PyGopherd
PyGopherd
PyGopherd is a modern Internet Gopher server written in Python and is maintained by John Goerzen. In addition to support for RFC 1436 Gopher and Gopher+, PyGopherd also supports HTTP and WAP.-External links:...

. These servers must perform some processing on the gophermap file before sending the menu back to the client. For example, Bucktooth will send any RFC 1436 compliant line to the client. Since it would be a major drag to always have to type things out in full, Bucktooth allows the following shortcuts:
  • If you don't specify a port, Bucktooth provides the one your server is using (almost always 70).
  • If you don't specify a host, Bucktooth provides your server's hostname.
  • If you only specify a relative selector and not an absolute path, Bucktooth sticks on the path they're browsing.

gophermap File Format

The gophermap file consists of zero or more lines containing lines that can be one of the following types.
  • Comment Lines

Comment lines contain plaintext without any tabs. These are sent unchanged to the client and can be used for descriptions or for welcome banners.
  • Selector Lines

Selector lines are tab-delimited records that specify all the information a gopher client needs to retrieve the particular resource including the itemtype, display string, server, and port. In the example below signifies the tab character (CTRL-I, 0x09).

1gopher.floodgap.com home/homegopher.floodgap.com70

The above selector line generates a link to "/home" selector on gopher.floodgap.com, port 70 with an itemtype of 1 and a display string of "gopher.floodgap.com home". (The selector can be left empty. A null selector is the same as the root of the mountpoint.)

Valid itemtypes include (defined in RFC 1436)
  • 0 = text
  • 1 = gopher menu
  • 5 = zip file
  • 7 = search server
  • 9 = generic binary
  • I = generic image
  • g = gif image
  • s = sound or audio file
  • h = HTML (or URL referencing any other non-gopher protocol). Note that when itemtype = h and it points to an outside URL (and not just an internal HTML file) the URL must be preceded by a literal "URL:", as shown below.

hGoogle home pageURL:http://www.google.com
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK