Support local HTML files for conversion

Allow the CLI argument to be either a remote URL or a local HTML path, and document the new usage in README/help examples.
This commit is contained in:
√(noham)²
2026-07-24 23:05:25 +02:00
parent 9711bc3dc1
commit fd941700d7
5 changed files with 33 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ node src/index.js --help
Usage: pdfy [options] <url>
Arguments:
url URL of the article to convert
url URL of the article to convert, or path to a local HTML file
Options:
-t, --theme <theme> Reader View theme (light, dark, sepia, groove-dark, solarized-light, solarized-dark, nord-light, nord-dark)
@@ -77,7 +77,9 @@ CLI flags always override config file values. Use `--config <path>` to specify a
```bash
node src/index.js https://example.com/article
node src/index.js /path/to/saved/page.html
node src/index.js https://example.com/article --theme dark --css config/rules.css
node src/index.js /path/to/saved/page.html --theme dark --highlight-style monokai
node src/index.js https://example.com/article --prefs config/reader-view-preferences.json
node src/index.js https://example.com/article --highlight-style monokai
node src/index.js https://example.com/article --config .pdfyrc