|
|
Gophernicus documentation |
|
|
|
|
|
|
 |
.. |
|
|
 |
examples 2022-Jun-08 12:26 -------- |
|
|
 |
ChangeLog 2016-Nov-04 12:56 13.4 KB |
text/plain |
|
 |
INSTALL 2016-Nov-04 12:56 4.5 KB |
text/plain |
|
 |
LICENSE 2016-Nov-04 12:56 1.3 KB |
text/plain |
|
 |
README 2016-Nov-04 12:56 9.6 KB |
text/plain |
|
 |
README.Debian 2021-May-28 16:39 1.2 KB |
text/plain |
|
 |
README.Gophermap 2016-Nov-04 12:56 3.4 KB |
text/plain |
|
|
Sample gophermap for Gophernicus |
|
|
|
|
|
|
|
Creating a file called "gophermap" into a directory disables the |
|
|
|
normal resource listing and replaces it with the contents of the map |
|
|
|
file. You can also have inline gophermaps - files with a ".gophermap" |
|
|
|
extension are parsed as gophermaps and displayed in between normal |
|
|
|
resources in alphabetical order. |
|
|
|
|
|
|
|
In a gophermap any line that doesn't contain a <TAB> character is |
|
|
|
automatically converted to an type "i" gopher resource which are |
|
|
|
displayed as plain text in the client. Lines which contain tabs are |
|
|
|
intepreted as gopher resource lines which the client will render as |
|
|
|
links. The first line of a gophermap should be a !Title line |
|
|
|
describing the menu. |
|
|
|
|
|
|
|
Dynamic gophermaps are possible by making the gophermap a script and |
|
|
|
marking it as executable. All script output is parsed just like a |
|
|
|
static gophermap, for example lines without tabs are converted to "i" |
|
|
|
resources. Executable gophermaps are always ran through the default |
|
|
|
shell (/bin/sh) so depending on your operating system that's either |
|
|
|
slow, or really unbearably slow... |
|
|
|
|
|
|
|
The format of a gophermap resource line is simple: |
|
|
|
Xname<TAB>selector<TAB>host<TAB>port |
|
|
|
|
|
|
|
Where: |
|
|
|
X is the gopher filetype |
|
|
|
name is an explanation of the resource |
|
|
|
selector is the path to resource |
|
|
|
host:port are the hostname and port number to go to |
|
|
|
|
|
|
|
Type and name are mandatory. If you don't specify a selector, the |
|
|
|
name field will be also used as the selector. If you don't specify |
|
|
|
host or port the host:port of the current server are used instead. |
|
|
|
Also make sure to use ONLY ONE TAB between the fields. |
|
|
|
|
|
|
|
Valid filetypes include: |
|
|
|
0 text file |
|
|
|
1 directory |
|
|
|
3 error message |
|
|
|
5 archive file (zip, tar etc) |
|
|
|
7 search query |
|
|
|
8 telnet session |
|
|
|
9 binary file |
|
|
|
g GIF image |
|
|
|
h HTML file |
|
|
|
i info text |
|
|
|
I generic image file (other than GIF) |
|
|
|
d document file (ps, pdf, doc etc) |
|
|
|
s sound file |
|
|
|
; video file |
|
|
|
c calendar file |
|
|
|
M MIME file (mbox, emails etc) |
|
|
|
|
|
|
|
Additional type characters supported by Gophernicus: |
|
|
|
# comment - rest of the line is ignored |
|
|
|
!title menu title (use on the first line) |
|
|
|
-file hide file from listings |
|
|
|
:ext=type change filetype (for this directory only) |
|
|
|
~ include a list of users with valid ~/public_gopher |
|
|
|
% include a list of available virtual hosts |
|
|
|
=mapfile include or execute other gophermap |
|
|
|
* stop processing gophermap, include file listing |
|
|
|
. stop processing gophermap (default) |
|
|
|
|
|
|
|
Examples of valid resource lines: |
|
|
|
|
|
|
|
1subdir |
|
|
 |
Relative internal link |
|
|
 |
Absolute internal link |
|
|
 |
External link (gopher.floodgap.com) |
|
|
 |
External relative link (which shouldn't work) (gopher.domain.dom) |
|
|
 |
Finger-to-gopher link (example.test) |
text/plain |
|
 |
Link to a website (http://www.google.com) |
|
|
|
|
|
|
 |
Link to a local html page |
text/html |
|
 |
Link to an tar archive |
application/octet-stream |
|
 |
Link to a binary file |
application/octet-stream |
|
|
|
|
|
 |
|
|
|
 |
Telnet session (telnet://example.test) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Include links to users own gopherspaces: |
|
|
|
|
|
|
|
List all available virtual hosts: |
|
|
|
|
|
|
|
Include sub-gophermap: |
|
|
|
Gophernicus - Copyright (c) 2009-2016 Kim Holviala <kim@holviala.com> |
|
|
|
All rights reserved. |
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without |
|
|
|
modification, are permitted provided that the following conditions are met: |
|
|
|
* Redistributions of source code must retain the above copyright |
|
|
|
notice, this list of conditions and the following disclaimer. |
|
|
|
* Redistributions in binary form must reproduce the above copyright |
|
|
|
notice, this list of conditions and the following disclaimer in the |
|
|
|
documentation and/or other materials provided with the distribution. |
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
|
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY |
|
|
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
|
|
|
|
|
|
|
|
|
|
Execute script and parse output as subgophermap: |
|
|
|
06:20:16 up 18 days, 17:38, 2 users, load average: 0.44, 0.37, 0.36 |
|
|
|
|
|
|
|
Here we stop processing the gophermap and include the regular menu: |
|
|
 |
README.md.gz 2021-May-28 18:45 5.6 KB |
application/octet-stream |
|
 |
TODO 2016-Nov-04 12:56 0.3 KB |
text/plain |
|
 |
changelog.Debian.gz 2021-May-28 18:45 0.7 KB |
application/octet-stream |
|
 |
changelog.gz 2021-Jan-03 02:44 1.3 KB |
application/octet-stream |
|
 |
copyright 2021-May-28 16:39 2.6 KB |
text/plain |
|
|
____________________________________________________________________________________________________ |
|
|
|
Gophered by Gophernicus/3.1.1 on Debian/11 x86_64 |
|