5
2
mirror of https://github.com/getbible/v2_builder.git synced 2024-11-23 19:17:33 +00:00

Updated the API URL

This commit is contained in:
Llewellyn van der Merwe 2023-05-31 16:49:24 +02:00
parent afe49bfafe
commit 747243ccca
Signed by: Llewellyn
GPG Key ID: A9201372263741E7
4 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@ for filename in $target_folder/*.json; do
# get the hash
fileHash=$(sha1sum "${target_folder}/${abbreviation}/${nr}.json" | awk '{print $1}')
# build the return values
book=$(echo "${book}" | jq ". | del(.chapters) | .[\"url\"]=\"https://getbible.net/v2/${abbreviation}/${nr}.json\" | .[\"sha\"]=\"${fileHash}\"" -a)
book=$(echo "${book}" | jq ". | del(.chapters) | .[\"url\"]=\"https://api.getbible.net/v2/${abbreviation}/${nr}.json\" | .[\"sha\"]=\"${fileHash}\"" -a)
# load the values for json
jq_t_args+=(--arg "key$nr" "$nr")
jq_t_args+=(--argjson "value$nr" "$book")

View File

@ -82,7 +82,7 @@ for filename in $target_folder/*.json; do
# get the hash
fileHash=$(sha1sum "${target_folder}/${abbreviation}/${nr}/${chapter}.json" | awk '{print $1}')
# load the book in
chapter_info=$(cat "${target_folder}/${abbreviation}/${nr}/${chapter}.json" | jq ". | del(.verses) | .[\"url\"]=\"https://getbible.net/v2/${abbreviation}/${nr}/${chapter}.json\" | .[\"sha\"]=\"${fileHash}\"" -a)
chapter_info=$(cat "${target_folder}/${abbreviation}/${nr}/${chapter}.json" | jq ". | del(.verses) | .[\"url\"]=\"https://api.getbible.net/v2/${abbreviation}/${nr}/${chapter}.json\" | .[\"sha\"]=\"${fileHash}\"" -a)
# load the values for json
jq_t_args+=(--arg "key$chapter" "${chapter}")
jq_t_args+=(--argjson "value$chapter" "${chapter_info}")

View File

@ -63,7 +63,7 @@ for filename in $target_folder/*.json; do
# get the hash
fileHash=$(sha1sum "${filename}" | awk '{print $1}')
# build the return values
bible=$(echo "${bible}" | jq ". | del(.books) | del(.discription) | .[\"url\"]=\"https://getbible.net/v2/${abbreviation}.json\" | .[\"sha\"]=\"${fileHash}\"" -a)
bible=$(echo "${bible}" | jq ". | del(.books) | del(.discription) | .[\"url\"]=\"https://api.getbible.net/v2/${abbreviation}.json\" | .[\"sha\"]=\"${fileHash}\"" -a)
# get the details
language=$(echo "${bible}" | jq '.language' -r)
translation=$(echo "${bible}" | jq '.translation' -r)

View File

@ -62,7 +62,7 @@ def get_bible_dict(source_file, bible_version, output_path, current_counter, nex
# check if this translations was in v1
elif bible_version in v1_translation_names:
try:
v1_book_names = requests.get('https://getbible.net/v1/' + abbreviation + '/books.json').json()
v1_book_names = requests.get('https://api.getbible.net/v1/' + abbreviation + '/books.json').json()
except ValueError:
# no json found
v1_book_names = {}