Add private MEV embedded support

This commit is contained in:
2026-06-14 08:14:27 -05:00
parent 544062902b
commit 42d2587704
6 changed files with 473 additions and 113 deletions
+6 -3
View File
@@ -9,6 +9,7 @@ import cliutils, docopt, zero_functional
import ./api_bible
import ./esv
import ./kjv
import ./mev
proc formatMarkdown(raw, translation: string): string =
var reference = ""
@@ -80,6 +81,8 @@ proc fetchPassages(reference, translation: string, cfg: CombinedConfig): seq[str
cfg.getVal("esv-api-root", "https://api.esv.org"))
of "akjv", "kjv":
kjv.fetchPassages(reference)
of "mev":
mev.fetchPassages(reference)
of "amp", "nkjv", "niv":
api_bible.fetchPassages(
reference,
@@ -92,7 +95,7 @@ proc fetchPassages(reference, translation: string, cfg: CombinedConfig): seq[str
else:
raise newException(ValueError,
"unsupported translation '" & translation &
"'; supported translations: akjv, amp, esv, kjv, nkjv, niv")
"'; supported translations: akjv, amp, esv, kjv, mev, nkjv, niv")
when isMainModule:
const USAGE = """Usage:
@@ -110,8 +113,8 @@ Options:
-t, --translation <translation>
Select a specific translation. Supported values
are 'akjv', 'amp', 'esv', 'kjv', 'nkjv', and
'niv'. Defaults to 'esv'.
are 'akjv', 'amp', 'esv', 'kjv', 'mev',
'nkjv', and 'niv'. Defaults to 'esv'.
--esv-api-token <token> Provide the API token on the command line. By
default this will be read either from the