add -a/-A to README and manual

pull/33/head
chris west 2 years ago
parent 7eefac1c26
commit 79174e329f

@ -53,6 +53,8 @@ the gophersphere.
-w, --wrap COLUMN Wrap long lines in "text" views at COLUMN. -w, --wrap COLUMN Wrap long lines in "text" views at COLUMN.
-m, --media PROGRAM Use to open media files. Default: mpv -m, --media PROGRAM Use to open media files. Default: mpv
-M, --no-media Just download media files, don't download -M, --no-media Just download media files, don't download
-a, --autoplay Autoplay media files without prompting.
-A, --no-autoplay Prompt before playing media files.
-r, --raw Print raw Gopher response only -r, --raw Print raw Gopher response only
-p, --print Print rendered Gopher response only -p, --print Print rendered Gopher response only

@ -1,11 +1,11 @@
.\" Generated by scdoc 1.11.0 .\" Generated by scdoc 1.11.2
.\" Complete documentation for this program is not available as a GNU info page .\" Complete documentation for this program is not available as a GNU info page
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.nh .nh
.ad l .ad l
.\" Begin generated content: .\" Begin generated content:
.TH "PHETCH" "1" "2020-11-14" .TH "PHETCH" "1" "2022-11-13"
.P .P
.SH NAME .SH NAME
.P .P
@ -18,162 +18,172 @@ phetch - quick lil gopher client
.SH DESCRIPTION .SH DESCRIPTION
.P .P
\fBphetch\fR is a terminal client designed to help you quickly navigate \fBphetch\fR is a terminal client designed to help you quickly navigate
the gophersphere. It features non-nonsense keyboard navigation, the gophersphere.\& It features non-nonsense keyboard navigation,
support for most Gopher features, easy-to-use TLS and Tor support, as support for most Gopher features, easy-to-use TLS and Tor support, as
well as bookmarking and history features. well as bookmarking and history features.\&
.P .P
Usually \fBphetch\fR is started with a Gopher URL: Usually \fBphetch\fR is started with a Gopher URL:
.P .P
.RS 4 .RS 4
phetch gopher://some-gopher-url.com phetch gopher://some-gopher-url.\&com
.P .P
.RE .RE
If no URL is given, however, \fBphetch\fR will launch and open its default If no URL is given, however, \fBphetch\fR will launch and open its default
"start page". This can be configured to be any URL. (See \fBCONFIG\fR.) "start page".\& This can be configured to be any URL.\& (See \fBCONFIG\fR.\&)
.P .P
.SH OPTIONS .SH OPTIONS
.P .P
\fB-l\fR, \fB--local\fR \fB-l\fR, \fB--local\fR
.RS 4 .RS 4
Connect to the local Gopher server at URL \fI127.0.0.1:7070\fR. Connect to the local Gopher server at URL \fI127.\&0.\&0.\&1:7070\fR.\&
.P .P
.RE .RE
\fB-p\fR \fIURL\fR, \fB--print\fR \fIURL\fR \fB-p\fR \fIURL\fR, \fB--print\fR \fIURL\fR
.RS 4 .RS 4
Print a rendered Gopher server response of \fIURL\fR and exit. Print a rendered Gopher server response of \fIURL\fR and exit.\&
.P .P
.RE .RE
\fB-r\fR \fIURL\fR, \fB--raw\fR \fIURL\fR \fB-r\fR \fIURL\fR, \fB--raw\fR \fIURL\fR
.RS 4 .RS 4
Print the raw Gopher server response of \fIURL\fR and exit. Print the raw Gopher server response of \fIURL\fR and exit.\&
.P .P
.RE .RE
\fB-s\fR, \fB--tls\fR \fB-s\fR, \fB--tls\fR
.RS 4 .RS 4
Attempt to fetch all pages securely over TLS. Attempt to fetch all pages securely over TLS.\&
.P .P
.RE .RE
\fB-S\fR, \fB--no-tls\fR \fB-S\fR, \fB--no-tls\fR
.RS 4 .RS 4
Do not use TLS for connections. This can be used to cancel out an Do not use TLS for connections.\& This can be used to cancel out an
option set in the config file, for instance. option set in the config file, for instance.\&
.P .P
.RE .RE
\fB-o\fR, \fB--tor\fR \fB-o\fR, \fB--tor\fR
.RS 4 .RS 4
Make all connections using a local Tor proxy. Make all connections using a local Tor proxy.\&
Tor is The Onion Router. Tor is The Onion Router.\&
Set the TOR_PROXY env variable to use an address other than the Set the TOR_PROXY env variable to use an address other than the
Tor default of 127.0.0.1:9050. Tor default of 127.\&0.\&0.\&1:9050.\&
.P .P
.RE .RE
\fB-O\fR, \fB--no-tor\fR \fB-O\fR, \fB--no-tor\fR
.RS 4 .RS 4
Disable Tor. Disable Tor.\&
.P .P
.RE .RE
\fB-w\fR, \fB--wrap\fR \fICOLUMN\fR \fB-w\fR, \fB--wrap\fR \fICOLUMN\fR
.RS 4 .RS 4
Wrap long lines in Gopher "text" views at \fICOLUMN\fR. Wrap long lines in Gopher "text" views at \fICOLUMN\fR.\&
Default: 0 (off) Default: 0 (off)
.P .P
.RE .RE
\fB-m\fR, \fB--media\fR \fIPATH\fR \fB-m\fR, \fB--media\fR \fIPATH\fR
.RS 4 .RS 4
Use program at \fIPATH\fR to open media files (movies and sounds). Use program at \fIPATH\fR to open media files (movies and sounds).\&
Default: mpv Default: mpv
.P .P
.RE .RE
\fB-M\fR, \fB--no-media\fR \fB-M\fR, \fB--no-media\fR
.RS 4 .RS 4
Don't try to open media files. Download them like regular binary Don'\&t try to open media files.\& Download them like regular binary
Gopher items. Gopher items.\&
.P
.RE
\fB-a\fR, \fB--autoplay\fR
.RS 4
Autoplay media files instead of prompting.\&
.P
.RE
\fB-A\fR, \fB--no-autoplay\fR
.RS 4
Don'\&t autoplay media files.\& Prompt instead.\&
.P .P
.RE .RE
\fB-c\fR, \fB--config\fR \fIFILE\fR \fB-c\fR, \fB--config\fR \fIFILE\fR
.RS 4 .RS 4
Use \fIFILE\fR instead of \fI~/.config/phetch/phetch.conf\fR Use \fIFILE\fR instead of \fI~/.\&config/phetch/phetch.\&conf\fR
.P .P
.RE .RE
\fB-C\fR, \fB--no-config\fR \fB-C\fR, \fB--no-config\fR
.RS 4 .RS 4
Do not use any config file. Do not use any config file.\&
.P .P
.RE .RE
\fB-e\fR, \fB--encoding\fR \fIENCODING\fR \fB-e\fR, \fB--encoding\fR \fIENCODING\fR
.RS 4 .RS 4
Render text views in CP437 or UTF8 (default) encoding. Render text views in CP437 or UTF8 (default) encoding.\&
.P .P
.RE .RE
\fB-h\fR, \fB--help\fR \fB-h\fR, \fB--help\fR
.RS 4 .RS 4
Print a help summary and exit. Print a help summary and exit.\&
.P .P
.RE .RE
\fB-v\fR, \fB--version\fR \fB-v\fR, \fB--version\fR
.RS 4 .RS 4
Print version information and exit. Print version information and exit.\&
.P .P
.RE .RE
.SH NOTES .SH NOTES
.P .P
When given a \fIURL\fR, \fBphetch\fR will show the requested Gopher page and When given a \fIURL\fR, \fBphetch\fR will show the requested Gopher page and
enter interactive mode. enter interactive mode.\&
.P .P
Without a \fIURL\fR, \fBphetch\fR will show a builtin dashboard with easy Without a \fIURL\fR, \fBphetch\fR will show a builtin dashboard with easy
access to online help, bookmarks and history, and enter interactive access to online help, bookmarks and history, and enter interactive
mode. mode.\&
.P .P
Command line options always override options set in phetch.conf. Command line options always override options set in phetch.\&conf.\&
.P .P
.SH NAVIGATION .SH NAVIGATION
.P .P
.SS KEYBOARD SHORTCUTS .SS KEYBOARD SHORTCUTS
.P .P
All single letter commands also work with the \fBCtrl\fR key: e.g., \fBh\fR All single letter commands also work with the \fBCtrl\fR key: e.\&g.\&, \fBh\fR
and \fBCtrl-h\fR are synonyms. and \fBCtrl-h\fR are synonyms.\&
.P .P
\fBh\fR \fBh\fR
.RS 4 .RS 4
Go to builtin help page. Go to builtin help page.\&
.RE .RE
\fBq\fR \fBq\fR
.RS 4 .RS 4
Quit \fBphetch\fR. Quit \fBphetch\fR.\&
.P .P
.RE .RE
\fBleft arrow\fR \fBleft arrow\fR
.RS 4 .RS 4
Go back in history. Go back in history.\&
.RE .RE
\fBright arrow\fR \fBright arrow\fR
.RS 4 .RS 4
Go forward in history. Go forward in history.\&
.RE .RE
\fBup arrow\fR, \fBp\fR, \fBk\fR \fBup arrow\fR, \fBp\fR, \fBk\fR
.RS 4 .RS 4
Select previous link. Select previous link.\&
.RE .RE
\fBdown arrow\fR, \fBn\fR, \fBj\fR \fBdown arrow\fR, \fBn\fR, \fBj\fR
.RS 4 .RS 4
Select next link. Select next link.\&
.RE .RE
\fBPgUp\fR, \fB-\fR \fBPgUp\fR, \fB-\fR
.RS 4 .RS 4
Scroll up by many lines. Scroll up by many lines.\&
.RE .RE
\fBPgDn\fR, \fBSPACE\fR \fBPgDn\fR, \fBSPACE\fR
.RS 4 .RS 4
Scroll down by many lines. Scroll down by many lines.\&
.P .P
.RE .RE
\fBNumber key\fR \fBNumber key\fR
.RS 4 .RS 4
Open/select link. Open/select link.\&
.RE .RE
\fBEnter\fR \fBEnter\fR
.RS 4 .RS 4
Open current link. Open current link.\&
.RE .RE
\fBEsc\fR, \fBCtrl-c\fR \fBEsc\fR, \fBCtrl-c\fR
.RS 4 .RS 4
@ -182,46 +192,46 @@ Cancel
.RE .RE
\fBf\fR, \fB/\fR \fBf\fR, \fB/\fR
.RS 4 .RS 4
Find link in page. Find link in page.\&
.P .P
.RE .RE
\fBg\fR \fBg\fR
.RS 4 .RS 4
Go to Gopher URL. Go to Gopher URL.\&
.RE .RE
\fBu\fR \fBu\fR
.RS 4 .RS 4
Edit URL. (Can be used to reload the current page.) Edit URL.\& (Can be used to reload the current page.\&)
.RE .RE
\fBy\fR \fBy\fR
.RS 4 .RS 4
Copy URL. Copy URL.\&
.P .P
.RE .RE
\fBb\fR \fBb\fR
.RS 4 .RS 4
Show bookmarks. Show bookmarks.\&
.RE .RE
\fBs\fR \fBs\fR
.RS 4 .RS 4
Save bookmark. Save bookmark.\&
.RE .RE
\fBa\fR \fBa\fR
.RS 4 .RS 4
Show history. (Mnemonic: \fBAll\fR pages/history) Show history.\& (Mnemonic: \fBAll\fR pages/history)
.P .P
.RE .RE
\fBr\fR \fBr\fR
.RS 4 .RS 4
View raw source. View raw source.\&
.RE .RE
\fBw\fR \fBw\fR
.RS 4 .RS 4
Toggle wide mode. Toggle wide mode.\&
.RE .RE
\fBe\fR \fBe\fR
.RS 4 .RS 4
Toggle encoding between UTF8 and CP437. Toggle encoding between UTF8 and CP437.\&
.P .P
.RE .RE
.SS MENU NAVIGATION .SS MENU NAVIGATION
@ -229,24 +239,24 @@ Toggle encoding between UTF8 and CP437.
Up and down arrows Up and down arrows
.RS 4 .RS 4
Use the up and down arrows, \fBj\fR and \fBk\fR keys, or \fBn\fR and \fBp\fR Use the up and down arrows, \fBj\fR and \fBk\fR keys, or \fBn\fR and \fBp\fR
keys to select links. \fBphetch\fR will scroll for you, or you can keys to select links.\& \fBphetch\fR will scroll for you, or you can
use page up and page down (or \fB-\fR and spacebar) to scroll by use page up and page down (or \fB-\fR and spacebar) to scroll by
many lines at once. many lines at once.\&
.P .P
.RE .RE
Number keys Number keys
.RS 4 .RS 4
If there are few enough menu items, pressing a number key will If there are few enough menu items, pressing a number key will
open a link. Otherwise, the first matching number will be open a link.\& Otherwise, the first matching number will be
selected. Use \fBEnter\fR to open the selected link. selected.\& Use \fBEnter\fR to open the selected link.\&
.P .P
.RE .RE
Incremental search Incremental search
.RS 4 .RS 4
Press \fBf\fR or \fB/\fR to activate search mode, then just start Press \fBf\fR or \fB/\fR to activate search mode, then just start
typing. \fBphetch\fR will look for the first case-insensitive match typing.\& \fBphetch\fR will look for the first case-insensitive match
and try to select it. Use arrow keys or \fBCtrl-p\fR/\fBCtrl-n\fR to cycle and try to select it.\& Use arrow keys or \fBCtrl-p\fR/\fBCtrl-n\fR to cycle
through matches. through matches.\&
.P .P
.RE .RE
.SH BOOKMARKS .SH BOOKMARKS
@ -255,44 +265,44 @@ There are two ways to save the URL of the current page:
.P .P
\fBy\fR \fBy\fR
.RS 4 .RS 4
Copy URL. Copy URL.\&
.RE .RE
\fBs\fR \fBs\fR
.RS 4 .RS 4
Save bookmark. Save bookmark.\&
.P .P
.RE .RE
Bookmarks will be saved to the file \fI~/.config/phetch/bookmarks.gph\fR if Bookmarks will be saved to the file \fI~/.\&config/phetch/bookmarks.\&gph\fR if
the directory \fI~/.config/phetch/\fR exists. the directory \fI~/.\&config/phetch/\fR exists.\&
.P .P
\fBb\fR \fBb\fR
.RS 4 .RS 4
View saved bookmarks. View saved bookmarks.\&
.P .P
.RE .RE
The clipboard function uses \fBpbcopy\fR on MacOS, and \fBxsel\fR \fI-sel clip\fR The clipboard function uses \fBpbcopy\fR on MacOS, and \fBxsel\fR \fI-sel clip\fR
on Linux. on Linux.\&
.P .P
.SH HISTORY .SH HISTORY
.P .P
If you create a \fIhistory.gph\fR file in \fI~/.config/phetch/\fR, each Gopher If you create a \fIhistory.\&gph\fR file in \fI~/.\&config/phetch/\fR, each Gopher
URL you open will be stored there. URL you open will be stored there.\&
.P .P
New URLs are appended to the bottom, but loaded in reverse order, so New URLs are appended to the bottom, but loaded in reverse order, so
you'll see all the most recently visited pages first when you press you'\&ll see all the most recently visited pages first when you press
the \fBa\fR key. the \fBa\fR key.\&
.P .P
Feel free to edit your history file directly, or share it with your Feel free to edit your history file directly, or share it with your
friends! friends!\&
.P .P
.SH CONFIG .SH CONFIG
.P .P
If you create a \fIphetch.conf\fR file in \fI~/.config/phetch/\fR, it will be If you create a \fIphetch.\&conf\fR file in \fI~/.\&config/phetch/\fR, it will be
automatically loaded when \fBphetch\fR starts. The config file supports automatically loaded when \fBphetch\fR starts.\& The config file supports
most command line options, for your convenience, as well as a few ways most command line options, for your convenience, as well as a few ways
to customize your browsing experience. For example, \fBphetch\fR will to customize your browsing experience.\& For example, \fBphetch\fR will
always launch in TLS mode if `tls yes` appears in the config file -- always launch in TLS mode if `tls yes` appears in the config file --
no need to pass `--tls` or `-t` on startup. no need to pass `--tls` or `-t` on startup.\&
.P .P
Here is an example config with all options: Here is an example config with all options:
.P .P
@ -328,18 +338,18 @@ wrap 0
.P .P
\fBphetch\fR includes support for opening video files (`;` item type) and \fBphetch\fR includes support for opening video files (`;` item type) and
sound files (`s` item type) in `mpv` or an application of your choice 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 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 Gopher server or check out the "gopher types" help page by lauching
\fBphetch\fR and then pressing `ctrl-h` then `3`. \fBphetch\fR and then pressing `ctrl-h` then `3`.\&
.P .P
.SH ABOUT .SH ABOUT
.P .P
\fBphetch\fR is maintained by chris west, and released under the MIT license. \fBphetch\fR is maintained by chris west, and released under the MIT license.\&
.P .P
phetch's Gopher hole: phetch'\&s Gopher hole:
.RS 4 .RS 4
\fIgopher://phkt.io/1/phetch\fR \fIgopher://phkt.\&io/1/phetch\fR
.RE .RE
phetch's webpage: phetch'\&s webpage:
.RS 4 .RS 4
\fIhttps://github.com/xvxx/phetch\fR \fIhttps://github.\&com/xvxx/phetch\fR

@ -61,6 +61,12 @@ If no URL is given, however, *phetch* will launch and open its default
Don't try to open media files. Download them like regular binary Don't try to open media files. Download them like regular binary
Gopher items. Gopher items.
*-a*, *--autoplay*
Autoplay media files instead of prompting.
*-A*, *--no-autoplay*
Don't autoplay media files. Prompt instead.
*-c*, *--config* _FILE_ *-c*, *--config* _FILE_
Use _FILE_ instead of _~/.config/phetch/phetch.conf_ Use _FILE_ instead of _~/.config/phetch/phetch.conf_

@ -81,8 +81,8 @@ Options:
-m, --media PROGRAM Use to open media files. Default: mpv -m, --media PROGRAM Use to open media files. Default: mpv
-M, --no-media Just download media files, don't download -M, --no-media Just download media files, don't download
-a, --autoplay Skip the play media prompy -a, --autoplay Autoplay media without prompting.
-A, --no-autoplay Do not skip the media prompt -A, --no-autoplay Prompt before playing media.
-r, --raw Print raw Gopher response only -r, --raw Print raw Gopher response only
-p, --print Print rendered Gopher response only -p, --print Print rendered Gopher response only

Loading…
Cancel
Save