diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-24 10:36:25 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-24 10:36:25 +0300 |
| commit | 6dfc0f1a9521cc4afe4941fc1328eec014b760a7 (patch) | |
| tree | 4303307c104aa9dbe84e906eb9c0f1dd279469d9 /src/lib/stats-render.source.sh | |
| parent | 99c5241d853daceb8cfaec91023730ff062858b7 (diff) | |
Promote single canonical identify-stream EXIF parser into metadata-cache (8r0)
The `identify -verbose` EXIF-line regex and its array-fill loop were
duplicated in three places that had already drifted: album-metadata's
photo_exif_details_html and _photo_exif_values_to (exif: only) and
stats-aggregate's _stats_parse_identify_stream (exif: plus a native
Geometry -> __geometry path).
Promote one canonical parser, photo_exif_values_to, into
metadata-cache.source.sh next to its sibling cache primitive
cached_photo_identify_output. It reads an identify stream from stdin and
fills a nameref associative array; it is a strict superset of all three
former sites (bare exif: tag keys plus the synthetic __geometry key).
- stats accumulate_photo_stats now calls photo_exif_values_to (stdin);
_stats_parse_identify_stream is removed.
- album _photo_exif_values_to is a thin wrapper that pipes
cached_photo_identify_output through the canonical parser.
- album photo_exif_details_html consumes the same parser and skips the
__geometry key it does not display.
metadata-cache is sourced before both consumers in LIB_SOURCES, so the
canonical parser is available at use time. Regenerated bin/shuriken via
`just build`. Added test_shared_identify_parser_returns_exif_and_geometry
asserting one parse yields both an exif: key and __geometry.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'src/lib/stats-render.source.sh')
0 files changed, 0 insertions, 0 deletions
