diff options
author | Troy A. Griffitts <scribe@crosswire.org> | 2022-09-17 12:21:29 +0000 |
---|---|---|
committer | Troy A. Griffitts <scribe@crosswire.org> | 2022-09-17 12:21:29 +0000 |
commit | 9ee854a4d91196887e640230db56b0fffcfdd240 (patch) | |
tree | dc1ea75d59d4dedf1d40c54396771448678a7363 /modules | |
parent | fe2df750bf0d1a0540c7ded9b70637ecfa2aae0e (diff) | |
download | sword-tools-9ee854a4d91196887e640230db56b0fffcfdd240.tar.gz |
updated lockosis script to work for both 1995 and 2020 data unchanged
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@552 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules')
-rw-r--r-- | modules/nasb1995/lockosis.cpp | 54 | ||||
-rw-r--r-- | modules/nasb2020/lockosis.cpp | 47 |
2 files changed, 73 insertions, 28 deletions
diff --git a/modules/nasb1995/lockosis.cpp b/modules/nasb1995/lockosis.cpp index 4209a8f..8c719de 100644 --- a/modules/nasb1995/lockosis.cpp +++ b/modules/nasb1995/lockosis.cpp @@ -532,7 +532,7 @@ int main(int argc, char **argv) { strongsStartFound = true; } } - else if (!strncmp(lastToken.c_str(), "hi", 2)) { + else if (!strncmp(lastToken.c_str(), "hi", 2) && strncmp(lastToken.c_str(), "hi type=\"inscription\"", 21)) { if ((outstring[i] != ' ') && ((isalpha(outstring[i])) || (isdigit(outstring[i])))) { strongsStart = tokenStart - 1; strongsStartFound = true; @@ -586,7 +586,11 @@ int main(int argc, char **argv) { strongsStartFound = false; strongsStart = i+1; } - if (!strncmp(lastToken.c_str(), "seg type=\"otPassage\"", 19)) { + if (!strncmp(lastToken.c_str(), "seg type=\"otPassage\"", 20)) { + strongsStartFound = false; + strongsStart = i+1; + } + if (!strncmp(lastToken.c_str(), "hi type=\"inscription\"", 21)) { strongsStartFound = false; strongsStart = i+1; } @@ -978,31 +982,55 @@ void prepLine(string &outstring, int currentTestament, bool note) { if (replaceFirst(outstring, "E<LE>", "Ē") > -1) continue; if (replaceFirst(outstring, "e<LE>", "ē") > -1) continue; - if (replaceFirst(outstring, "MENE", "<hi type=\"inscription\">Mene</hi>") > -1) continue; + if (replaceFirst(outstring, "M<\\>ENĒ<MH4484></>", "<hi type=\"inscription\">Menē<MH4484></hi>") > -1) continue; + if (replaceFirst(outstring, "MENĒ<MH4484>", "<hi type=\"inscription\">Menē<MH4484></hi>") > -1) continue; + + // these are probably legacy + if (replaceFirst(outstring, "M<\\>ENĒ:</>", "<hi type=\"inscription\">Menē</hi>:") > -1) continue; if (replaceFirst(outstring, "M<\\>ENE</>", "<hi type=\"inscription\">Mene</hi>") > -1) continue; if (replaceFirst(outstring, "M<\\>ENE:</>", "<hi type=\"inscription\">Mene</hi>:") > -1) continue; + if (replaceFirst(outstring, "M<\\>ENĒ</>", "<hi type=\"inscription\">Menē</hi>") > -1) continue; + if (replaceFirst(outstring, "MENĒ", "<hi type=\"inscription\">Menē</hi>") > -1) continue; + if (replaceFirst(outstring, "MENE", "<hi type=\"inscription\">Mene</hi>") > -1) continue; + // end of probably legacy + + if (replaceFirst(outstring, "T<\\>EKĒL<MH8625b></>", "<hi type=\"inscription\">Tekēl<MH8625b></hi>") > -1) continue; + if (replaceFirst(outstring, "TEKĒL<MH8625b>", "<hi type=\"inscription\">Tekēl<MH8625b></hi>") > -1) continue; + + // these are probably legacy if (replaceFirst(outstring, "TEKEL", "<hi type=\"inscription\">Tekel</hi>") > -1) continue; if (replaceFirst(outstring, "T<\\>EKEL</>", "<hi type=\"inscription\">Tekel</hi>") > -1) continue; if (replaceFirst(outstring, "T<\\>EKEL:</>", "<hi type=\"inscription\">Tekel</hi>:") > -1) continue; + if (replaceFirst(outstring, "T<\\>EKĒL</>", "<hi type=\"inscription\">Tekēl</hi>") > -1) continue; + if (replaceFirst(outstring, "T<\\>EKĒL:</>", "<hi type=\"inscription\">Tekēl</hi>:") > -1) continue; + if (replaceFirst(outstring, "TEKĒL", "<hi type=\"inscription\">Tekēl</hi>") > -1) continue; + // end of probably legacy + + if (replaceFirst(outstring, "U<\\>PHARSIN<MH6537b></>", "<hi type=\"inscription\">Upharsin<MH6537b></hi>") > -1) continue; + if (replaceFirst(outstring, "UPHARSIN<MH6537b>", "<hi type=\"inscription\">Upharsin<MH6537b></hi>") > -1) continue; + + // these are probably legacy if (replaceFirst(outstring, "UPHARSIN", "<hi type=\"inscription\">Upharsin</hi>") > -1) continue; if (replaceFirst(outstring, "UFARSIN", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; if (replaceFirst(outstring, "U<\\>FARSIN</>", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; + if (replaceFirst(outstring, "UPHARSIN", "<hi type=\"inscription\">Upharsin</hi>") > -1) continue; + if (replaceFirst(outstring, "UFARSIN", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; + // end of probably legacy + + if (replaceFirst(outstring, "P<\\>ERĒS<MH6537b></>", "<hi type=\"inscription\">Perēs<MH6537b></hi>") > -1) continue; + if (replaceFirst(outstring, "PERĒS<MH6537b>", "<hi type=\"inscription\">Perēs<MH6537b></hi>") > -1) continue; + + // these are probably legacy if (replaceFirst(outstring, "PERES", "<hi type=\"inscription\">Peres</hi>") > -1) continue; if (replaceFirst(outstring, "P<\\>ERES</>", "<hi type=\"inscription\">Peres</hi>") > -1) continue; if (replaceFirst(outstring, "P<\\>ERES:</>", "<hi type=\"inscription\">Peres</hi>:") > -1) continue; - - if (replaceFirst(outstring, "MENĒ", "<hi type=\"inscription\">Menē</hi>") > -1) continue; - if (replaceFirst(outstring, "M<\\>ENĒ</>", "<hi type=\"inscription\">Menē</hi>") > -1) continue; - if (replaceFirst(outstring, "M<\\>ENĒ:</>", "<hi type=\"inscription\">Menē</hi>:") > -1) continue; - if (replaceFirst(outstring, "TEKĒL", "<hi type=\"inscription\">Tekēl</hi>") > -1) continue; - if (replaceFirst(outstring, "T<\\>EKĒL</>", "<hi type=\"inscription\">Tekēl</hi>") > -1) continue; - if (replaceFirst(outstring, "T<\\>EKĒL:</>", "<hi type=\"inscription\">Tekēl</hi>:") > -1) continue; - if (replaceFirst(outstring, "UPHARSIN", "<hi type=\"inscription\">Upharsin</hi>") > -1) continue; - if (replaceFirst(outstring, "UFARSIN", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; - if (replaceFirst(outstring, "U<\\>FARSIN</>", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; if (replaceFirst(outstring, "PERĒS", "<hi type=\"inscription\">Perēs</hi>") > -1) continue; if (replaceFirst(outstring, "P<\\>ERĒS</>", "<hi type=\"inscription\">Perēs</hi>") > -1) continue; if (replaceFirst(outstring, "P<\\>ERĒS:</>", "<hi type=\"inscription\">Perēs</hi>:") > -1) continue; + // end of probably legacy + + if (replaceFirst(outstring, "H<\\>OLY<MH6944> TO THE</> L<\\>ORD<MH3068></>", + "<hi type=\"inscription\">Holy<MH6944> to the L<\\>ORD<MH3068></></hi>") > -1) continue; const char *outstr = outstring.c_str(); const char *found = strstr(outstr+end, "<\\>"); diff --git a/modules/nasb2020/lockosis.cpp b/modules/nasb2020/lockosis.cpp index 87904b3..8c719de 100644 --- a/modules/nasb2020/lockosis.cpp +++ b/modules/nasb2020/lockosis.cpp @@ -982,35 +982,52 @@ void prepLine(string &outstring, int currentTestament, bool note) { if (replaceFirst(outstring, "E<LE>", "Ē") > -1) continue; if (replaceFirst(outstring, "e<LE>", "ē") > -1) continue; - if (replaceFirst(outstring, "MENE", "<hi type=\"inscription\">Mene</hi>") > -1) continue; + if (replaceFirst(outstring, "M<\\>ENĒ<MH4484></>", "<hi type=\"inscription\">Menē<MH4484></hi>") > -1) continue; + if (replaceFirst(outstring, "MENĒ<MH4484>", "<hi type=\"inscription\">Menē<MH4484></hi>") > -1) continue; + + // these are probably legacy + if (replaceFirst(outstring, "M<\\>ENĒ:</>", "<hi type=\"inscription\">Menē</hi>:") > -1) continue; if (replaceFirst(outstring, "M<\\>ENE</>", "<hi type=\"inscription\">Mene</hi>") > -1) continue; if (replaceFirst(outstring, "M<\\>ENE:</>", "<hi type=\"inscription\">Mene</hi>:") > -1) continue; + if (replaceFirst(outstring, "M<\\>ENĒ</>", "<hi type=\"inscription\">Menē</hi>") > -1) continue; + if (replaceFirst(outstring, "MENĒ", "<hi type=\"inscription\">Menē</hi>") > -1) continue; + if (replaceFirst(outstring, "MENE", "<hi type=\"inscription\">Mene</hi>") > -1) continue; + // end of probably legacy + + if (replaceFirst(outstring, "T<\\>EKĒL<MH8625b></>", "<hi type=\"inscription\">Tekēl<MH8625b></hi>") > -1) continue; + if (replaceFirst(outstring, "TEKĒL<MH8625b>", "<hi type=\"inscription\">Tekēl<MH8625b></hi>") > -1) continue; + + // these are probably legacy if (replaceFirst(outstring, "TEKEL", "<hi type=\"inscription\">Tekel</hi>") > -1) continue; if (replaceFirst(outstring, "T<\\>EKEL</>", "<hi type=\"inscription\">Tekel</hi>") > -1) continue; if (replaceFirst(outstring, "T<\\>EKEL:</>", "<hi type=\"inscription\">Tekel</hi>:") > -1) continue; + if (replaceFirst(outstring, "T<\\>EKĒL</>", "<hi type=\"inscription\">Tekēl</hi>") > -1) continue; + if (replaceFirst(outstring, "T<\\>EKĒL:</>", "<hi type=\"inscription\">Tekēl</hi>:") > -1) continue; + if (replaceFirst(outstring, "TEKĒL", "<hi type=\"inscription\">Tekēl</hi>") > -1) continue; + // end of probably legacy + + if (replaceFirst(outstring, "U<\\>PHARSIN<MH6537b></>", "<hi type=\"inscription\">Upharsin<MH6537b></hi>") > -1) continue; + if (replaceFirst(outstring, "UPHARSIN<MH6537b>", "<hi type=\"inscription\">Upharsin<MH6537b></hi>") > -1) continue; + + // these are probably legacy if (replaceFirst(outstring, "UPHARSIN", "<hi type=\"inscription\">Upharsin</hi>") > -1) continue; if (replaceFirst(outstring, "UFARSIN", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; if (replaceFirst(outstring, "U<\\>FARSIN</>", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; + if (replaceFirst(outstring, "UPHARSIN", "<hi type=\"inscription\">Upharsin</hi>") > -1) continue; + if (replaceFirst(outstring, "UFARSIN", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; + // end of probably legacy + + if (replaceFirst(outstring, "P<\\>ERĒS<MH6537b></>", "<hi type=\"inscription\">Perēs<MH6537b></hi>") > -1) continue; + if (replaceFirst(outstring, "PERĒS<MH6537b>", "<hi type=\"inscription\">Perēs<MH6537b></hi>") > -1) continue; + + // these are probably legacy if (replaceFirst(outstring, "PERES", "<hi type=\"inscription\">Peres</hi>") > -1) continue; if (replaceFirst(outstring, "P<\\>ERES</>", "<hi type=\"inscription\">Peres</hi>") > -1) continue; if (replaceFirst(outstring, "P<\\>ERES:</>", "<hi type=\"inscription\">Peres</hi>:") > -1) continue; - - if (replaceFirst(outstring, "MENĒ", "<hi type=\"inscription\">Menē</hi>") > -1) continue; - if (replaceFirst(outstring, "M<\\>ENĒ</>", "<hi type=\"inscription\">Menē</hi>") > -1) continue; - if (replaceFirst(outstring, "M<\\>ENĒ<MH4484></>", "<hi type=\"inscription\">Menē<MH4484></hi>") > -1) continue; - if (replaceFirst(outstring, "M<\\>ENĒ:</>", "<hi type=\"inscription\">Menē</hi>:") > -1) continue; - if (replaceFirst(outstring, "TEKĒL", "<hi type=\"inscription\">Tekēl</hi>") > -1) continue; - if (replaceFirst(outstring, "T<\\>EKĒL</>", "<hi type=\"inscription\">Tekēl</hi>") > -1) continue; - if (replaceFirst(outstring, "T<\\>EKĒL<MH8625b></>", "<hi type=\"inscription\">Tekēl<MH8625b></hi>") > -1) continue; - if (replaceFirst(outstring, "T<\\>EKĒL:</>", "<hi type=\"inscription\">Tekēl</hi>:") > -1) continue; - if (replaceFirst(outstring, "UPHARSIN", "<hi type=\"inscription\">Upharsin</hi>") > -1) continue; - if (replaceFirst(outstring, "UFARSIN", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; - if (replaceFirst(outstring, "U<\\>FARSIN</>", "<hi type=\"inscription\">Ufarsin</hi>") > -1) continue; - if (replaceFirst(outstring, "U<\\>PHARSIN<MH6537b></>", "<hi type=\"inscription\">Ufarsin<MH6537b></hi>") > -1) continue; if (replaceFirst(outstring, "PERĒS", "<hi type=\"inscription\">Perēs</hi>") > -1) continue; if (replaceFirst(outstring, "P<\\>ERĒS</>", "<hi type=\"inscription\">Perēs</hi>") > -1) continue; - if (replaceFirst(outstring, "P<\\>ERĒS<MH6537b></>", "<hi type=\"inscription\">Perēs<MH6537b></hi>") > -1) continue; if (replaceFirst(outstring, "P<\\>ERĒS:</>", "<hi type=\"inscription\">Perēs</hi>:") > -1) continue; + // end of probably legacy if (replaceFirst(outstring, "H<\\>OLY<MH6944> TO THE</> L<\\>ORD<MH3068></>", "<hi type=\"inscription\">Holy<MH6944> to the L<\\>ORD<MH3068></></hi>") > -1) continue; |