phetch is a terminal Gopher client designed to help you quickly navigate the Gophersphere securely. It includes support for browsing via TLS or Tor proxy, but can also be used the old fashioned way. The menu-based interface is driven entirely by your keyboard, and emphasis has been put on swiftness of navigation. Both “jump to link” and incremental search options are available.
We don’t use any ncurses-style library for drawing but instead do
it manually, mainly in
UI. This is the application class that
prints to the screen and manages the loaded Gopher “views”.
Meanwhile, the bulk of the menu system, responding to user
input, and rendering of the colored interface itself takes place
Menu view. The two work hand-in-hand.
This crate includes its own Gopher parsing and fetching library, which may eventually get extracted. It seems that most existing Gopher libraries in Rust allow you to parse menu lines individually into items, but phetch needs to know about the links’ relationships to each other for its navigation/numbering/cursor system to work. So phetch parses all the lines in a Menu as a whole and knows which link is which.
Finally, a note on the code itself: this is not my first Rust program, but you probably wouldn’t know that by looking at it! Suggestions and improvements are more than welcome.
in that directory.
~/.config/phetch/phetch.conf or a file you
specify with the
--config command line option when it starts.
help module manages all internal Gopher pages, from the help
system itself to the Start and “About Phetch” pages.
~/.config/phetch/ exists. This file must be
manually created by the user for history tracking to engage.
~/.config/phetch by default. There is
currently no way to change it. Bookmarks, user history, and the
phetch.conf all live in this directory in a fully loaded
installation of phetch.