diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-21 12:19:43 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-21 12:19:43 +0200 |
| commit | 055deaedd6bc1acb770bd96b7da8f985ab0f4f0b (patch) | |
| tree | 6b453cd7a8fcaa7f8e4e257fa46c6a720778e8f4 /test/cli.t | |
| parent | aaf3dc5ba55d46b6b318bb761305013f4c533b26 (diff) | |
| download | colitur-055deaedd6bc1acb770bd96b7da8f985ab0f4f0b.tar.gz colitur-055deaedd6bc1acb770bd96b7da8f985ab0f4f0b.zip | |
feat(config): flavour is settable, and an INI overlay is diagnosed
The escaping flavour was the one rendering setting with no config key,
so a template whose extension says nothing needed the flag every run.
Unset still means infer, which config --show reports as (infer) rather
than (none).
Backfills the 0.8.0 and 0.9.0 changelog entries. Both were tagged by
hand rather than through 'make release', which is precisely the guard
that would have refused a release with no changelog line.
Diffstat (limited to 'test/cli.t')
| -rw-r--r-- | test/cli.t | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -1270,6 +1270,20 @@ slug the engine can produce over 2020-2045: partial.ini: 1 of 725 celebrations named, 724 missing, 0 unknown partial.ini: 0 of 104 book names, 104 missing +`flavour` decides how a template's output is ESCAPED. It is normally inferred +from the template's own extension, so the key exists for the template whose +extension says nothing -- and getting it wrong yields malformed output rather +than ugly output, which is why there is no silent fallback: + + $ printf '{{#days}}{{name}}\n{{/days}}' > t.noext + $ colitur table --year 2027 --template t.noext + colitur: cannot infer a flavour from ".noext"; pass --flavour latex|typst|groff|html|xml|ics|none + [2] + + $ mkdir -p xdg-fl/colitur && printf '[defaults]\nflavour = html\n' > xdg-fl/colitur/config.ini + $ XDG_CONFIG_HOME=xdg-fl colitur table --year 2027 --template t.noext | head -1 + In Octava Nativitatis Domini + An INI overlay handed to `--overlay` is DIAGNOSED, not left to fail inside the sexp reader. The INI form is a source format that `colitur convert` turns into the S-expression one; feeding it directly otherwise produced "more than one @@ -1322,6 +1336,7 @@ literally either): lang la (default) template (none) (default) format (none) (default) + flavour (infer) (default) sigla_style la (default) sigla_book abbr (default) sigla_tradition vulgate (default) @@ -1336,6 +1351,7 @@ listed one line per effective entry instead: lang fr (flag) template (none) (default) format (none) (default) + flavour (infer) (default) sigla_style fr (default) sigla_book abbr (default) sigla_tradition vulgate (default) @@ -1354,6 +1370,7 @@ differently from a misspelled key inside a recognised one: lang en (config) template (none) (default) format (none) (default) + flavour (infer) (default) sigla_style en (default) sigla_book abbr (default) sigla_tradition vulgate (default) @@ -1374,6 +1391,7 @@ the config file the earlier examples left behind: lang la (default) template (none) (default) format (none) (default) + flavour (infer) (default) sigla_style pl (flag) sigla_book full (flag) sigla_tradition modern (flag) @@ -1410,6 +1428,7 @@ sidesteps that same non-portability: lang la (default) template (none) (default) format (none) (default) + flavour (infer) (default) sigla_style la (default) sigla_book abbr (default) sigla_tradition nonsense (flag) |
