diff --git a/prepare_tei.py b/prepare_tei.py index fccf00c..e5a424a 100644 --- a/prepare_tei.py +++ b/prepare_tei.py @@ -322,6 +322,8 @@ def main(): with open(args.teifile, 'r') as xmlfile: xml_tree = etree.parse(xmlfile) + report = {} + ################ # bibliography # ################ @@ -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) @@ -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.