2
0
mirror of https://github.com/xvxx/phd synced 2024-11-12 07:10:45 +00:00
Go to file
2019-12-27 22:00:43 -08:00
src dont ensure 2019-12-27 22:00:43 -08:00
.gitignore skeleton 2019-12-22 18:05:48 -08:00
Cargo.lock lean on GopherMap 2019-12-27 15:42:57 -08:00
Cargo.toml lean on GopherMap 2019-12-27 15:42:57 -08:00
README.md some notes 2019-12-27 21:50:28 -08:00

      /       |
 ___ (___  ___|
|   )|   )|   )
|__/ |  / |__/
|

an esoteric gopher server.

point it at a directory and it'll serve up all its text files, sub-directories, and binary files over gopher.

special files:

  • header.gph: if it exists in a directoy, its content will be shown above the directory's content. put ascii art in it.
  • footer.gph: same, but will be shown below a directory's content.
  • index.gph: completely replaces a directory's content with what's in this file.
  • ??.gph: visiting gopher://yoursite/1/dog/ will try to render dog.gph on disk.

Any line in a .gph file that doesn't contain any tabs (\t) and doesn't start with an i will get an i automatically prefixed, turning it into a gopher information item.

usage

phd [options] <directory>

phd ./path/to/gopher/root    # Serve directory over port 70.
phd -p 7070 docs             # Serve 'docs' directory on port 7070
phd -h localhost             # Serve cwd using hostname "localhost".

development

cargo run -- ./path/to/gopher/site

resources