diff --git a/README.md b/README.md index 19f8e7a..ce27d97 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ worm-scraper --help If this outputs some help documentation, then the installation process went smoothly. You can move on to assemble the eBook by typing ```bash -worm-scraper download convert scaffold zip +worm-scraper ``` This will take a while, but will eventually produce a `Worm.epub` file! @@ -29,7 +29,7 @@ This will take a while, but will eventually produce a `Worm.epub` file! If you'd like to get _Ward_ instead of _Worm_, use `--book=ward`, e.g. ```bash -worm-scraper download convert scaffold zip --book=ward +worm-scraper --book=ward ``` ## EPUB vs. other formats diff --git a/lib/worm-scraper.js b/lib/worm-scraper.js index 52f3fd0..01b033d 100644 --- a/lib/worm-scraper.js +++ b/lib/worm-scraper.js @@ -16,7 +16,8 @@ const OUTPUT_DEFAULT = "(Book name).epub"; const argv = yargs .usage(`${packageJson.description}\n\n${packageJson.name} [ [ [ ...]]]\n\n` + - "Each command will fail if the previously-listed one has not yet been run (with matching options).") + "Each command will fail if the previously-listed one has not yet been run (with matching options).\n\n" + + "Running with no commands is equivalent to running download convert scaffold zip.") .command("download", "download all chapters into the cache") .command("convert", "convert the raw HTML into cleaned-up ebook chapters") .command("scaffold", "assemble the table of contents, etc.") @@ -58,7 +59,6 @@ const argv = yargs requiresArg: true, global: true }) - .demandCommand(1) // TODO remove and allow all .recommendCommands() .help() .version() @@ -77,6 +77,10 @@ const chaptersPath = path.resolve(contentPath, "chapters"); const commands = []; +if (argv._.length === 0) { + argv._ = ["download", "convert", "scaffold", "zip"]; +} + if (argv._.includes("download")) { const startURL = books[argv.book].startURL; commands.push(() => download(startURL, cachePath, manifestPath));