Skip to content

Commit

Permalink
additional report code
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus Thoden committed Mar 5, 2018
1 parent d2804ef commit 73eebf2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions prepare_tei.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ def main():
with open(args.teifile, 'r') as xmlfile:
xml_tree = etree.parse(xmlfile)

report = {}

################
# bibliography #
################
Expand All @@ -337,7 +339,9 @@ def main():
mod_string, cited = convert_citations(xml_string)

used_citekeys = [unescape(c[1]) for c in cited]
validate_citations(used_citekeys, bibdata)
not_cited = validate_citations(used_citekeys, bibdata)

report["not_cited"] = not_cited

mod_string2 = convert_figures(mod_string)

Expand Down Expand Up @@ -392,7 +396,8 @@ def main():
'tabdict' : dictTables,
'pagelabeldict' : dictPagelabels}


if not os.path.exists("tmp_files/"):
os.makedirs(os.path.expanduser("tmp_files/"))

with open('tmp_files/data.pickle', 'wb') as f:
# Pickle the 'data' dictionary using the highest protocol available.
Expand Down

0 comments on commit 73eebf2

Please sign in to comment.