This project follows Semantic Versioning.
1.6.3 - 2026-03-05
- Duplicate PDF files in batch mode: On Windows, case-insensitive glob caused
*.pdfand*.PDFto match the same files, resulting in duplicate processing; now deduplicated via set union
1.6.2 - 2026-03-05
- i18n: Default CLI output now in English for internationalization; use
--chtflag for Traditional Chinese messages - i18n module: New
ebook_crop/i18n.pywith EN/CHT message dictionaries andt()translation function
1.6.1 - 2026-03-05
- Auto-margin result display: Show per-file detection summary (crop count, margin ranges) after processing; per-page details available with
-v
1.6.0 - 2026-03-05
- Auto-detect margins:
[auto_margins] enabled = trueauto-detects content boundaries per page via PyMuPDF text/drawing/image extraction;[margins]ignored when enabled - Offset fine-tuning:
[auto_margins]left/right/top/bottom offset values for post-detection adjustment - automargin.py: New module for content boundary detection and auto-crop
- Auto-margin tests: 16 tests in
test_automargin.py, total tests now 124
1.5.1 - 2026-03-05
- Test directory: Moved test data from
test/input/totests/input/andtest/output/totests/output/for consistency with pytest convention
1.5.0 - 2026-03-05
- pytest framework: Full test suite with 108 tests across 5 test modules
- Config unit tests: Tests for
parse_rotation_list,format_rotation_display,format_margins_display,load_config,convert_margin_value,validate_config(53 tests) - Rotation unit tests: Tests for
_get_rotated_page_rect, dimension swap,build_pdf_with_rotation(15 tests) - Crop unit tests: Tests for
_apply_cropboundary conditions,crop_pdf(11 tests) - Integration tests: End-to-end workflows and CLI integration (
--version,--help,--dry-run,-v,-q) (12 tests) - Edge case tests: Single page, small page, landscape, large files (50 pages), rotation edge cases (17 tests)
- CI test pipeline: pytest added to CI on Python 3.10/3.11/3.12 with coverage
- Code coverage: pytest-cov integrated, coverage reporting in CI (config 97%, crop 98%, rotation 100%)
- Sample PDFs and test configs:
tests/input/withbasic_5page.pdf,single_page.pdf,ten_pages.pdf,landscape.pdf,small_page.pdf, and test TOML configs
- CI workflow: Now includes pytest with coverage on Python 3.10/3.11/3.12
1.4.0 - 2026-03-05
--versionflag: Display current version (ebook_crop.__version__)- Progress bar: Rich progress bar during batch processing
- Verbose/quiet mode:
-v/--verbosefor detailed logs,-q/--quietfor silent mode - Dry-run mode:
--dry-runto preview settings and affected pages without processing - Margin unit support: Config accepts
cm,mm,in/inch,ptsuffixes (e.g."1cm","10mm","0.5in","36pt") in addition to plain numbers - Config validation: Validates config values on load with clear error messages for invalid margins, page ranges
- Colored terminal output: Warnings in yellow, errors in red, success in green (via
rich) console.pymodule: Terminal output module handling colored output, progress bar, and verbosity control
- CLI output: Now uses
richfor colored formatting
1.3.0 - 2026-03-05
- Feature roadmap:
docs/ROADMAP.mdanddocs-cht/ROADMAP.mdwith phased development plans covering testing, UX, core features, advanced features, and ecosystem - CLAUDE.md: Claude Code guidance file for AI-assisted development
- Technical docs: Updated extension suggestions (section 6) to reference ROADMAP, added file list entries for new docs
- Documentation index: Added ROADMAP links to
docs/README.mdanddocs-cht/README.md - Security policy: Updated supported versions table for 1.3.x
1.2.0 - 2026-03-05
- Internationalization: English documentation for international contributors
- docs-cht/: Traditional Chinese technical documentation directory
- docs/: English technical documentation
- *-CHT.md: Root-level Traditional Chinese docs (README-CHT, CONTRIBUTING-CHT, SECURITY-CHT, CODE_OF_CONDUCT-CHT, HISTORY-CHT)
1.1.1 - 2026-03-05
- CI: Use
uv run ebook-cropinstead of direct execution to fix PATH in GitHub Actions
1.1.0 - 2026-03-05
- Modular split: Split
main.pyintocli.py,config.py,rotation.py,crop.py,utils.pywith clear responsibilities
1.0.0 - 2026-03-05
- Margin cropping: Configurable top/bottom/left/right margin crop amounts for better ebook layout
- Page range: Start/end page settings; optionally skip cover and back cover
- Page rotation: Arbitrary-angle rotation for specified pages
- Rotation config format:
- Single:
page = 3 - Multiple:
pages = "1,3,5"orpages = [1, 3, 5] - Range:
pages = "3-9" - To last:
pages = "3-0"(0 = last page) - Full:
pages = "0-0" - Skip:
skip = 1for every other page
- Single:
- Batch mode: Processes all PDFs in
input/when no args given - Config traceability: Copies config as
filename.tomlto output directory - Config template:
config-sample.toml; localconfig.tomlgitignored
- Windows console Unicode encoding (
_safe_print) - Process exit and resource cleanup (try/finally, garbage=1)
- Start page description (0 and 1 both mean crop from cover)
- Python 3.10+
- PyMuPDF 1.24+
- TOML config (tomli)
- uv environment management
0.1.0 - Initial release
- Basic PDF margin cropping
- config.toml margin settings
- Single-file and batch processing