Repository navigation
pdf-compressor is now a Rust CLI (c3276f5, janosh/pdf-compressor#31). Install with cargo install pdf-compressor.
Highlights
- Parallel uploads (up to 4 at a time) streamed from disk, with a progress line in terminals
- All inputs are validated before any upload, so typos don't cost API quota: an output that would overwrite an input or another output, missing paths, a bad suffix or stats path
- Atomic writes.
--inplacemoves originals to the system trash on macOS, Windows and Linux, and keeps their file permissions - Uploads are named
0.pdf,1.pdf, … so local file paths never reach iLovePDF - The API key is read from
ILOVEPDF_PUBLIC_KEYor~/.config/pdf-compressor/api-key, written owner-only by--set-api-key. A missing key gives a clear error instead of a bareKeyError(thanks @Qrytics)
Breaking changes
- The Python API (
compress(),Compress,ILovePDF) is removed; use the CLI - Re-run
--set-api-keyonce, or setILOVEPDF_PUBLIC_KEY: the old.envlocation is no longer read - Removed
--debug,--verbose,--on-no-filesand--on-bad-files. Finding no PDFs exits 0 silently, and a non-PDF input is an error --outdirnow writes the outputs there--write-stats-pathwrites CSV only- Only
.pdffiles are picked up, not.pdfaor.pdfx
See the readme's "Migrating from v0.4 (Python)" section for details.