Cleans up code
This commit is contained in:
parent
190ce18167
commit
5f49523d42
14
convert.py
14
convert.py
|
@ -113,7 +113,7 @@ def get_input_fields(input_folderpath:Path, BBB:str) -> Tuple[str,str,str,str,st
|
||||||
glQuote = line
|
glQuote = line
|
||||||
quote_count = len(re.findall(r'(?<![^\W_])' + re.escape(glQuote) + r'(?![^\W_])', verseText))
|
quote_count = len(re.findall(r'(?<![^\W_])' + re.escape(glQuote) + r'(?![^\W_])', verseText))
|
||||||
if quote_count == 0:
|
if quote_count == 0:
|
||||||
print(f"\nERROR: GL Quote NOT FOUND in verse {Bbb} {C}:{V}:\nGL Quote: {glQuote}\nVerseText: {verseText}\n")
|
print(f"\nERROR: GL Quote NOT FOUND in verse {Bbb} {C}:{V}:\nGL Quote: {glQuote}\nVerseText: {verseText}\n\n")
|
||||||
else:
|
else:
|
||||||
words = glQuote.split(' ')
|
words = glQuote.split(' ')
|
||||||
words_str = ''
|
words_str = ''
|
||||||
|
@ -270,12 +270,12 @@ def main():
|
||||||
# '1TH','2TH','1TI','2TI','TIT','PHM',
|
# '1TH','2TH','1TI','2TI','TIT','PHM',
|
||||||
# 'HEB','JAS','1PE','2PE','1JN','2JN','3JN','JUD','REV'):
|
# 'HEB','JAS','1PE','2PE','1JN','2JN','3JN','JUD','REV'):
|
||||||
# continue # Just process NT books
|
# continue # Just process NT books
|
||||||
# try:
|
try:
|
||||||
lines_read, this_note_count, fail_count = convert_MSWrd_TN_TSV(LOCAL_SOURCE_FOLDERPATH, LOCAL_OUTPUT_FOLDERPATH, BBB, nn)
|
lines_read, this_note_count, fail_count = convert_MSWrd_TN_TSV(LOCAL_SOURCE_FOLDERPATH, LOCAL_OUTPUT_FOLDERPATH, BBB, nn)
|
||||||
# except Exception as e:
|
except Exception as e:
|
||||||
# print(f" {BBB} got an error: {e}")
|
print(f" {BBB} got an error: {e}")
|
||||||
# failed_book_list.append((BBB,str(e)))
|
failed_book_list.append((BBB,str(e)))
|
||||||
# lines_read = this_note_count = fail_count = 0
|
lines_read = this_note_count = fail_count = 0
|
||||||
total_lines_read += lines_read
|
total_lines_read += lines_read
|
||||||
total_files_read += 1
|
total_files_read += 1
|
||||||
if this_note_count:
|
if this_note_count:
|
||||||
|
|
Loading…
Reference in New Issue