X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftools%2Fpeertube.ts;h=655f07f0c86a59a9691ff13a841fcb57cb611c13;hb=1e4d2cb5aef11898585fae4053da4ebd0a69b480;hp=9883bbf05b9c4827d6f59374dccd87a1e4043cf0;hpb=cf59a2a0c367683ba35758419499bf6087c192ec;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tools/peertube.ts b/server/tools/peertube.ts index 9883bbf05..655f07f0c 100644 --- a/server/tools/peertube.ts +++ b/server/tools/peertube.ts @@ -1,13 +1,12 @@ #!/usr/bin/env node +/* eslint-disable no-useless-escape */ + import { registerTSPaths } from '../helpers/register-ts-paths' registerTSPaths() import * as program from 'commander' -import { - version, - getSettings -} from './cli' +import { getSettings, version } from './cli' program .version(version, '-v, --version') @@ -26,14 +25,15 @@ program /* Not Yet Implemented */ program - .command('diagnostic [action]', - 'like couple therapy, but for your instance', - { noHelp: true } as program.CommandOptions - ).alias('d') + .command( + 'diagnostic [action]', + 'like couple therapy, but for your instance', + { noHelp: true } as program.CommandOptions + ).alias('d') .command('admin', - 'manage an instance where you have elevated rights', - { noHelp: true } as program.CommandOptions - ).alias('a') + 'manage an instance where you have elevated rights', + { noHelp: true } as program.CommandOptions + ).alias('a') // help on no command if (!process.argv.slice(2).length) { @@ -69,16 +69,12 @@ getSettings() : 'instance ' + settings.remotes[settings.default] + ' selected' program - .on('--help', function () { - console.log() - console.log(' State: ' + state) - console.log() - console.log(' Examples:') - console.log() - console.log(' $ peertube auth add -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD"') - console.log(' $ peertube up ') - console.log(' $ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10') - console.log() - }) + .addHelpText('after', '\n\n State: ' + state + '\n\n' + + ' Examples:\n\n' + + ' $ peertube auth add -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD"\n' + + ' $ peertube up \n' + + ' $ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10\n' + ) .parse(process.argv) }) + .catch(err => console.error(err))