'use strict'; const config = require('config'); const yargs = require('yargs'); const { argv } = yargs .command('npm start') .option('scrape', { describe: 'Scrape sites and networks defined in configuration', type: 'boolean', }) .option('networks', { describe: 'Networks to scrape (overrides configuration)', type: 'array', alias: 'network', }) .option('sites', { describe: 'Sites to scrape (overrides configuration)', type: 'array', alias: 'site', }) .option('actors', { describe: 'Scrape actors by name or slug', type: 'array', alias: 'actor', }) .option('sources', { describe: 'Only use these scrapers for actor data', type: 'array', alias: 'source', }) .option('deep', { describe: 'Fetch details for all releases', type: 'boolean', default: true, }) .option('redownload', { describe: 'Don\'t ignore duplicates, update existing entries', type: 'boolean', alias: 'force', }) .option('url', { describe: 'Scrape scene info from URL', type: 'array', alias: 'fetch', }) .option('after', { describe: 'Don\'t fetch scenes older than', type: 'string', default: config.fetchAfter.join(' '), alias: 'limit', }) .option('pages', { describe: 'Limit pages to scrape per site. Only used when no dates are found or --after is unset.', type: 'number', default: 1, }) .option('save', { describe: 'Save fetched releases to database', type: 'boolean', default: true, }) .option('debug', { describe: 'Show error stack traces', type: 'boolean', }); module.exports = argv;