2
0
mirror of https://github.com/xvxx/phd synced 2024-11-14 18:12:54 +00:00
phd/README.md

47 lines
1.4 KiB
Markdown
Raw Normal View History

2019-12-19 18:27:15 +00:00
```
/ |
___ (___ ___|
| )| )| )
2019-12-23 02:05:48 +00:00
|__/ | / |__/
|
2019-12-19 18:27:15 +00:00
```
2019-12-28 04:26:18 +00:00
an esoteric gopher server.
2019-12-19 18:27:15 +00:00
2019-12-28 05:06:33 +00:00
point it at a directory and it'll serve up all its text files, sub-directories, and binary files over gopher.
2019-12-28 05:50:28 +00:00
special files:
2019-12-19 18:27:15 +00:00
2019-12-28 06:17:42 +00:00
- **header.gph**: if it exists in a directory, its content will be shown above the directory's content. put ascii art in it.
2019-12-28 05:50:28 +00:00
- **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.
2019-12-28 06:27:56 +00:00
- **??.gph**: visiting gopher://yoursite/1/dog/ will try to render `dog.gph` from disk.
2019-12-28 06:17:42 +00:00
- **.reverse**: if this exists, the directory contents will be listed in reverse alphanumeric order. useful for phloggin'.
2019-12-28 05:50:28 +00:00
2019-12-28 06:27:56 +00:00
Any line in a `.gph` file that doesn't contain tabs (`\t`) and doesn't start with an `i` will get an `i` automatically prefixed, turning it into a gopher information item.
2019-12-19 18:27:15 +00:00
## usage
2019-12-23 02:05:48 +00:00
phd [options] <directory>
2019-12-19 18:27:15 +00:00
phd ./path/to/gopher/root # Serve directory over port 70.
2019-12-23 02:05:48 +00:00
phd -p 7070 docs # Serve 'docs' directory on port 7070
phd -h localhost # Serve cwd using hostname "localhost".
2019-12-19 18:27:15 +00:00
## development
cargo run -- ./path/to/gopher/site
## resources
- https://github.com/gophernicus/gophernicus/blob/master/README.Gophermap
- https://gopher.zone/posts/how-to-gophermap/
2019-12-28 00:53:36 +00:00
- [rfc 1436](https://tools.ietf.org/html/rfc1436)
2019-12-19 18:27:15 +00:00
2019-12-28 06:27:56 +00:00
## todo
- [ ] logo
- [ ] script mode
- [ ] run mode
- [ ] log options