diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-11 15:47:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-11 15:47:32 +0200 |
commit | 54a3a12ed2d972386c12d59717eedfadd7203767 (patch) | |
tree | ca763d46f65ec12f7f8d170e550c2dd59ded37f5 /support | |
parent | 86bed4a6aaf9819822b6d9f23397d37c580dff51 (diff) | |
download | PeerTube-54a3a12ed2d972386c12d59717eedfadd7203767.tar.gz PeerTube-54a3a12ed2d972386c12d59717eedfadd7203767.tar.zst PeerTube-54a3a12ed2d972386c12d59717eedfadd7203767.zip |
Improve tools documentation
Diffstat (limited to 'support')
-rw-r--r-- | support/doc/tools.md | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/support/doc/tools.md b/support/doc/tools.md index 8f897dbfa..85ce0428d 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md | |||
@@ -1,15 +1,14 @@ | |||
1 | # CLI tools guide | 1 | # CLI tools guide |
2 | 2 | ||
3 | - [Installation](#installation) | 3 | - [Remote tools](#remote-tools) |
4 | - [Usage](#usage) | ||
5 | - [import-videos.js](#import-videosjs) | 4 | - [import-videos.js](#import-videosjs) |
6 | - [upload.js](#uploadjs) | 5 | - [upload.js](#uploadjs) |
6 | - [Server tools](#server-tools) | ||
7 | - [create-transcoding-job.js](#create-transcoding-jobjs) | 7 | - [create-transcoding-job.js](#create-transcoding-jobjs) |
8 | - [create-import-video-file-job.js](#create-import-video-file-jobjs) | 8 | - [create-import-video-file-job.js](#create-import-video-file-jobjs) |
9 | - [prune-storage.js](#prune-storagejs) | ||
9 | 10 | ||
10 | ## Installation | 11 | ## Remote Tools |
11 | |||
12 | ## Prerequisites | ||
13 | 12 | ||
14 | You need at least 512MB RAM to run the script. | 13 | You need at least 512MB RAM to run the script. |
15 | Scripts can be launched directly from a PeerTube server, or from a separate server, even a desktop PC. | 14 | Scripts can be launched directly from a PeerTube server, or from a separate server, even a desktop PC. |
@@ -40,8 +39,6 @@ $ cd ${CLONE} | |||
40 | $ npm run build:server | 39 | $ npm run build:server |
41 | ``` | 40 | ``` |
42 | 41 | ||
43 | ## Tools | ||
44 | |||
45 | ### import-videos.js | 42 | ### import-videos.js |
46 | 43 | ||
47 | You can use this script to import videos from all [supported sites of youtube-dl](https://rg3.github.io/youtube-dl/supportedsites.html) into PeerTube. | 44 | You can use this script to import videos from all [supported sites of youtube-dl](https://rg3.github.io/youtube-dl/supportedsites.html) into PeerTube. |
@@ -78,14 +75,17 @@ $ cd ${CLONE} | |||
78 | $ node dist/server/tools/upload.js --help | 75 | $ node dist/server/tools/upload.js --help |
79 | ``` | 76 | ``` |
80 | 77 | ||
81 | ## Tools to create jobs in the queue | 78 | |
79 | ## Server tools | ||
80 | |||
81 | These scripts should be run on the server, in `peertube-latest` directory. | ||
82 | 82 | ||
83 | ### create-transcoding-job.js | 83 | ### create-transcoding-job.js |
84 | 84 | ||
85 | You can use this script to force transcoding of an existing video. | 85 | You can use this script to force transcoding of an existing video. |
86 | 86 | ||
87 | ``` | 87 | ``` |
88 | $ npm run create-transcoding-job -- -v [videoUUID] | 88 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] |
89 | ``` | 89 | ``` |
90 | 90 | ||
91 | ### create-import-video-file-job.js | 91 | ### create-import-video-file-job.js |
@@ -93,5 +93,14 @@ $ npm run create-transcoding-job -- -v [videoUUID] | |||
93 | You can use this script to import a video file to replace an already uploaded file or to add a new resolution to a video. | 93 | You can use this script to import a video file to replace an already uploaded file or to add a new resolution to a video. |
94 | 94 | ||
95 | ``` | 95 | ``` |
96 | $ npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] | 96 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] |
97 | ``` | ||
98 | |||
99 | ### prune-storage.js | ||
100 | |||
101 | Some transcoded videos or shutdown at a bad time can leave some unused files on your storage. | ||
102 | To delete them (a confirmation will be demanded first): | ||
103 | |||
97 | ``` | 104 | ``` |
105 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage | ||
106 | ``` \ No newline at end of file | ||