aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-10-20 19:15:41 +0200
committerRigel Kent <par@rigelk.eu>2018-10-20 19:16:56 +0200
commit7cf3e57376422e890e9703b68107e6f568a11384 (patch)
treebe4a07f9c109314172bbe194f8f761c521eebd9a
parent6df8130efcd111715b4cb715df614a6d1268b5e2 (diff)
downloadPeerTube-7cf3e57376422e890e9703b68107e6f568a11384.tar.gz
PeerTube-7cf3e57376422e890e9703b68107e6f568a11384.tar.zst
PeerTube-7cf3e57376422e890e9703b68107e6f568a11384.zip
(doc) add manpage to peertube cli
-rw-r--r--package.json2
-rwxr-xr-xscripts/generate-cli-doc.sh5
-rw-r--r--server/tools/README.md82
-rw-r--r--yarn.lock9
4 files changed, 97 insertions, 1 deletions
diff --git a/package.json b/package.json
index 0798fdba2..bc514920d 100644
--- a/package.json
+++ b/package.json
@@ -49,6 +49,7 @@
49 "test": "scripty", 49 "test": "scripty",
50 "help": "scripty", 50 "help": "scripty",
51 "generate-api-doc": "scripty", 51 "generate-api-doc": "scripty",
52 "generate-cli-doc": "scripty",
52 "parse-log": "node ./dist/scripts/parse-log.js", 53 "parse-log": "node ./dist/scripts/parse-log.js",
53 "prune-storage": "node ./dist/scripts/prune-storage.js", 54 "prune-storage": "node ./dist/scripts/prune-storage.js",
54 "optimize-old-videos": "node ./dist/scripts/optimize-old-videos.js", 55 "optimize-old-videos": "node ./dist/scripts/optimize-old-videos.js",
@@ -119,6 +120,7 @@
119 "jsonld-signatures": "https://github.com/Chocobozzz/jsonld-signatures#rsa2017", 120 "jsonld-signatures": "https://github.com/Chocobozzz/jsonld-signatures#rsa2017",
120 "lodash": "^4.17.10", 121 "lodash": "^4.17.10",
121 "magnet-uri": "^5.1.4", 122 "magnet-uri": "^5.1.4",
123 "marked-man": "^0.2.1",
122 "memoizee": "^0.4.14", 124 "memoizee": "^0.4.14",
123 "morgan": "^1.5.3", 125 "morgan": "^1.5.3",
124 "multer": "^1.1.0", 126 "multer": "^1.1.0",
diff --git a/scripts/generate-cli-doc.sh b/scripts/generate-cli-doc.sh
new file mode 100755
index 000000000..0d00f183b
--- /dev/null
+++ b/scripts/generate-cli-doc.sh
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3set -eu
4
5node_modules/marked-man/bin/marked-man server/tools/README.md > dist/server/tools/peertube.8
diff --git a/server/tools/README.md b/server/tools/README.md
new file mode 100644
index 000000000..6b94d74e5
--- /dev/null
+++ b/server/tools/README.md
@@ -0,0 +1,82 @@
1peertube(8) -- companion CLI for PeerTube
2=========================================
3
4SYNOPSIS
5--------
6
7```
8peertube [command] [options]
9```
10
11DESCRIPTION
12-----------
13
14`peertube` wraps various utilities around PeerTube that are used either on a running local, running remote, or cold local instance.
15
16COMMANDS
17--------
18
19Unless 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.
20
21`auth [action]`: stores credentials for your accounts on remote instances so that you don't need to pass them at every command
22
23`upload|up`: upload a video to a remote instance
24
25 $ peertube upload \
26 -u "PEERTUBE_URL" \
27 -U "PEERTUBE_USER" \
28 --password "PEERTUBE_PASSWORD"
29
30`import-videos|import`: import a video from a streaming platform to a remote instance
31
32 $ peertube import \
33 -u "PEERTUBE_URL" \
34 -U "PEERTUBE_USER" \
35 --password "PEERTUBE_PASSWORD" \
36 -t "TARGET_URL"
37
38 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…
39
40`watch|w`: watch a video in the terminal ✩°。⋆
41
42 -g, --gui <player> player type (default: ascii)
43 -i, --invert invert colors (ascii player only)
44 -r, --resolution <res> video resolution (default: 720)
45
46 It provides support for different players:
47
48 - ascii (default ; plays in ascii art in your terminal!)
49 - mpv
50 - mplayer
51 - vlc
52 - stdout
53 - xbmc
54 - airplay
55 - chromecast
56
57`repl`: interact with the application libraries and objects even when PeerTube is not running
58
59 Type .help to see the repl-only functions, or to see the available PeerTube core functions:
60
61 repl> lodash.keys(context)
62
63`help [cmd]`: display help for [cmd]
64
65EXAMPLES
66--------
67
68 $ peertube auth add -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD"
69 $ peertube up <videoFile>
70 $ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10
71
72SEE ALSO
73--------
74
75[PeerTube Tools Documentation](https://github.com/Chocobozzz/PeerTube/blob/develop/support/doc/tools.md)
76
77[PeerTube Admin Documentation](https://docs.joinpeertube.org/lang/en/docs/)
78
79REPORTING BUGS
80--------------
81
82See [PeerTube repository](https://github.com/Chocobozzz/PeerTube).
diff --git a/yarn.lock b/yarn.lock
index a0fec9b5f..2478a0664 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5885,7 +5885,14 @@ map-visit@^1.0.0:
5885 dependencies: 5885 dependencies:
5886 object-visit "^1.0.0" 5886 object-visit "^1.0.0"
5887 5887
5888marked@^0.3.5: 5888marked-man@^0.2.1:
5889 version "0.2.1"
5890 resolved "https://registry.yarnpkg.com/marked-man/-/marked-man-0.2.1.tgz#f259271481de3b507263489f5221b7c5acfd2383"
5891 integrity sha1-8lknFIHeO1ByY0ifUiG3xaz9I4M=
5892 dependencies:
5893 marked "^0.3.2"
5894
5895marked@^0.3.2, marked@^0.3.5:
5889 version "0.3.19" 5896 version "0.3.19"
5890 resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790" 5897 resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790"
5891 integrity sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg== 5898 integrity sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==