Customizing Gopher Menus 2017/5/30 When you create a new gopherhole[1] the Gopher server generates default menus based on the names of files and subdirectories you put in your "public_gopher" directory. Or you can customize your menu(s) if you want to do any of the following: * Make menu items with titles longer or different from the file/subdirectory name. * Add a banner, welcome message, ASCII art, or explanatory text to the menu. * Make menu items for files or directories in other users' gopherspaces, other gopher servers, or WWW servers. * Hide files in your "public_gopher" directory from menu access. Customize a gopher menu by creating a file named "gophermap" in the directory or subdirectory corresponding to the menu you want to customize. A gophermap file is a plain text file containing two types of lines: comment lines and selector lines. Comment lines are inserted into the Gopher menu as they appear in the gophermap file, so they can be used for banners, explanatory text, etc. Comment lines can contain any printable character except for and can be up to 70 characters long (longer lines will be truncated). (The "figlet" program can be used to generate banner text with decorative fonts.) Selector lines are used by the Gopher server to generate menu items pointing to files and subdirectories in your own gopherhole or elsewhere. Selector lines must contain at least one character and have the following format: <Tab><selector>[<Tab><host>[<Tab><port>]] <type> is a single-character code indicating the file type[2] of the menu item. (Gopher servers and clients generally use this item type to decide how to handle the target file rather file name extensions.) The most common types are: 0 Plain text file h HTML file 1 Gopher menu I Image file (non-GIF) g GIF image file s Sound file <title> is a character string containing any printable character except <Tab>. It is used for the menu item text, and may be the same or different from the file/subdirectory name. <selector> is the Gopher server file path for the file or subdirectory. For HTML files (item type "h") an alternative selector format is used to refer to files hosted on WWW servers instead of gopher servers: URL:<url> # e.g. URL:http://grex.org <host> is the host name of the Gopher server where the menu item's file/subdirectory is located. Defaults to the Gopher server where the gophermap is stored. <port> is the TCP port of the Gopher server. Defaults to the port of the gophermap file's server. (Usually port 70.) When you create a gophermap file, the resulting custom menu will contain menu items for only those files and subdirectories that have a selector line in the gophermap file. Therefore you can hide files in your "public_gopher" directory by simply leaving them out of the gophermap file. Note that this hiding is only effective for your customized Gopher menus. Such hidden files are still accessible with Gopher clients by specifying the file's address or if someone adds a selector line for the file in their own gophermap file. Notes: [1] See gopher://grex.org/0/~papa/README.2nd [2] See https://en.wikipedia.org/wiki/Gopher_(protocol) for a full list of supported item types.