# Stats aggregation for the album stats page (feature plan: # /home/paul/.pi/plans/shuriken-stats-site.md, field audit: # docs/stats-exif-audit.md). This module turns the per-photo # `identify -verbose` output that album.source.sh already caches into # aggregated, photographer-friendly counters. # # Scope: aggregation only. Rendering (stats.tmpl / camera.tmpl) lives in the # sibling tasks pm0/rm0/um0; this module just fills the data structures they # read. # # ---------------------------------------------------------------------------- # Public API / handoff contract # ---------------------------------------------------------------------------- # collect_photo_exif_stats iterates the album's photos and fills these globals # (all declared with `declare -gA` so the render tasks can read them after the # call without namerefs): # # STATS_CAMERAS[] = count (camera leaderboard) # STATS_LENSES[] = count (sparse; may be empty) # STATS_YEARS[] = count # STATS_MONTHS[<01..12>] = count # STATS_APERTURE[] = count (e.g. "f/2.8") # STATS_SHUTTER[] = count (e.g. "1/250s") # STATS_ISO[] = count (e.g. "400") # STATS_FOCAL[] = count (e.g. "35-70mm") # STATS_MEGAPIXELS[] = count (e.g. "10-20MP") # STATS_ASPECT[] = count (e.g. "3:2") # STATS_ORIENTATION[] = count (Landscape/Portrait/Square) # STATS_FORMAT[] = count (JPEG/PNG/WEBP/GIF) # STATS_EXPOSURE_PROGRAM[