aboutsummaryrefslogtreecommitdiff
path: root/lib/naming/config.ml
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-20 19:05:13 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-20 19:05:13 +0200
commit7dbd16cdf5880c0006dffacd09214ee607050b64 (patch)
tree01e1ee37a2be97a0b06fad70de975d8007beb702 /lib/naming/config.ml
parent1aeca948c2a2a82bffaaec65077140aa05f7b3f4 (diff)
parent1da70dc7ac03fe33fb92b172a0e26932764170d6 (diff)
downloadcolitur-7dbd16cdf5880c0006dffacd09214ee607050b64.tar.gz
colitur-7dbd16cdf5880c0006dffacd09214ee607050b64.zip
Merge branch 'citations-and-sigla'
Citations are parsed into structure and re-rendered, so book names, abbreviations, punctuation style and numbering tradition become files a user edits rather than strings frozen in the data. New lib/citation (Book, Parse, Render, Sigla); [bible] and [sigla] sections in language files; lang/traditions.ini for numbering; three config keys and CLI flags. --raw emits every citation byte-for-byte as stored, bypassing the whole pipeline, so output stays diffable against lectio and the raw view does not depend on the parser being correct.
Diffstat (limited to 'lib/naming/config.ml')
-rw-r--r--lib/naming/config.ml13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/naming/config.ml b/lib/naming/config.ml
index 7d87d62..068b40a 100644
--- a/lib/naming/config.ml
+++ b/lib/naming/config.ml
@@ -5,18 +5,24 @@ type t = {
overlays : string list;
template : string option;
format : string option;
+ sigla_style : string option;
+ sigla_book : string option;
+ sigla_tradition : string option;
unknown_keys : string list;
unknown_sections : string list;
}
let empty =
- { lang = None; overlays = []; template = None; format = None; unknown_keys = [];
- unknown_sections = [] }
+ { lang = None; overlays = []; template = None; format = None; sigla_style = None;
+ sigla_book = None; sigla_tradition = None; unknown_keys = []; unknown_sections = [] }
let lang t = t.lang
let overlays t = t.overlays
let template t = t.template
let format t = t.format
+let sigla_style t = t.sigla_style
+let sigla_book t = t.sigla_book
+let sigla_tradition t = t.sigla_tradition
let unknown_keys t = t.unknown_keys
let unknown_sections t = t.unknown_sections
@@ -65,6 +71,9 @@ let of_string text =
| "lang" -> { acc with lang = Some v }
| "template" -> { acc with template = Some v }
| "format" -> { acc with format = Some v }
+ | "sigla_style" -> { acc with sigla_style = Some v }
+ | "sigla_book" -> { acc with sigla_book = Some v }
+ | "sigla_tradition" -> { acc with sigla_tradition = Some v }
(* accumulates: a user has more than one overlay *)
| "overlay" -> { acc with overlays = v :: acc.overlays }
| other -> { acc with unknown_keys = other :: acc.unknown_keys })