Skip to content

ENH: Add --output-dir option to extract-images - #300

Merged
MartinThoma merged 2 commits into
py-pdf:mainfrom
dbdefault:joons-pr/195-py-pdf-pdfly-195
Nov 15, 2026
Merged

MartinThoma merged 2 commits into
py-pdf:mainfrom
dbdefault:joons-pr/195-py-pdf-pdfly-195

Conversation

@dbdefault

Copy link
Copy Markdown
Contributor

Closes #195

Adds an --output-dir option to pdfly extract-images, as agreed in the issue.

  • The directory is created (including parents) if it does not exist.
  • Without the option nothing changes: images are written to the current directory and printed with the same relative paths as before.
  • Added tests for the new option; the module docstring shows the new usage.

Checks run locally: the full test suite (python -m pytest, with the sample-files submodule), ruff check, ruff format --check and mypy on the package.

AI disclosure: this change was prepared with AI assistance (Claude and Codex, per AGENTS.md the commit carries a Co-authored-by trailer). I reviewed the diff and ran the checks above before submitting. Note that the issue had an earlier offer from @papametis that did not lead to a PR; happy to adjust or close if they have one in progress.

dbdefault and others added 2 commits November 15, 2026 05:55
Allow choosing the directory where extracted images are written. The
directory is created if needed; without the option the images are still
written to the current directory and printed with relative paths.

Closes #195

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
@MartinThoma
MartinThoma enabled auto-merge (squash) November 15, 2026 09:30
@MartinThoma

Copy link
Copy Markdown
Member

Thank you for your contribution! The change looks good 👍

@MartinThoma
MartinThoma merged commit a33cb71 into py-pdf:main Nov 15, 2026
22 checks passed
@MartinThoma MartinThoma mentioned this pull request Nov 15, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Add option to specify a folder to extract the images

2 participants