X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=support%2Fdoc%2Ftools.md;h=1c77395258c7fddd367da618c8479c8c4dc51b26;hb=402b634b03066a2af1325daf7ac584605d36aa56;hp=7f93c94f209a1293cbfe8cdef10aba6a09eefbef;hpb=6d8c8ea73a774c3568e6d28a4cbebcf7979d5c2a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/support/doc/tools.md b/support/doc/tools.md index 7f93c94f2..1c7739525 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md @@ -1,42 +1,31 @@ +# CLI tools guide + -**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - -- [CLI tools guide](#cli-tools-guide) - - [CLI wrapper](#cli-wrapper) - - [Remote Tools](#remote-tools) - - [Dependencies](#dependencies) - - [Installation](#installation) - - [peertube-import-videos.js](#peertube-import-videosjs) - - [peertube-upload.js](#peertube-uploadjs) - - [peertube-watch.js](#peertube-watchjs) - - [Server tools](#server-tools) - - [parse-log](#parse-log) - - [create-transcoding-job.js](#create-transcoding-jobjs) - - [create-import-video-file-job.js](#create-import-video-file-jobjs) - - [prune-storage.js](#prune-storagejs) - - [optimize-old-videos.js](#optimize-old-videosjs) - - [update-host.js](#update-hostjs) - - [REPL (Read Eval Print Loop)](#repl-read-eval-print-loop) - - [.help](#help) - - [Lodash example](#lodash-example) - - [YoutubeDL example](#youtubedl-example) - - [Models examples](#models-examples) +**Table of Contents** + +- [CLI wrapper](#cli-wrapper) +- [Remote Tools](#remote-tools) + - [Dependencies](#dependencies) + - [Installation](#installation) + - [peertube-import-videos.js](#peertube-import-videosjs) + - [peertube-upload.js](#peertube-uploadjs) + - [peertube-watch.js](#peertube-watchjs) +- [Server tools](#server-tools) + - [parse-log](#parse-log) + - [create-transcoding-job.js](#create-transcoding-jobjs) + - [create-import-video-file-job.js](#create-import-video-file-jobjs) + - [prune-storage.js](#prune-storagejs) + - [optimize-old-videos.js](#optimize-old-videosjs) + - [update-host.js](#update-hostjs) + - [REPL (Read Eval Print Loop)](#repl-read-eval-print-loop) + - [.help](#help) + - [Lodash example](#lodash-example) + - [YoutubeDL example](#youtubedl-example) + - [Models examples](#models-examples) -# CLI tools guide - - [CLI wrapper](#cli-wrapper) - - [Remote tools](#remote-tools) - - [peertube-import-videos.js](#peertube-import-videosjs) - - [peertube-upload.js](#peertube-uploadjs) - - [peertube-watch.js](#peertube-watch) - - [Server tools](#server-tools) - - [parse-log](#parse-log) - - [create-transcoding-job.js](#create-transcoding-jobjs) - - [create-import-video-file-job.js](#create-import-video-file-jobjs) - - [prune-storage.js](#prune-storagejs) - ## CLI wrapper The wrapper provides a convenient interface to most scripts, and requires the [same dependencies](#dependencies). You can access it as `peertube` via an alias in your `.bashrc` like `alias peertube="node ${PEERTUBE_PATH}/dist/server/tools/peertube.js"`: @@ -55,6 +44,7 @@ The wrapper provides a convenient interface to most scripts, and requires the [s upload|up upload a video import-videos|import import a video from a streaming platform watch|w watch a video in the terminal ✩°。⋆ + repl initiate a REPL to access internals help [cmd] display help for [cmd] ``` @@ -240,7 +230,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production If you want to interact with the application libraries and objects even when PeerTube is not running, there is a REPL for that. -usage: `node ./dist/server/tools/repl.js` +usage: `node ./dist/server/tools/peertube-repl.js` "The default evaluator will, by default, assign the result of the most recently evaluated expression to the special variable `_` (underscore). Explicitly setting `_` to a value will disable this behavior."