2
0
mirror of https://github.com/xvxx/phetch synced 2024-11-15 00:12:50 +00:00
phetch/doc/phetch.1.md

248 lines
5.6 KiB
Markdown
Raw Normal View History

2020-01-08 21:14:44 +00:00
PHETCH(1)
# NAME
phetch - quick lil gopher client
# SYNOPSIS
*phetch* [_OPTIONS_] [_URL_]
2020-01-11 04:19:54 +00:00
# DESCRIPTION
*phetch* is a terminal client designed to help you quickly navigate
the gophersphere. It features non-nonsense keyboard navigation,
support for most Gopher features, easy-to-use TLS and Tor support, as
well as bookmarking and history features.
Usually *phetch* is started with a Gopher URL:
phetch gopher://some-gopher-url.com
If no URL is given, however, *phetch* will launch and open its default
"start page". This can be configured to be any URL. (See *CONFIG*.)
2020-01-08 21:14:44 +00:00
# OPTIONS
*-l*, *--local*
2020-01-09 00:31:50 +00:00
Connect to the local Gopher server at URL _127.0.0.1:7070_.
2020-01-08 21:14:44 +00:00
*-p* _URL_, *--print* _URL_
2020-01-09 00:31:50 +00:00
Print a rendered Gopher server response of _URL_ and exit.
2020-01-08 21:14:44 +00:00
*-r* _URL_, *--raw* _URL_
2020-01-09 00:31:50 +00:00
Print the raw Gopher server response of _URL_ and exit.
2020-01-08 21:14:44 +00:00
2020-01-11 22:06:34 +00:00
*-s*, *--tls*
Attempt to fetch all pages securely over TLS.
2020-01-08 21:14:44 +00:00
2020-01-11 23:14:38 +00:00
*-S*, *--no-tls*
Do not use TLS for connections. This can be used to cancel out an
option set in the config file, for instance.
2020-01-11 22:06:34 +00:00
*-o*, *--tor*
2020-01-11 03:01:58 +00:00
Make all connections using a local Tor proxy.
2020-01-11 23:14:38 +00:00
Tor is The Onion Router.
2020-01-11 03:01:58 +00:00
Set the TOR_PROXY env variable to use an address other than the
Tor default of 127.0.0.1:9050.
2020-01-11 23:14:38 +00:00
*-O*, *--no-tor*
Disable Tor.
2020-10-23 20:15:59 +00:00
*-w*, *--wrap* _COLUMN_
Wrap long lines in Gopher "text" views at _COLUMN_.
Default: 0 (off)
2020-05-30 18:10:27 +00:00
*-m*, *--media* _PATH_
Use program at _PATH_ to open media files (movies and sounds).
Default: mpv
*-M*, *--no-media*
Don't try to open media files. Download them like regular binary
Gopher items.
2020-01-11 23:14:38 +00:00
*-c*, *--config* _FILE_
Use _FILE_ instead of _~/.config/phetch/phetch.conf_
*-C*, *--no-config*
Do not use any config file.
2020-11-12 00:28:40 +00:00
*-e*, *--encoding* _ENCODING_
Render text views in CP437 or UTF8 (default) encoding.
2020-01-08 21:14:44 +00:00
*-h*, *--help*
Print a help summary and exit.
*-v*, *--version*
Print version information and exit.
# NOTES
2020-01-09 00:31:50 +00:00
When given a _URL_, *phetch* will show the requested Gopher page and
2020-01-08 21:14:44 +00:00
enter interactive mode.
Without a _URL_, *phetch* will show a builtin dashboard with easy
access to online help, bookmarks and history, and enter interactive
mode.
2020-01-11 23:14:38 +00:00
Command line options always override options set in phetch.conf.
2020-01-08 21:14:44 +00:00
# NAVIGATION
## KEYBOARD SHORTCUTS
All single letter commands also work with the *Ctrl* key: e.g., *h*
and *Ctrl-h* are synonyms.
*h*
Go to builtin help page.
*q*
Quit *phetch*.
2020-01-08 21:26:48 +00:00
*left arrow*
2020-01-08 21:14:44 +00:00
Go back in history.
2020-01-08 21:26:48 +00:00
*right arrow*
2020-01-08 21:14:44 +00:00
Go forward in history.
2020-01-08 21:26:48 +00:00
*up arrow*, *p*, *k*
2020-01-08 21:14:44 +00:00
Select previous link.
2020-01-08 21:26:48 +00:00
*down arrow*, *n*, *j*
2020-01-08 21:14:44 +00:00
Select next link.
2020-01-08 21:26:48 +00:00
*PgUp*, *-*
Scroll up by many lines.
*PgDn*, *SPACE*
Scroll down by many lines.
2020-01-08 21:14:44 +00:00
*Number key*
Open/select link.
*Enter*
Open current link.
*Esc*, *Ctrl-c*
Cancel
*f*, */*
Find link in page.
*g*
2020-01-09 00:31:50 +00:00
Go to Gopher URL.
2020-01-08 21:14:44 +00:00
*u*
2020-09-26 19:43:26 +00:00
Edit URL. (Can be used to reload the current page.)
2020-01-08 21:14:44 +00:00
*y*
Copy URL.
*b*
Show bookmarks.
*s*
Save bookmark.
*a*
2020-01-08 21:26:48 +00:00
Show history. (Mnemonic: *All* pages/history)
2020-01-08 21:14:44 +00:00
*r*
View raw source.
*w*
Toggle wide mode.
2020-11-11 23:51:20 +00:00
*e*
Toggle encoding between UTF8 and CP437.
2020-01-08 21:14:44 +00:00
## MENU NAVIGATION
Up and down arrows
Use the up and down arrows, *j* and *k* keys, or *n* and *p*
2020-01-11 04:19:54 +00:00
keys to select links. *phetch* will scroll for you, or you can
2020-01-08 21:14:44 +00:00
use page up and page down (or *-* and spacebar) to scroll by
many lines at once.
Number keys
If there are few enough menu items, pressing a number key will
open a link. Otherwise, the first matching number will be
selected. Use *Enter* to open the selected link.
Incremental search
Press *f* or */* to activate search mode, then just start
2020-01-11 04:19:54 +00:00
typing. *phetch* will look for the first case-insensitive match
2020-01-08 21:26:48 +00:00
and try to select it. Use arrow keys or *Ctrl-p*/*Ctrl-n* to cycle
through matches.
2020-01-08 21:14:44 +00:00
# BOOKMARKS
There are two ways to save the URL of the current page:
*y*
Copy URL.
*s*
Save bookmark.
Bookmarks will be saved to the file _~/.config/phetch/bookmarks.gph_ if
the directory _~/.config/phetch/_ exists.
*b*
View saved bookmarks.
The clipboard function uses *pbcopy* on MacOS, and *xsel* _-sel clip_
on Linux.
# HISTORY
2020-01-09 00:31:50 +00:00
If you create a _history.gph_ file in _~/.config/phetch/_, each Gopher
2020-01-08 21:14:44 +00:00
URL you open will be stored there.
New URLs are appended to the bottom, but loaded in reverse order, so
2020-05-30 18:10:27 +00:00
you'll see all the most recently visited pages first when you press
2020-01-08 21:26:48 +00:00
the *a* key.
2020-01-08 21:14:44 +00:00
Feel free to edit your history file directly, or share it with your
friends!
2020-01-11 04:19:54 +00:00
# CONFIG
If you create a _phetch.conf_ file in _~/.config/phetch/_, it will be
automatically loaded when *phetch* starts. The config file supports
2020-01-12 00:30:51 +00:00
most command line options, for your convenience, as well as a few ways
to customize your browsing experience. For example, *phetch* will
always launch in TLS mode if `tls yes` appears in the config file --
no need to pass `--tls` or `-t` on startup.
2020-01-11 04:19:54 +00:00
Here is an example config with all options:
```
# Page to load when launched with no URL argument.
start gopher://phetch/1/home
# Always use TLS mode. (--tls)
tls no
# Connect using local TOR proxy. (--tor)
tor no
2020-01-12 00:30:51 +00:00
# Always start in wide mode.
2020-01-11 04:19:54 +00:00
wide no
2020-05-30 18:10:27 +00:00
# Program to use to open media files.
media mpv
2020-01-12 00:30:51 +00:00
# Use emoji indicators for TLS & Tor.
2020-01-11 04:19:54 +00:00
emoji no
2020-11-12 00:30:05 +00:00
# Encoding. Only CP437 and UTF8 are supported.
encoding utf8
2020-11-14 06:16:36 +00:00
# Wrap text at N columns. 0 = off (--wrap)
wrap 0
2020-01-11 04:19:54 +00:00
```
2020-05-30 18:17:40 +00:00
# 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 or check out the "gopher types" help page by lauching
*phetch* and then pressing `ctrl-h` then `3`.
2020-01-08 21:14:44 +00:00
# ABOUT
2020-01-11 20:55:33 +00:00
*phetch* is maintained by chris west, and released under the MIT license.
2020-01-08 21:14:44 +00:00
2020-01-11 04:19:54 +00:00
phetch's Gopher hole:
2020-01-08 21:14:44 +00:00
_gopher://phkt.io/1/phetch_
2020-01-11 04:19:54 +00:00
phetch's webpage:
2020-01-11 20:55:33 +00:00
_https://github.com/xvxx/phetch_