Expand description
CLI output formatting for all pipeline stages.
§Information-First Display
Output is information-centric, not file-centric. The primary display
for every entity (album, image, page) is its semantic identity — title and
positional index — with filesystem paths shown as secondary context via
indented Source: lines. This makes the output readable as a content
inventory while still letting users trace data back to specific files.
§Entity Display Contract
Every entity follows a consistent two-level pattern across all stages:
- Header line: positional index + title (+ optional detail like photo count)
- Context lines: indented
Source:,Description:, variant status, etc.
Shared helpers ([entity_header], [image_line]) enforce this pattern so
scan, process, and generate output look consistent for the same entities.
§Output Format
§Scan
Albums
001 Landscapes (5 photos)
Source: 010-Landscapes/
001 dawn
Source: 001-dawn.jpg
Description: 001-dawn.txt
002 mountains
Source: 010-mountains.jpg
Pages
001 About
Source: about.md
Config
config.toml
assets/§Process
Landscapes (5 photos)
001 dawn
Source: 001-dawn.jpg
800px: cached
1400px: encoded
thumbnail: cached§Generate
Home → index.html
001 Landscapes → Landscapes/index.html
001 dawn → Landscapes/1-dawn/index.html
002 mountains → Landscapes/2-mountains/index.html
Pages
001 About → about.html
Generated 2 albums, 4 image pages, 1 page§Architecture
Each stage has a format_* function (returns Vec<String>) for testability
and a print_* wrapper that writes to stdout. Format functions are pure —
no I/O, no side effects.
Functions§
- format_
generate_ output - Format generate stage output showing generated HTML files.
- format_
process_ event - Format a single process progress event as display lines.
- format_
scan_ output - Format scan stage output showing discovered gallery structure.
- print_
generate_ output - Print generate output to stdout.
- print_
scan_ output - Print scan output to stdout.