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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user