update python scripts
This commit is contained in:
parent
06a789a098
commit
f681210254
38424
OGNTa-TC.tsv
38424
OGNTa-TC.tsv
File diff suppressed because it is too large
Load Diff
|
@ -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`
|
||||
|
|
|
@ -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 = (
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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()
|
38424
tmp/OGNT-trimmed
38424
tmp/OGNT-trimmed
File diff suppressed because it is too large
Load Diff
15541
tmp/OGNTa-Ruby.nt
15541
tmp/OGNTa-Ruby.nt
File diff suppressed because one or more lines are too long
15545
tmp/OGNTa-TC-Ruby.nt
15545
tmp/OGNTa-TC-Ruby.nt
File diff suppressed because one or more lines are too long
38424
tmp/OGNTa-TC-marked
38424
tmp/OGNTa-TC-marked
File diff suppressed because it is too large
Load Diff
38424
tmp/OGNTa-marked
38424
tmp/OGNTa-marked
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue