67 lines
1.7 KiB
JavaScript
67 lines
1.7 KiB
JavaScript
'use strict';
|
|
|
|
const config = require('config');
|
|
const yargs = require('yargs');
|
|
|
|
const { argv } = yargs
|
|
.command('npm start')
|
|
.option('fetch', {
|
|
describe: 'Fetch latest releases',
|
|
type: 'boolean',
|
|
default: false,
|
|
})
|
|
.option('deep', {
|
|
describe: 'Fetch details for all releases',
|
|
type: 'boolean',
|
|
default: true,
|
|
})
|
|
.option('networks', {
|
|
describe: 'Networks to include (overrides config)',
|
|
type: 'array',
|
|
alias: 'network',
|
|
})
|
|
.option('sites', {
|
|
describe: 'Sites to include (overrides config)',
|
|
type: 'array',
|
|
alias: 'site',
|
|
})
|
|
.option('after', {
|
|
describe: 'Don\'t fetch scenes older than',
|
|
type: 'string',
|
|
default: config.fetchAfter.join(' '),
|
|
})
|
|
.option('save', {
|
|
describe: 'Save fetched releases to database',
|
|
type: 'boolean',
|
|
default: true,
|
|
})
|
|
.option('render', {
|
|
describe: 'Fetch data without rendering interface',
|
|
type: 'boolean',
|
|
default: false,
|
|
})
|
|
.option('scene', {
|
|
describe: 'Fetch scene info from URL',
|
|
type: 'string',
|
|
})
|
|
.option('copy', {
|
|
describe: 'Copy relevant result to clipboard',
|
|
type: 'boolean',
|
|
alias: 'c',
|
|
})
|
|
.option('filename', {
|
|
describe: 'Only output the suggested filename of a scene',
|
|
type: 'boolean',
|
|
})
|
|
.option('debug', {
|
|
describe: 'Show error stack traces',
|
|
type: 'boolean',
|
|
})
|
|
.option('quit', {
|
|
describe: 'Exit after fetching data. Usually used with --copy.',
|
|
type: 'boolean',
|
|
alias: 'q',
|
|
});
|
|
|
|
module.exports = argv;
|