Major refactor, cleand up site scrape module, fixed and cleaned up release scrape module. Removed old CLI code
This commit is contained in:
49
src/argv.js
49
src/argv.js
@@ -5,25 +5,25 @@ const yargs = require('yargs');
|
||||
|
||||
const { argv } = yargs
|
||||
.command('npm start')
|
||||
.option('fetch', {
|
||||
describe: 'Fetch latest releases',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
.option('networks', {
|
||||
describe: 'Networks to scrape (overrides config)',
|
||||
type: 'array',
|
||||
alias: 'network',
|
||||
})
|
||||
.option('sites', {
|
||||
describe: 'Sites to scrape (overrides config)',
|
||||
type: 'array',
|
||||
alias: 'site',
|
||||
})
|
||||
.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('url', {
|
||||
describe: 'Scrape scene info from URL',
|
||||
type: 'string',
|
||||
alias: 'fetch',
|
||||
})
|
||||
.option('after', {
|
||||
describe: 'Don\'t fetch scenes older than',
|
||||
@@ -40,32 +40,9 @@ const { argv } = yargs
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user