Add JSON output format for programmatic access

Implements structured JSON output with hierarchical schema including
book metadata, chapters, verses, and footnotes. All existing flags
(-F, -g, -L) are respected in JSON mode.
This commit is contained in:
2025-12-16 18:49:27 +01:00
parent 6432d37df3
commit 7ef782dda2
3 changed files with 228 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ show_help() {
echo " -F no footnotes"
echo " -g show only German (no Latin)"
echo " -L show only Latin (no German)"
echo " -j output as JSON"
echo " -h show help"
echo
echo " Reference types:"
@@ -85,6 +86,9 @@ while [ $# -gt 0 ]; do
elif [ "$1" = "-L" ]; then
export ALLIOLI_ONLY_LATIN=1
shift
elif [ "$1" = "-j" ]; then
export ALLIOLI_JSON_OUTPUT=1
shift
elif [ "$1" = "-h" ] || [ "$isFlag" -eq 1 ]; then
show_help
else