PeerTube/server/tools
Frank de Lange bda3b70537 peertube-import-videos.ts: add --tmpdir, --first, --last and --verbose [level] parameters (#2045)
* peertube-import-videos.ts: add --tmpdir <tmpdir> parameter, used to designate working directory for downloading and converting imported videos

* peertube-import-videos.ts: add --first and --last parameters to limit processing of the returned playlist to the first/last N elements

* peertube-import-videos.ts: add --verbose [verbosity] parameter, set this from 0 (only errors are reported) to 4 (for trace debugging), default is 2 (info). When --verbose is used without the optional parameter the logging level is set to 3 (debug). At level 1 (warn) it will only report on successfully uploaded videos (and/or errors), use this when running peertube-import-videos in a cron job to mirror a channel.

* package.json: remove dependency on loglevel

cli.ts: add getLogger(loglevel), to be used in CLI tools, add --verbose to set log level

peertube-import-videos: use getLogger (from cli) instead of loglevel, add error_exit (log error and exit), move --verbose to cli.ts, etc.

* cli.ts: remove superfluous reference to default logging level

* peertube-import-videos: exit_error -> exitError
2019-08-26 11:35:28 +02:00
..
README.md
cli.ts peertube-import-videos.ts: add --tmpdir, --first, --last and --verbose [level] parameters (#2045) 2019-08-26 11:35:28 +02:00
package.json
peertube-auth.ts
peertube-get-access-token.ts
peertube-import-videos.ts peertube-import-videos.ts: add --tmpdir, --first, --last and --verbose [level] parameters (#2045) 2019-08-26 11:35:28 +02:00
peertube-plugins.ts
peertube-repl.ts
peertube-upload.ts
peertube-watch.ts
peertube.ts
tsconfig.json
yarn.lock

README.md

peertube(8) -- companion CLI for PeerTube

SYNOPSIS

peertube [command] [options]

DESCRIPTION

peertube wraps various utilities around PeerTube that are used either on a running local, running remote, or cold local instance.

COMMANDS

Unless otherwise specified, every command can be queried for its own help or manual by passing its name to the help command, or by using the --help option.

auth [action]: stores credentials for your accounts on remote instances so that you don't need to pass them at every command

upload|up: upload a video to a remote instance

$ peertube upload \
    -u "PEERTUBE_URL" \
    -U "PEERTUBE_USER" \
    --password "PEERTUBE_PASSWORD"

import-videos|import: import a video from a streaming platform to a remote instance

$ peertube import \
    -u "PEERTUBE_URL" \
    -U "PEERTUBE_USER" \
    --password "PEERTUBE_PASSWORD" \
    -t "TARGET_URL"

The target URL can be directly the video file, or any of the supported sites of youtube-dl. The video is downloaded locally and then uploaded. Already downloaded videos will not be uploaded twice, so you can run and re-run the script in case of crash, disconnection…

watch|w: watch a video in the terminal ✩°。⋆

-g, --gui <player>      player type (default: ascii)
-i, --invert            invert colors (ascii player only)
-r, --resolution <res>  video resolution (default: 720)

It provides support for different players:

- ascii (default ; plays in ascii art in your terminal!)
- mpv
- mplayer
- vlc
- stdout
- xbmc
- airplay
- chromecast

repl: interact with the application libraries and objects even when PeerTube is not running

Type .help to see the repl-only functions, or to see the available PeerTube core functions:

repl> lodash.keys(context)

help [cmd]: display help for [cmd]

EXAMPLES

$ peertube auth add -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD"
$ peertube up <videoFile>
$ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10

SEE ALSO

PeerTube Tools Documentation

PeerTube Admin Documentation

REPORTING BUGS

See PeerTube repository.