update python scripts

This commit is contained in:
Andley 2021-11-19 11:41:06 +08:00
parent 06a789a098
commit f681210254
11 changed files with 111637 additions and 111609 deletions

38424
OGNTa-TC.tsv

File diff suppressed because it is too large Load Diff

38424
OGNTa.tsv

File diff suppressed because it is too large Load Diff

View File

@ -34,6 +34,8 @@ OGNT3.3 abridged to the following tab-separated columns:
## Content Changes
### text additions
⦃ ⦄
### rmac enhancements
- OGNTsort reference Greek : `rmac-old``rmac-new`
- 001339 Mat 4:7 Ἔφη : `V-IAI-3S``V-IAI⁞AAI-3S`

View File

@ -16,9 +16,9 @@ newData = re.sub('(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)(.*?)(.*?)
# clean-up punctuation marks etc.
newData = re.sub('OGNTsort Book-Chapter:Verse PMpWordOGNTaPMfWord lexeme rmac TBESG IT\n','',newData)
newData = re.sub ('</pm><pm>',' ', newData)
newData = re.sub ('</pm>','', newData)
newData = re.sub ('<pm>','', newData)
# newData = re.sub ('</pm><pm>',' ', newData)
newData = re.sub ('</pm>',' ', newData)
newData = re.sub ('<pm>',' ', newData)
# Update Book Name Abbreviation
searchReplace = (

View File

@ -21,10 +21,17 @@ for line in Lines:
# add emphasis for Verbs
if (re.match(r'V-...-\d.',x[4])) or (re.match(r'V-....-\d.',x[4])):
f.write(x[0]+"\t"+x[1]+"\t<strong>"+x[2]+"</strong>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
#f.write(x[0]+"\t"+x[1]+"\t<strong><font color='#DB4437'>"+x[2]+"</font></strong>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
# add emphasis for participles & infinitives
elif (re.match(r'V-..P-...',x[4])) or (re.match(r'V-...P-...',x[4])) or (re.match(r'V-..N',x[4])) or (re.match(r'V-...N',x[4])):
# add emphasis for participles
elif (re.match(r'V-..P-...',x[4])) or (re.match(r'V-...P-...',x[4])):
f.write(x[0]+"\t"+x[1]+"\t<em>"+x[2]+"</em>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
#f.write(x[0]+"\t"+x[1]+"\t<b><font color='#4285F4'>"+x[2]+"</font></b>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
# add emphasis for infinitives
elif (re.match(r'V-..N',x[4])) or (re.match(r'V-...N',x[4])):
f.write(x[0]+"\t"+x[1]+"\t<em>"+x[2]+"</em>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
#f.write(x[0]+"\t"+x[1]+"\t<b><font color='#4285F4'>"+x[2]+"</font></b>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
else:
f.write(x[0]+"\t"+x[1]+"\t"+x[2]+"\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
@ -50,10 +57,20 @@ for line in Lines:
# add emphasis for Verbs
if (re.match(r'V-...-\d.',x[4])) or (re.match(r'V-....-\d.',x[4])):
f.write(x[0]+"\t"+x[1]+"\t<strong>"+x[2]+"</strong>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
#can not use <font color='#DB4437'> due to TheWord Bible format constraint ...
#f.write(x[0]+"\t"+x[1]+"\t<strong><font color='#DB4437'>"+x[2]+"</font></strong>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
# add emphasis for participles & infinitives
elif (re.match(r'V-..P-...',x[4])) or (re.match(r'V-...P-...',x[4])) or (re.match(r'V-..N',x[4])) or (re.match(r'V-...N',x[4])):
# add emphasis for participles
elif (re.match(r'V-..P-...',x[4])) or (re.match(r'V-...P-...',x[4])):
f.write(x[0]+"\t"+x[1]+"\t<em>"+x[2]+"</em>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
#can not use <font color='#DB4437'> due to TheWord Bible format constraint ...
#f.write(x[0]+"\t"+x[1]+"\t<b><font color='#4285F4'>"+x[2]+"</font></b>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
# add emphasis for infinitives
elif (re.match(r'V-..N',x[4])) or (re.match(r'V-...N',x[4])):
f.write(x[0]+"\t"+x[1]+"\t<em>"+x[2]+"</em>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
#can not use <font color='#DB4437'> due to TheWord Bible format constraint ...
#f.write(x[0]+"\t"+x[1]+"\t<b><font color='#4285F4'>"+x[2]+"</font></b>\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])
else:
f.write(x[0]+"\t"+x[1]+"\t"+x[2]+"\t"+x[3]+"\t"+x[4]+"\t"+x[5]+"\t"+x[6])

View File

@ -1,5 +1,8 @@
import re
from datetime import date
todays_date = date.today()
####### —————————————— Processing OGNTa-RUBY ——————————————
inputFile = "./tmp/OGNTa-marked"
@ -60,7 +63,7 @@ for ol in Lines:
if (re.match(".*¶<em>",x[2])): f.write("</br></br></br>")
# ----------
f.write("\n\n\nlang=grc\nnotags=1\nshort.title=OGNTa-Ruby\ndescription=OGNTa (https://github.com/Andley/OGNTa)")
f.write("\n\n\nlang=grc\nnotags=1\nshort.title=OGNTa-Ruby\nversion.major="+str(todays_date.year)+"\nversion.minor="+str(todays_date.month)+str(todays_date.day)+"\nversion.date="+str(todays_date)+"\ndescription=OGNTa (https://github.com/Andley/OGNTa)")
#
f.close()
@ -125,7 +128,7 @@ for ol in Lines:
if (re.match(".*¶<em>",x[2])): f.write("</br></br></br>")
# ----------
f.write("\n\n\nlang=grc\nnotags=1\nshort.title=OGNTa-TC-Ruby\ndescription=OGNTa-TC (https://github.com/Andley/OGNTa)")
f.write("\n\n\nlang=grc\nnotags=1\nshort.title=OGNTa-Ruby\nversion.major="+str(todays_date.year)+"\nversion.minor="+str(todays_date.month)+str(todays_date.day)+"\nversion.date="+str(todays_date)+"\ndescription=OGNTa (https://github.com/Andley/OGNTa)")
#
f.close()

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff