diff --git a/README.md b/README.md index 67b1c1b..1617108 100644 --- a/README.md +++ b/README.md @@ -22,29 +22,29 @@ ## Options -| Option | Type | Required | Description | -| ----------------------- | -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| --url | String | true | URL to podcast RSS feed. | -| --out-dir | String | false | Specify output directory for episodes and metadata. Defaults to "./{{podcast_title}}". See "Templating" for more details. | -| --archive | String | false | Download or write out items not listed in archive file. Generates archive file at path if not found. See "Templating" for more details. | -| --episode-template | String | false | Template for generating episode related filenames. See "Templating" for details. | -| --include-meta | | false | Write out podcast metadata to JSON. | -| --include-episode-meta | | false | Write out individual episode metadata to JSON. | -| --ignore-episode-images | | false | Ignore downloading found images from --include-episode-meta. | -| --offset | Number | false | Offset starting download position. Default is 0. | -| --limit | Number | false | Max number of episodes to download. Downloads all by default. | -| --list-format | String ("table" \| "json") | false | How to structure list data when logged. Default is "table". | -| --episode-regex | String | false | Match episode title against provided regex before starting download. | -| --add-mp3-metadata | | false | Attempts to add a base level of MP3 metadata to each episode. Recommended only in cases where the original metadata is of poor quality. (**ffmpeg required**) | -| --adjust-bitrate | String (e.g. "48k") | false | Attempts to adjust bitrate of MP3s. (**ffmpeg required**) | -| --mono | | false | Attempts to force MP3s into mono. (**ffmpeg required**) | -| --override | | false | Override local files on collision. | -| --reverse | | false | Reverse download direction and start at last RSS item. | -| --info | | false | Print retrieved podcast info instead of downloading. | -| --list | | false | Print episode list instead of downloading. | -| --exec | String | false | Execute a command after each episode is downloaded. | -| --version | | false | Output the version number. | -| --help | | false | Output usage information. | +| Option | Type | Required | Description | +| ----------------------- | -------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| --url | String | true | URL to podcast RSS feed. | +| --out-dir | String | false | Specify output directory for episodes and metadata. Defaults to "./{{podcast_title}}". See "Templating" for more details. | +| --archive | String | false | Download or write out items not listed in archive file. Generates archive file at path if not found. Defaults to "./{{podcast_title}}/archive.json". See "Templating" for more details. | +| --episode-template | String | false | Template for generating episode related filenames. See "Templating" for details. | +| --include-meta | | false | Write out podcast metadata to JSON. | +| --include-episode-meta | | false | Write out individual episode metadata to JSON. | +| --ignore-episode-images | | false | Ignore downloading found images from --include-episode-meta. | +| --offset | Number | false | Offset starting download position. Default is 0. | +| --limit | Number | false | Max number of episodes to download. Downloads all by default. | +| --list-format | String ("table" \| "json") | false | How to structure list data when logged. Default is "table". | +| --episode-regex | String | false | Match episode title against provided regex before starting download. | +| --add-mp3-metadata | | false | Attempts to add a base level of MP3 metadata to each episode. Recommended only in cases where the original metadata is of poor quality. (**ffmpeg required**) | +| --adjust-bitrate | String (e.g. "48k") | false | Attempts to adjust bitrate of MP3s. (**ffmpeg required**) | +| --mono | | false | Attempts to force MP3s into mono. (**ffmpeg required**) | +| --override | | false | Override local files on collision. | +| --reverse | | false | Reverse download direction and start at last RSS item. | +| --info | | false | Print retrieved podcast info instead of downloading. | +| --list | | false | Print episode list instead of downloading. | +| --exec | String | false | Execute a command after each episode is downloaded. | +| --version | | false | Output the version number. | +| --help | | false | Output usage information. | ## Archive diff --git a/bin/bin.js b/bin/bin.js index b95fdf5..c88925b 100644 --- a/bin/bin.js +++ b/bin/bin.js @@ -23,7 +23,7 @@ const { ITEM_LIST_FORMATS, runFfmpeg, } = require("./util"); -const { createParseNumber, parseArchivePath } = require("./validate"); +const { createParseNumber } = require("./validate"); const { ERROR_STATUSES, LOG_LEVELS, @@ -45,7 +45,7 @@ commander .option( "--archive ", "download or write only items not listed in archive file", - parseArchivePath + "./{{podcast_title}}/archive.json" ) .option( "--episode-template ", diff --git a/bin/validate.js b/bin/validate.js index 4343357..eff8f6b 100644 --- a/bin/validate.js +++ b/bin/validate.js @@ -24,15 +24,6 @@ const createParseNumber = ({ min, name, required = true }) => { }; }; -const parseArchivePath = (value) => { - if (!value.length) { - logErrorAndExit("Must provide --archive path"); - } - - return value; -}; - module.exports = { createParseNumber, - parseArchivePath, };