Commit Graph
12 Commits
Author SHA1 Message Date
poprhythm 8670eb372f Add bats tests for zip_images_resize_recursive.sh 2026-07-03 19:52:00 -04:00
poprhythm f5ed6617c5 Add bats test suite for image processing scripts
Tests cover skip-already-processed logic, cleanup, idempotency, and
the config.sh single-source-of-truth invariant. bats-core, bats-assert,
and bats-support added as submodules under tests/libs/.
2026-07-03 19:49:04 -04:00
poprhythm 6901c66bcf Skip already-processed ZIPs by sampling first JPEG comment
Extracts one JPEG from each ZIP to check for the processing comment
before doing a full extract/resize/rezip cycle. Shared constants moved
to config.sh as single source of truth. Trap and cleanup extended to
cover the sample temp file.
2026-07-03 19:32:04 -04:00
poprhythm 2ed392d466 Skip images already processed by checking embedded JPEG comment
Replace pixel dimension check with a JPEG comment check. Processed
files are marked with 'magick:resize=8mp,quality=85,sampling=4:2:0'
via -set comment after -strip, so future runs skip them entirely.
2026-05-02 19:32:18 -04:00
poprhythm fff8e346ad Make scripts generic and fix several bugs
- Add optional directory argument to images_resize_recursive.sh,
  zip_images_resize_recursive.sh, and new rar2zip_recursive.sh
- Remove hardcoded-path wrappers rar2zip_images.sh and rar2zip_incomplete.sh
- Fix zip_images_resize.sh: move SCRIPT_DIR to top, change exit 1 to
  continue on bad output file so remaining files still process
- Use MAX_PIXELS variable in images_resize.sh resize argument
- Fix zip_images_recursive.sh: replace case-sensitive 7z globs with
  find -iregex piped via xargs
2026-05-01 21:58:31 -04:00
poprhythm 651cccc21c Fix pixel check to use integer width/height instead of fx expression
The fx:w*h format returned floats in scientific notation which broke
bash arithmetic comparison. Read %w and %h separately instead.
2026-05-01 21:51:08 -04:00
poprhythm cc9353cd61 Skip images already within pixel limit
Check pixel count before processing and skip files that are already at or below 8MP, avoiding unnecessary re-compression.
2026-05-01 21:44:01 -04:00
poprhythm 97ba5eac6a Improvements 2025-11-27 04:22:46 +00:00
poprhythm dba00da901 Add some status and safety checks 2025-11-27 03:21:45 +00:00
poprhythm 52572ef7ee Use relative paths for scripts 2025-11-27 02:42:20 +00:00
poprhythm c4528f1319 Refactor 2025-11-27 02:33:17 +00:00
poprhythm 76c81548bf Initial commit 2025-11-26 19:57:06 -05:00