diff options
Diffstat (limited to 'lib/render/emit_csv.ml')
| -rw-r--r-- | lib/render/emit_csv.ml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/render/emit_csv.ml b/lib/render/emit_csv.ml index 415a684..e04211f 100644 --- a/lib/render/emit_csv.ml +++ b/lib/render/emit_csv.ml @@ -21,7 +21,25 @@ let s v k = match get v k with Some (T.Str x) -> x | _ -> "" lang-keyed object -- the [name_la]/[name_en] pair this replaces carried the kernel's own [Celebration.names], a different, unlocalised source. Machine formats still carry [slug] alongside it, so a script keeps the - stable key and a human reads the name. *) + stable key and a human reads the name. + + W5: deliberately NOT widened with a "second" column, unlike + [Emit_xml]/[Emit_ics] (each a repeated-element/free-text format that + grows for free). A CSV's header row is a CONTRACT with every row under + it (RFC 4180 sec. 2: "each field in the header... should contain the + same number of fields as the records"), so there is no way to add a + column only on the days that carry a [Second] reading -- a real + three-citation day would either need an ALWAYS-present, mostly-empty + "second" column (widening every EF row forever for a case EF can never + hit) or genuinely variable-width rows (not CSV). Neither is a change to + make speculatively: [bin/main.ml]'s [reject_rite_for] refuses [--rite] + on `emit` entirely for any rite but EF, so no [Second] reading can reach + this module today, and EF's own [citations] is always exactly + [[First; Gospel]] ({!Rite_ef}'s own [citation_shapes]) -- there is + nothing to widen FOR yet. When OF is admitted here, this is the one + emitter that needs a deliberate, disclosed breaking change (a new + column, a version bump, or a documented "third reading silently + dropped" trade-off), not a silent one. *) let columns = [ "date"; "rite"; "season"; "season_name"; "week"; "slug"; "name"; "weekday"; "rank"; "rank_name"; "colour"; "colour_name"; "subject"; "first"; "gospel"; "comms" ] |
