diff options
Diffstat (limited to 'server/tools/peertube.ts')
-rw-r--r-- | server/tools/peertube.ts | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/server/tools/peertube.ts b/server/tools/peertube.ts deleted file mode 100644 index b79917b4f..000000000 --- a/server/tools/peertube.ts +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | #!/usr/bin/env node | ||
2 | |||
3 | import { CommandOptions, program } from 'commander' | ||
4 | import { getSettings, version } from './shared' | ||
5 | |||
6 | program | ||
7 | .version(version, '-v, --version') | ||
8 | .usage('[command] [options]') | ||
9 | |||
10 | /* Subcommands automatically loaded in the directory and beginning by peertube-* */ | ||
11 | program | ||
12 | .command('auth [action]', 'register your accounts on remote instances to use them with other commands') | ||
13 | .command('upload', 'upload a video').alias('up') | ||
14 | .command('import-videos', 'import a video from a streaming platform').alias('import') | ||
15 | .command('get-access-token', 'get a peertube access token', { noHelp: true }).alias('token') | ||
16 | .command('plugins [action]', 'manage instance plugins/themes').alias('p') | ||
17 | .command('redundancy [action]', 'manage instance redundancies').alias('r') | ||
18 | |||
19 | /* Not Yet Implemented */ | ||
20 | program | ||
21 | .command( | ||
22 | 'diagnostic [action]', | ||
23 | 'like couple therapy, but for your instance', | ||
24 | { noHelp: true } as CommandOptions | ||
25 | ).alias('d') | ||
26 | .command('admin', | ||
27 | 'manage an instance where you have elevated rights', | ||
28 | { noHelp: true } as CommandOptions | ||
29 | ).alias('a') | ||
30 | |||
31 | // help on no command | ||
32 | if (!process.argv.slice(2).length) { | ||
33 | const logo = '░P░e░e░r░T░u░b░e░' | ||
34 | console.log(` | ||
35 | ___/),.._ ` + logo + ` | ||
36 | /' ,. ."'._ | ||
37 | ( "' '-.__"-._ ,- | ||
38 | \\'='='), "\\ -._-"-. -"/ | ||
39 | / ""/"\\,_\\,__"" _" /,- | ||
40 | / / -" _/"/ | ||
41 | / | ._\\\\ |\\ |_.".-" / | ||
42 | / | __\\)|)|),/|_." _,." | ||
43 | / \\_." " ") | ).-""---''-- | ||
44 | ( "/.""7__-""'' | ||
45 | | " ."._--._ | ||
46 | \\ \\ (_ __ "" ".,_ | ||
47 | \\.,. \\ "" -"".-" | ||
48 | ".,_, (",_-,,,-".- | ||
49 | "'-,\\_ __,-" | ||
50 | ",)" ") | ||
51 | /"\\-" | ||
52 | ,"\\/ | ||
53 | _,.__/"\\/_ (the CLI for red chocobos) | ||
54 | / \\) "./, ". | ||
55 | --/---"---" "-) )---- by Chocobozzz et al.\n`) | ||
56 | } | ||
57 | |||
58 | getSettings() | ||
59 | .then(settings => { | ||
60 | const state = (settings.default === undefined || settings.default === -1) | ||
61 | ? 'no instance selected, commands will require explicit arguments' | ||
62 | : 'instance ' + settings.remotes[settings.default] + ' selected' | ||
63 | |||
64 | program | ||
65 | .addHelpText('after', '\n\n State: ' + state + '\n\n' + | ||
66 | ' Examples:\n\n' + | ||
67 | ' $ peertube auth add -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD"\n' + | ||
68 | ' $ peertube up <videoFile>\n' | ||
69 | ) | ||
70 | .parse(process.argv) | ||
71 | }) | ||
72 | .catch(err => console.error(err)) | ||