2
0
mirror of https://github.com/xvxx/phetch synced 2024-11-15 00:12:50 +00:00
Go to file
2020-11-16 19:51:48 -08:00
.cargo Have the linker strip the binary (cross-compile friendly) 2020-01-11 12:38:05 -08:00
.github/workflows not anymore 2020-05-17 10:10:00 -07:00
benchmarks put benchmarks in sub-crate to cut down on dev deps 2020-09-26 12:30:43 -07:00
doc update manual 2020-11-13 22:16:36 -08:00
img Add some "screenshots" to the repo: 2020-09-26 12:58:39 -07:00
src factor out left margin maker 2020-11-16 16:28:27 -08:00
tests cp437 test 2020-11-11 15:48:15 -08:00
.gitignore ignore conf 2020-11-11 16:28:47 -08:00
build.rs char 2020-02-01 16:01:35 -08:00
Cargo.lock v1.1.0-dev 2020-11-13 22:30:42 -08:00
Cargo.toml v1.1.0-dev 2020-11-13 22:30:42 -08:00
CHANGELOG.md explain why there's no menu support 2020-11-16 19:51:48 -08:00
Cross.toml wrong file 2020-02-25 12:56:13 -08:00
LICENSE MIT 2019-12-17 16:49:03 -08:00
Makefile make test 2020-11-11 15:30:15 -08:00
README.md add -w, --wrap to cli and config file 2020-11-13 22:12:22 -08:00


phetch is a terminal client designed to help you quickly navigate the gophersphere.


demo of phetch in action

features

  • <1MB executable for Linux, Mac, and NetBSD
  • Technicolor design (based on GILD)
  • No-nonsense keyboard navigation
  • Supports Gopher searches, text and menu pages, and downloads
  • Save your favorite Gopher sites with bookmarks
  • Opt-in history tracking
  • Secure Gopher support (TLS)
  • Tor support

usage

Usage:

    phetch [options]       Launch phetch in interactive mode
    phetch [options] url   Open Gopher URL in interactive mode

Options:

    -s, --tls              Try to open Gopher URLs securely w/ TLS
    -o, --tor              Use local Tor proxy to open all pages
    -S, -O                 Disable TLS or Tor

    -w, --wrap COLUMN      Wrap long lines in "text" views at COLUMN.
    -m, --media PROGRAM    Use to open media files. Default: mpv
    -M, --no-media         Just download media files, don't download

    -r, --raw              Print raw Gopher response only
    -p, --print            Print rendered Gopher response only
    -l, --local            Connect to 127.0.0.1:7070

    -c, --config FILE      Use instead of ~/.config/phetch/phetch.conf
    -C, --no-config        Don't use any config file

    -h, --help             Show this screen
    -v, --version          Show phetch version

Command line options always override options set in phetch.conf.

Once you've launched phetch, use `ctrl-h` to view the on-line help.

installation

If you already have a Gopher client, download phetch here:

gopher://phkt.io/1/phetch/latest

On macOS you can install with Homebrew:

brew install xvxx/code/phetch

On Arch Linux, install phetch with your favorite AUR helper:

yay phetch

On NetBSD, phetch is included in the main pkgsrc repo:

pkgin install phetch

Binaries for Linux, Raspberry Pi, and Mac are available at https://github.com/xvxx/phetch/releases:

Just unzip/untar the phetch program into your $PATH and get going!

You can also build and install from source if you have cargo, make, and the other dependencies described in the next section:

git clone https://github.com/xvxx/phetch
cd phetch
env PREFIX=/usr/local make install

development

To build with TLS support on Linux, you need openssl and pkg-config:

sudo apt install -y pkg-config libssl-dev

Regular development uses cargo:

cargo run -- <gopher-url>

Pro-tip: Run a local gopher server (like phd) on 0.0.0.0:7070 and start phetch with -l or --local to quickly connect to it. Useful for debugging!

phetch builds with TLS and Tor support by default. To disable these features, or to enable only one of them, use the --no-default-features flag:

cargo build --no-default-features

You can check whether TLS is enabled by visiting the About page:

cargo run --no-default-features -- gopher://phetch/about

To enable just TLS support, or just Tor support, use --features:

cargo run --no-default-features --features tor -- gopher://phetch/about

media player support

phetch includes support for opening video files (; item type) and sound files (s item type) in mpv or an application of your choice using the -m command line flag. To test it out, visit a compatible Gopher server (maybe one using Gophor?). Or check out the "gopher types" help page by pressing ctrl-h then 3 in phetch.

todo

  • ctrl-c in load() not yet implemented

bugs

  • telnet IO seems broken after raw_input change (1146f42)

future features

  • track binary size per release
  • text views are menus when URLs are present (one per line max)
  • Find Text in Text views
  • fuzzy find incremental search
  • persistent history
  • bookmarks: toggle instead of just prepending to the file
  • bookmarks: save the title of the current page