feat: productionize PageStack CLI with config, dry-run, verbose logs, and Docker/Compose workflow#1
Open
ganeshwhere wants to merge 1 commit into
Open
Conversation
…r workflow Refactor the old monolithic script into focused modules (cli, config, fetcher, epub_builder, url_utils, logging_utils, ui) while preserving backward compatibility. Add modern CLI behavior: - progress bar during URL processing (tqdm) - colored terminal output and spinner (rich with fallback) - --verbose detailed logs - --dry-run validation/preview mode - --config YAML defaults - retries/timeout controls and improved error handling - final execution summary (processed, failed, output, elapsed) Keep legacy usage working: - pagestack urls.txt [output.epub] - python src/pagestack/main.py ... Add containerized DX: - Dockerfile and .dockerignore - docker-compose service - Makefile shortcuts including recommended best/best-dry-run/best-build aliases - CA bundle passthrough for corporate/proxy environments Update docs/examples and packaging: - README with old + new usage - examples/config.yaml - dependency updates (rich, tqdm, PyYAML, chardet<6) - ignore generated .epub artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR evolves PageStack from a single-script utility into a production-ready CLI with modular architecture, better developer experience, and containerized workflows.
What changed
cli.py,config.py,fetcher.py,epub_builder.py,url_utils.py,logging_utils.py,ui.pypagestack urls.txtpagestack urls.txt output.epubpython src/pagestack/main.py ...tqdmrich(with plain fallback)--verbosedetailed logs--dry-runURL validation and inclusion preview without EPUB generation--configYAML defaults for title/author/output/timeout/retriesDockerfile,.dockerignore,docker-compose.ymlmake best-build,make best-dry-run,make bestREQUESTS_CA_BUNDLE/SSL_CERT_FILEREADME.mdexamples/config.yamlexamples/urls-smoke.txtPyYAML,rich,tqdmchardet<6to avoid requests warning noise*.epubto.gitignoreBackward compatibility
No breaking CLI behavior for existing users. New features are additive.
Validation performed
python3 -m compileall srcmake dry-runmake best-dry-runmake best OUTPUT=smoke.epub URLS=examples/urls-smoke.txtmake compose-buildmake docker-buildmake docker-dry-runNotes
In corporate/proxy TLS environments, set:
REQUESTS_CA_BUNDLESSL_CERT_FILEbefore docker/compose runs.