NAME
ptb
—
ed-style peertube client
SYNOPSIS
ptb |
[-v ] [-i
instance] |
DESCRIPTION
ptb
is an interactive PeerTube client, to
be used in a terminal. Created out of frustration due to the official web
frontend for PeerTube requiring a modern browser with JavaScript and other
degenerate anti-technology.
Command line options are as follows:
-i
instance- Sets the current
instance
to specified value. -v
- Enables debug messages.
You operate ptb
by issuing commands.
Commands may be shortened down to a single letter, like in
ed(1).
The available commands are as follows:
!
cmd ... |run
cmd ...- Run a shell command.
- [addr]
browser
- Open the hyperlink to a video specified by addr in a
web browser, defaulting to the first if unspecified. Uses the
BROWSER
environment variable. - [addr]
download
- Download the video specified by addr to your current
working directory, using the program specified by
PTBDOWNLOADER
. - [addr]
list
- List videos on the specified
instance
, with pagination.list
behavior can be altered withset
sort and nsfw options. addr specifies the page to display. print
- Print some debugging information.
quit
- Exit
ptb
. Pressing ⟨C-d⟩ does the same. set
option [value]- Change settings of
ptb
.Boolean options (that are either on or off) actually work similar to their vim(1) counterparts. More specifically, they may be specified without argument to be enabled, or prefixed with “no” to be disabled. From now on, for boolean options only arguments on and off will be specified.
Valid options are:
- nsfw [on | off]
- Toggle displaying sensitive material in
list
results. It's off by default due to copious amounts of porn that make search unusable. Funnily enough, the web ui of PeerTube does the same. - verbose [on | off]
- Enable or disable extra information printouts. Primarily for debugging purposes.
- sort [criteria]
- Change the order of videos in
list
output. Valid criteria values are: “name”, “hot”, “best”, “trending”, “views”, “publishedAt”, “createdAt”, and “duration”. Any of them may be immediately prefixed with a dash (‘-’) to reverse the order, like “-duration” to put the longest videos first. See https://docs.joinpeertube.org/ for what the names actually mean.If criteria is unspecified, reverts to the default of “-best”.
- instance url
- Set the PeerTube instance used by for
list
,yank
,browser
andwatch
commands. Defaults to “xxivproduction.video”.
verbose
- Toggle verbose option.
- [addr]
yank
- Copies the hyperlink to a video specified by addr,
defaulting to 1 if unspecified. Takes the program to use for clipboard
operations from
PTBCOPYPROG
environment variable, see below for defaults. - [addr]
watch
- Streams the video specified by addr in a media
player, using the program specified by
PTBPLAYER
.
ptb
also accepts
editline(7) commands.
ENVIRONMENT
BROWSER
- Browser program. Invoked when running the
browser
command. Defaults to firefox(1). PTBPLAYER
- Video player that is called upon running the
watch
command. If unset, defaults to mpv(1). PTBCOPYPROG
- Program called when executing the
yank
command. Must be able to take input from stdin. If not explicitly set, defaults to “xsel -ib”. PTBDOWNLOADER
- Same as previous entry, called when
d
command is used. Defaults toyt-dlp
.
As ptb
uses libcurl for network
operations, it also accepts the same environment variables as libcurl. They
are documented separately in libcurl-env(3).
SEE ALSO
HISTORY
ptb
was modelled after peertube-viewer-rs
and ed(1). It was first written
in Korn shell, later rewritten in C.
AUTHORS
Sosthène Guédon
<dev@peertube-viewer.com>
made peertube-viewer-rs
, and
Stepan Zolotuev
<poopenfarten@dismail.de>
reimplemented a subset of it in C.
BUGS
All software has.