Skip to content

Commit

Permalink
for release 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkroorda committed Oct 16, 2018
1 parent 5c47453 commit 8a57ad4
Show file tree
Hide file tree
Showing 28 changed files with 10,219 additions and 9,249 deletions.
4 changes: 2 additions & 2 deletions docs/transcription-0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Node type *chapter*

Subdivision of a containing *book*.

feature | values | in ATF | description
feature | values | description
------- | ------ | ------
**chapter** | `1` | number of the *chapter*

Expand All @@ -95,7 +95,7 @@ of a complete book.
Some books come in several witnesses, marked as `A`, `B`.
We treat them as separate books, and augment their names and acronyms with `_A`, `_B`, etc.

feature | values | in ATF | description
feature | values | description
------- | ------ | ------
**book** | `Gn` | acronym of the book name
**book@en** | `Genesis` | English name of the book
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 26 additions & 20 deletions programs/tfFromPil.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
Jb
Jos
Jd
1Sm
2Sm
Sm1
Sm2
Ps
1Rg
2Rg
Rg1
Rg2
Pr
Sap
Ec
Expand Down Expand Up @@ -68,17 +68,17 @@
Est
Jdt
Sir
1Chr
2Chr
Chr1
Chr2
ApBar
4Esr
Esr4
Ezr
Neh
1Mc_A
1Mc_B
2Mc
3Mc
4Mc
Mc1_A
Mc1_B
Mc2
Mc3
Mc4
Oda
OrM_A
OrM_B
Expand All @@ -88,7 +88,7 @@
PsS
Tb_A
Tb_B
3Esr
Esr3
'''.strip().split()

allAcros = set(allAcrosSeq)
Expand Down Expand Up @@ -182,8 +182,14 @@ def doBooks():
if not bookEntry.is_file():
continue
bookFile = bookEntry.name
print(bookFile)
thisBookInfo = {'bookName': bookFile}
bookMain = bookFile[0:-2] if bookFile[-2] == '_' else bookFile
bookAb = bookFile[-1] if bookFile[-2] == '_' else ''
bookAbRep = '' if bookAb == '' else f'_{bookAb.upper()}'
bookMain = f'{bookMain[1:]}_{bookMain[0]}' if bookMain[0].isdigit() else bookMain
bookName = f'{bookMain}{bookAbRep}'
bookExtra = '' if bookName == bookFile else f' => {bookName}'
print(f'{bookFile:<20}{bookExtra}')
thisBookInfo = {'bookName': bookName}
results = dict(chars=set(), problems=set())
with open(f'{SOURCE_PATH}/{bookFile}') as bh:
(curChapter, curVerse, curText) = (None, None, None)
Expand All @@ -196,21 +202,21 @@ def doBooks():
args = comps[1:]
if keyword == 'bookname':
acro = ' '.join(args)
ab = bookFile[-1] if bookFile[-2] == '_' else ''
abRep = '' if ab == '' else f'_{ab.upper()}'
thisBookInfo['acro'] = f'{acro}{abRep}'
acro = f'{acro[1:]}{acro[0]}' if acro[0].isdigit() else acro
bookAbRep = '' if bookAb == '' else f'_{bookAb.upper()}'
thisBookInfo['acro'] = f'{acro}{bookAbRep}'
elif keyword == 'language':
thisBookInfo['language'] = ' '.join(args)
elif keyword == 'verse':
if curVerse:
doText(bookFile, curChapter, curVerse, curText, results, content)
doText(bookName, curChapter, curVerse, curText, results, content)
(curChapter, curVerse) = args[0].split(',')
curText = ''
elif curVerse:
curText += line
thisBookInfo['problems'] = sorted(results['problems'])
thisBookInfo['chars'] = ''.join(sorted(results['chars']))
bookInfo[bookFile] = thisBookInfo
bookInfo[bookName] = thisBookInfo
bookAcro[thisBookInfo['acro']] = thisBookInfo
return (bookInfo, bookAcro, content)

Expand Down
Loading

0 comments on commit 8a57ad4

Please sign in to comment.