Commit Graph

22 Commits

Author SHA1 Message Date
Dan Church 44308e890f
Check qpdf is available before starting 2023-04-21 10:50:16 -05:00
Dan Church 7da19cfaf3
Use numfmt instead of custom byte-counting 2023-04-21 10:48:12 -05:00
Dan Church 8dcfacd5d7
Update 'mktemp' invocation
Turns out using "-t TEMPLATE" instead of "TEMPLATE" is causing TMPDIR to
override the setting from `-p`, which is the opposite of what the man
page says it does.
2023-03-27 11:32:18 -05:00
Dan Church 4dd8e17f0b
Fix inconsistent script exit codes
Exit 2 always in invalid argument situations.
2023-03-27 11:03:24 -05:00
Dan Church 2497e27b04
Avoid creating temp files until necessary
For instance, if one ran "optipdf --help" it would create and delete an
empty directory in /tmp.
2023-03-27 11:07:14 -05:00
Dan Church 18515e5794
Add README 2022-10-31 16:40:34 -05:00
Dan Church 8da1867f3e
Bump copyright date 2022-10-31 16:20:02 -05:00
Dan Church fdbe2fdb88
Exit with error if no files are specified 2022-10-31 16:20:02 -05:00
Dan Church 306fb7e8c9
Use a temp directory for temporary files 2022-10-31 16:20:02 -05:00
Dan Church c7e6ff5a3e
Flatten image rotation too
Not sure how much space this saves, but it's work a shot.
2022-10-31 16:20:02 -05:00
Dan Church 96395f92e7
Add help message 2022-10-31 16:20:02 -05:00
Dan Church 83aa3cf9ba
Change default backup behavior to not keep backups 2022-10-31 16:20:02 -05:00
Dan Church a2fa55f3ec
Add --{,no-}preserve-timestamp options 2022-10-31 16:20:02 -05:00
Dan Church 10c5059c1c
Improve specificity of options
Separate --(no-)force, --(no-)careful into separate options.
2022-10-31 16:20:02 -05:00
Dan Church 39a38de4d1
Support script arguments 2022-10-31 16:20:02 -05:00
Dan Church 191d91a1a8
Add support for ignoring errors 2022-10-31 16:13:39 -05:00
Dan Church 38411917a9
Add more qpdf options for smaller file sizes 2022-10-31 16:13:39 -05:00
Dan Church a6a00d300c
Support keeping backups of old files 2022-10-31 16:13:39 -05:00
Dan Church 5b63a4c4df
Don't use more than one temp file 2022-10-31 16:13:39 -05:00
Dan Church d7a4fc9b8e
Output number of freed bytes instead of success 2022-10-31 16:13:39 -05:00
Dan Church 2f28fb41e8
Add LICENSE 2022-10-31 16:13:39 -05:00
Dan Church ef32d67491
Initial commit 2022-10-31 16:13:39 -05:00