Skip to content
This repository has been archived by the owner on Dec 29, 2019. It is now read-only.

Commit

Permalink
Added translations file and plain text checksum version
Browse files Browse the repository at this point in the history
  • Loading branch information
Llewellynvdm committed Nov 11, 2018
1 parent 34d1425 commit ec53027
Show file tree
Hide file tree
Showing 4 changed files with 1,250 additions and 4 deletions.
109 changes: 109 additions & 0 deletions checksum
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# filename checksum
1 Afrikaans__Ou_Vertaling__aov__LTR.txt ca17fcfc23ae293c18aa7ecb7c34f2287cf850c2
2 Albanian__Albanian__albanian__LTR.txt e615dc0b55e2ea49296f928516e491b71bd539ec
3 Amharic__Amharic_NT__amharic__LTR.txt 25e631da8a501e383cf838856fb4cdc9a3a58790
4 Amharic__Haile_Selassie_Amharic_Bible__hsab__LTR.txt cc6190e7be632a7db748e44f9a7c2be30c71a5cd
5 Arabic__Smith_and_Van_Dyke__arabicsv__RTL.txt 54419154846b2bfe02151b6b9211a67f9a36f17f
6 Aramaic__Peshitta_NT__peshitta__RTL.txt f8957f55e432949ba9ca8a44880da4ffddd8f4dc
7 Armenian__Eastern_(Genesis_Exodus_Gospels)__easternarmenian__LTR.txt ca9e9c9e8784656b10cd94ec9d2d0ab144d67052
8 Armenian__Western_NT__westernarmenian__LTR.txt 4399fbe9c4242ec2f3a5ddffd552df7660dbceee
9 Basque__(Navarro_Labourdin)_NT__basque__LTR.txt 7ada848a887173b74667968720a155abd1971308
10 Breton__Gospels__breton__LTR.txt 79e7aa90eed9f5ccbba364f766491d9b4f78128d
11 Bulgarian__Bulgarian_Bible_(1940)__bulgarian1940__LTR.txt 81d9acc86e6854d98eed75c0a5fbe503c2e8cca7
12 Chamorro__(Psalms_Gospels_Acts)__chamorro__LTR.txt 0a3775cf1e37b22fc55e1d6599914bd9cdb942c1
13 Chinese__NCV_Simplified__cns__LTR.txt 5562ced87ac498452e6a206d0eb7e89a158bb6b8
14 Chinese__NCV_Traditional__cnt__LTR.txt 8ec88c93838e03e6d876cde7dd581ee693115c8a
15 Chinese__Union_Simplified__cus__LTR.txt bf2e017fdc10bfbfd96c2091ade2943a818b2c81
16 Chinese__Union_Traditional__cut__LTR.txt 89a4808b26f98e0fa9ebe236245c48bb535678a1
17 Coptic__Bohairic_NT__bohairic__LTR.txt 4e8ee35de770fbcd1b8da2674972802161e05cb3
18 Coptic__New_Testament__coptic__LTR.txt df3587aae13ca3e696e7ba4cb78313faf548558f
19 Coptic__Sahidic_NT__sahidic__LTR.txt ad1dce436db76a7ad6dee453ec78298421c4d184
20 Croatian__Croatian__croatia__LTR.txt a711856cc63193d2c6c965239db73276e5fbeb7d
21 Czech__Czech_BKR__bkr__LTR.txt e0bfc99a405ab70f61e0ad686ca2941dcb25931c
22 Czech__Czech_CEP__cep__LTR.txt cdade570b5834e9717f9fca02b973beab1051b8e
23 Czech__Czech_KMS__kms__LTR.txt 42bae4579d036d11dcc8162d74d50fa4d903e767
24 Czech__Czech_NKB__nkb__LTR.txt 6c75b195d2c2cc8e45947b3271c8d2223df4fcde
25 Danish__Danish__danish__LTR.txt 530a8d18a18180254f04994d2cc3733239c191e7
26 Dutch__Dutch_Staten_Vertaling__statenvertaling__LTR.txt 85ee2fb580b18aa80ba55a7d891539b5c933b174
27 English__American_King_James_Version__akjv__LTR.txt 366789d192603211547de545cf113b384922fdd2
28 English__American_Standard_Version__asv__LTR.txt 2822d0e708594582bfc8b4369b42765f72d2e156
29 English__Basic_English_Bible__basicenglish__LTR.txt be7cfa1d19c228c6649195bc27ebfca3d8361c75
30 English__Darby__darby__LTR.txt f91c266344506b502336dedd6fa060c00b245a3c
31 English__Douay_Rheims__douayrheims__LTR.txt 57b60edb3802b89ca2b6480cd1ab384b220928ed
32 English__King_James_Version__kjv__LTR.txt 8bfded0216cc77812dbd9d5448092e5eaaefdfcd
33 English__Webster___s_Bible__wb__LTR.txt 31b6195eed5ca6a76ee59b9ea942e5e8d264e47f
34 English__Weymouth_NT__weymouth__LTR.txt 9839912d5c066009fbf100bf8727bf713a9a691b
35 English__World_English_Bible__web__LTR.txt 3d3ff5540f4d4a6a3f2535b60f1670e0b87593ab
36 English__Young___s_Literal_Translation__ylt__LTR.txt 407edc35dd8df8a702bda77cb977d3ebb37a21fb
37 Esperanto__Esperanto__esperanto__LTR.txt 3ab9ba5f8b90bac483b749727eee262e1a6523d9
38 Estonian__Estonian__estonian__LTR.txt 63f588b12fc48b4f828a825ad0ba9b2315453bbc
39 Finnish__Finnish_Bible_(1776)__finnish1776__LTR.txt d6da8832b893694063424f4c1560cefba173d6bb
40 Finnish__Pyha_Raamattu_(1933_1938)__pyharaamattu1933__LTR.txt 229280f26ccf7c57f180d44521b779fddd69d6f8
41 Finnish__Pyha_Raamattu_(1992)__pyharaamattu1992__LTR.txt 713ca469442a9d1a435abae140b966b0d517582f
42 French__Darby__darby__LTR.txt 8f95741b84d13d02013d98216571ffe5587e7899
43 French__Louis_Segond_(1910)__ls1910__LTR.txt e4c147d1fe05838a930b44f8e4b895cd9f4d97ed
44 French__Martin_(1744)__martin__LTR.txt 1bd9d777ca30a477511dc957ae4df6badadc0735
45 French__Ostervald_(1996_revision)__ostervald__LTR.txt 4843cda7f3a36fd4bd0fdc2fad8815d28867360e
46 Georgian__Georgian_(Gospels_Acts_James)__georgian__LTR.txt addb822140b3bd6aeeb14c0c07a20e6c4ec10dd2
47 German__Elberfelder_(1871)__elberfelder__LTR.txt 81f4b548183678a6e51e06523d22caeadc1f53fd
48 German__Elberfelder_(1905)__elberfelder1905__LTR.txt a7b181df8500a2a4b9f4d5de767770822560bdae
49 German__Luther_(1545)__luther1545__LTR.txt a919b0b1fa07d34136e1d1e9bd19442c863a1a0c
50 German__Luther_(1912)__luther1912__LTR.txt e17d04c9019a1c1546baad850f7ea853a5c5f8c5
51 German__Schlachter_(1951)__schlachter__LTR.txt 2a54204dc23e44bc4ad70b5c140436bf25b1edb5
52 Gothic__Gothic_(Nehemiah_NT_Portions)__gothic__LTR.txt c6066c5a1804e8d6aa920aac2b225680ce4b4307
53 Greek__Greek_Modern__moderngreek__LTR.txt 750a54f6c2ec8738739b354338d4ee14f16c0e9a
54 Greek__NT_Byzantine_Majority_Text_(2000)__byzantine__LTR.txt 196b97888fd48ebc047999a15d2c061d9a347ea9
55 Greek__NT_Byzantine_Majority_Text_(2000)_Parsed__majoritytext__LTR.txt db2808b4ab4005508e208a7f353b0a77bc876a00
56 Greek__NT_Textus_Receptus_(1550_1894)_Parsed__textusreceptus__LTR.txt e05722a177c37ffb2a488e9112330e724b9566d3
57 Greek__NT_Textus_Receptus_(1550_1894)__text__LTR.txt 640893f5bd47ab6b5fb656600020fa92d028b102
58 Greek__NT_Tischendorf_8th_Ed__tischendorf__LTR.txt 776bb4526fe22b48c39c156b249ec3aecc56052b
59 Greek__NT_Westcott_Hort_UBS4_variants_Parsed__westcotthort__LTR.txt 69ff45db9cf2e656172796605051bc5850537cac
60 Greek__NT_Westcott_Hort_UBS4_variants__westcott__LTR.txt 11d230d4d0b07243b2d551396c3c15fa7f61fef2
61 Greek__OT_LXX_Accented__lxx__LTR.txt 66376f27ba0b41a3e889a372774035217d5acbd2
62 Greek__OT_LXX_Accented_Roots_Parsing__lxxpar__LTR.txt 16a351d6444444e321a2aa49ef3820440242476b
63 Greek__OT_LXX_Unaccented__lxxunaccents__LTR.txt e4a52ec53234e584e0d2903f66dd54e67e5e5684
64 Greek__OT_LXX_Unaccented_Roots_Parsing__lxxunaccentspar__LTR.txt 4af16b63c22d9a4145ae09ce63c46ee782d6661f
65 Greek__Textus_Receptus__text__LTR.txt 058576088c36424fcceea83399cb96649767111a
66 Hebrew__Aleppo_Codex__aleppo__RTL.txt edbc62be2c956896f65aaed86cce0a44744e7a9f
67 Hebrew__Hebrew_Modern__modernhebrew__RTL.txt 28f32483d1d6516ae4a42a80850f29a2b5b37c43
68 Hebrew__OT_BHS_(Consonants_and_Vowels)__bhs__RTL.txt 7dcf0a2b1153151264933c9120d24f7a8c2fb965
69 Hebrew__OT_BHS_(Consonants_Only)__bhsnovowels__RTL.txt 0f6d951e0f4f6946b27f908682aeadb317cca5a9
70 Hebrew__OT_Westminster_Leningrad_Codex__codex__RTL.txt c9aacfe1ce7124e07e98caa3408e3b74867a121d
71 Hebrew__OT_WLC_(Consonants_and_Vowels)__wlc__RTL.txt 5e91e56876e63477fcc46d7b6f5250ae5fc5ad2a
72 Hebrew__OT_WLC_(Consonants_Only)__wlcnovowels__RTL.txt fa909d10b2af809ad2e754c9b273c57dfbff60dc
73 Hungarian__Hungarian_Karoli__karoli__LTR.txt fec6a86643366ef035ae80e5392914596dd18180
74 Italian__Giovanni_Diodati_Bible_(1649)__giovanni__LTR.txt 21d5a183386b969515cf775d1a83f565bdecc8c2
75 Italian__Riveduta_Bible_(1927)__riveduta__LTR.txt 3f4550764ce6fd1c3a18d80a6d684232e57ab8c4
76 Kabyle__Kabyle_NT__kabyle__LTR.txt 0c968b878b139b77a0386ac02a5c468b1b692aed
77 Korean__Korean__korean__LTR.txt 49c8ef2329ef5f3ed34d12c4f221615ee5df413b
78 Latin__Nova_Vulgata__newvulgate__LTR.txt 902bdf46b2039e6cba30d4a99a71acfc1484e523
79 Latin__Vulgata_Clementina__vulgate__LTR.txt 8aa835111ec149856ba7dfd0d16703bd053ff1d9
80 Latvian__New_Testament__latvian__LTR.txt 0b1711a8e1addc1b9a97f9bd6ce01a216431bda2
81 Lithuanian__Lithuanian__lithuanian__LTR.txt f6471a4e0d7a493b16e69f891cd87e4bfc604116
82 Manx_Gaelic__Manx_Gaelic_(Esther_Jonah_4_Gospels)__manxgaelic__LTR.txt cdf969944ca9b580d1daa25863869e49997d0f4d
83 Maori__Maori__maori__LTR.txt bcaee7374c9e0f8477917f50ca3e5e376691f309
84 Myanmar_Burmse__Judson_(1835)__judson__LTR.txt b5beb25ef5282127c56aebd41c6e05080be56522
85 Norwegian__Det_Norsk_Bibelselskap_(1930)__bibelselskap__LTR.txt 6d20d86f95c1b8bb4c62fe30a7f4881b2579ef70
86 Portuguese__Almeida_Atualizada__almeida__LTR.txt 13ff5dbfc76a2c120c463267c9bce0ce1867f50d
87 Potawatomi__Potawatomi_(Matthew_Acts)_(Lykins_1844)__potawatomi__LTR.txt 1d0958516f7a51b15ca6eb74ab721c3f928c9d07
88 Romanian__Cornilescu__cornilescu__LTR.txt 7e3ab276a96cc1f8185a0b0505bf150dad987198
89 Romani__Romani_NT_E_Lashi_Viasta_(Gypsy)__rom__LTR.txt 24773dd4e5969f6ede824d70ce95b3a2e5433096
90 Russian__Makarij_Translation_Pentateuch_(1825)__makarij__LTR.txt 0d1e957bf6ba0355d6c292ae244d5f99389ebba3
91 Russian__Synodal_Translation_(1876)__synodal__LTR.txt c607ef453a27872a43055d483b963abb3c8a434b
92 Russian__Victor_Zhuromsky_NT__zhuromsky__LTR.txt e0a6fad43b910be9a666a35cdc16bcd64c3f6b36
93 Scottish_Gaelic__Scots_Gaelic_(Gospel_of_Mark)__gaelic__LTR.txt 64af1417d2c6d18aac735b891a45952ea7342288
94 Spanish__Reina_Valera_(1909)__valera__LTR.txt 268a947e3796c99ce87ba1af722253d2c7b51739
95 Spanish__Reina_Valera_NT_(1858)__rv1858__LTR.txt 81a50011f3cf68ac339e7cf401ba0bfee029fc34
96 Spanish__Sagradas_Escrituras_(1569)__sse__LTR.txt 6454035d4370d7deb441a61e758883ee1d773c45
97 Swahili__Swahili__swahili__LTR.txt bc6ecb64b2cf18a830bce341bbb0f7b43e2f7dfc
98 Swedish__Swedish_(1917)__swedish__LTR.txt 5fe5d1ea7d0e298782f4a2a8a50b1bdf6ad6358c
99 Tagalog__Ang_Dating_Biblia_(1905)__tagalog__LTR.txt bf8bd74234cc41ffff4129bc4b2f2ab601cd6000
100 Tamajaq__Tamajaq_Portions__tamajaq__LTR.txt 332b3140f810c08706676cce033a0c5be0639302
101 Thai__Thai_from_kjv__thai__LTR.txt 54942772cd37e3d8ac5d7158e36d1df767674005
102 Turkish__NT_(1987_1994)__tnt__LTR.txt 6ba9ad0bd0201a56c49692f10c2b48d34a443311
103 Turkish__Turkish__turkish__LTR.txt 596675e89de1d621c6cfb60daf61c90a5e97141e
104 Ukrainian__NT_(P_Kulish_1871)__ukranian__LTR.txt 9033bc93af3d7a77d570281625bd1b5dcb030148
105 Uma__Uma_NT__uma__LTR.txt a09e384df3d932c347b2dd4fcefc0151cddebfe4
106 Vietnamese__Vietnamese_(1934)__vietnamese__LTR.txt a5e2448a3c038dc03eb0bd9676ffb0a777a5996d
107 Wolof__Wolof_NT__wolof__LTR.txt 6a18c1d466215a750ba191be730aad980d7b662a
108 Xhosa__Xhosa__xhosa__LTR.txt 85e331c80ee2d0a2de0c3ae18e0b370cc49ddd4e
80 changes: 76 additions & 4 deletions hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,93 @@ command -v sha1sum >/dev/null 2>&1 || { echo >&2 "We require sha1sum for this sc
# quick checksum generator for all the Bibles used in getBible.net
echo -n "[vdm.io] -- Building checksum for all Bibles found in getBible's repository......"

# get array value
function getArrayValue () {
# main string
str="$1"
# delimiter string
delimiter="$2"
#length of main string
strLen=${#str}
#length of delimiter string
dLen=${#delimiter}
#iterator for length of string
i=0
#length tracker for ongoing substring
wordLen=0
#starting position for ongoing substring
strP=0

array=()
while [ $i -lt $strLen ]; do
if [ $delimiter == ${str:$i:$dLen} ]; then
array+=(${str:strP:$wordLen})
strP=$(( i + dLen ))
wordLen=0
i=$(( i + dLen ))
fi
i=$(( i + 1 ))
wordLen=$(( wordLen + 1 ))
done
array+=(${str:strP:$wordLen})

if [ "$3" -eq "7" ]; then
echo "${array[@]}"
else
echo "${array[$3]}"
fi
}

# setup: positional arguments to pass in literal variables, query with code
jq_args=( )
jq_query='.'
jq_t_args=( )
jq_t_query='.'
# counter
nr=1
# book names
echo "# language translation abbreviation textdirection filename hash" > translations
# checksum
echo "# filename checksum" > checksum

for filename in *.txt; do
# get the hash
fileHash=$(sha1sum "$filename" | awk '{print $1}')
fileHash=$(sha1sum "$filename" | awk '{print $1}')
# build the hash file name
hashFilenName="${filename/.txt/.sha}"
hashFileName="${filename/.txt/.sha}"
# get the file name
fileName="${filename/.txt/}"
fileNameX="${fileName/___/\'}"
# get the details
language=$(getArrayValue "$fileNameX" "__" 0)
language=$(getArrayValue "$language" "_" 7)
translation=$(getArrayValue "$fileNameX" "__" 1)
translation=$(getArrayValue "$translation" "_" 7)
abbreviation=$(getArrayValue "$fileNameX" "__" 2)
textdirection=$(getArrayValue "$fileNameX" "__" 3)
# set file details to text file
echo "${nr} ${language} ${translation} ${abbreviation} ${textdirection} ${fileName} ${fileHash}" >> translations
# build the json details
JSON_STRING=$( jq -n \
--arg id "${nr}" \
--arg lang "${language}" \
--arg tra "${translation}" \
--arg abb "${abbreviation}" \
--arg dir "${textdirection}" \
--arg fhash "${fileHash}" \
--arg fname "${fileName}" \
'{language: $lang, translation: $tra, abbreviation: $abb, textdirection: $dir, filename: $fname, hash: $fhash, id: $id}' )
# load the values for json
jq_t_args+=( --arg "key$nr" "$abbreviation" )
jq_t_args+=( --argjson "value$nr" "$JSON_STRING" )
# build query for jq
jq_t_query+=" | .[\$key${nr}]=\$value${nr}"
# create/update the Bible file checksum
echo "$fileHash" > "$hashFilenName"
echo "${fileHash}" > "$hashFileName"
echo "${nr} ${filename} ${fileHash}" >> checksum
# load the values for json
jq_args+=( --arg "key$nr" "$filename" )
jq_args+=( --arg "value$nr" "$fileHash" )
jq_args+=( --arg "value$nr" "$fileHash" )
# build query for jq
jq_query+=" | .[\$key${nr}]=\$value${nr}"
#next
Expand All @@ -31,6 +102,7 @@ done

# run the generated command with jq
jq "${jq_args[@]}" "$jq_query" <<<'{}' > checksum.json
jq "${jq_t_args[@]}" "$jq_t_query" <<<'{}' > translations.json

# done with hash
echo "done"
Loading

0 comments on commit ec53027

Please sign in to comment.