Repository navigation
DOC: Fix outdated CLI help in the docs and the Read the Docs build - #306
Merged
Merged
Conversation
The help of both commands was the module docstring, which still described the Python module instead of the command: * 2-up showed "usage: python 2-up.py input_file output_file" from the time it was a standalone script, and called its output "booklet-style", which is confusing next to the booklet command. * uncompress said "Module for uncompressing PDF content streams." The docstrings now describe what the commands do, and give an example. The help shown in the README and the docs is regenerated from the CLI. Closes #289 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Read the Docs builds all formats, including the PDF, and fails the whole build if the PDF cannot be built. pdflatex fails on the box-drawing characters of the `--help` output and on the SVG badges. * Build the PDF with XeLaTeX, which can render the box-drawing characters * Show the badges and the star history only in the HTML output The docs have not been built on Read the Docs since 2026-02-02. The missing myst_parser was fixed by installing the docs dependency group in ec0fb22, which was not built on Read the Docs yet. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The `pdfly ... --help` output shown in the README and the docs was written by hand and got outdated: 10 of the 16 blocks did not match the CLI, e.g. extract-images did not show --output-dir and the page ranges. docs/check_cli_help.py runs every documented `pdfly ... --help` command and compares the output with the docs. With --fix, it updates them. The output depends on the typer and rich versions, so CI and the pre-commit hook run it with `uv run --frozen` to use those of uv.lock. The outdated blocks are updated, and the description of extract-images no longer says that it extracts text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
MartinThoma
added a commit
that referenced
this pull request
Nov 15, 2026
## What's new ### New Features (ENH) - Show the permissions of encrypted PDFs in meta (#310, #311) by @MartinThoma - Add --output-dir option to extract-images (#300) by @dbdefault ### Bug Fixes (BUG) - Keep the order of the input pages in x2pdf (#307) by @MartinThoma ### Documentation (DOC) - Check the help of all commands in the docs (#309) by @MartinThoma - Add diagrams for 2-up, booklet, cat, rm and rotate (#308) by @MartinThoma - Fix outdated CLI help in the docs and the Read the Docs build (#306) by @MartinThoma ### Developer Experience (DEV) - Keep minimum Python in CI and widen uv_build range in Renovate (#303) by @MartinThoma - Rework release process and switch build backend to uv_build (#301) by @MartinThoma ### Maintenance (MAINT) - Update softprops/action-gh-release digest to 8a0cd65 (#286) by @renovate[bot] - Update dependency uv_build to >=0.13.8,<0.14 (#302) by @renovate[bot] [Full Changelog](0.6.0...0.7.0)
ijazabdullah127
added a commit
to ijazabdullah127/pdfly
that referenced
this pull request
Nov 15, 2026
Merge main and keep the command descriptions introduced in py-pdf#306. Update the regression assertions to match those descriptions and record the test coverage under Unreleased instead of claiming another fix. Related to py-pdf#289. Co-authored-by: Codex <[email protected]>
4 tasks done
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.
This PR fixes documentation-related issues.
1. Fix the help texts of
2-upanduncompress(#289)Both commands use their module docstring as
--helptext. Those docstrings described the Python module, not the command:2-upprintedusage: python 2-up.py input_file output_file, left over from when it was a standalone script. It also called its output "booklet-style", which is confusing next tobooklet.uncompresssaid "Module for uncompressing PDF content streams."The new docstrings say what each command does and give an example. The
uncompresstext says that only page content streams are uncompressed, not fonts or images.Closes #289
2. Fix the PDF build on Read the Docs
The docs have not been built on Read the Docs since 2026-02-02. The
myst_parsererror was already fixed in ec0fb22. A second error was hidden behind it:formats: allalso builds a PDF, and pdflatex fails on the box-drawing characters of the--helpoutput and on the SVG badges. Read the Docs fails the whole build when the PDF fails.latex_engine = "xelatex")I built HTML, EPUB and PDF locally with the same commands as Read the Docs, and all three succeed.
3. Check the documented CLI help in CI and pre-commit
The
--helpoutput in the docs was copied by hand. 10 of the 16 blocks no longer matched the CLI. For example,extract-imagesdid not show--output-diror page ranges.docs/check_cli_help.pyruns every documentedpdfly ... --helpcommand and compares the output with the docs. It runs in the CIdocsjob and as a pre-commit hook. To update the docs after changing a command:The output depends on the typer and rich versions, so CI and the hook both run with
uv run --frozen, which uses the versions inuv.lock. As a result:uvinstalled for the pre-commit hook.--fixcommand on that branch fixes it.After merging
Read the Docs has turned off automatic builds after the repeated failures. I need to start a build by hand from the Read the Docs dashboard.