diff --git a/create_tmpbib.py b/create_tmpbib.py index 7aa29e6..389050e 100644 --- a/create_tmpbib.py +++ b/create_tmpbib.py @@ -138,7 +138,7 @@ def main(): else: with open('tmp_files/data.pickle', 'rb') as f: data = pickle.load(f) - entries = list(set(data["notcited"])) + entries = list(set(data["citekey_not_in_bib"])) num_tmp_keys = len(tmp_keys) num_entries = len(entries) diff --git a/fix_tei.py b/fix_tei.py index 3563135..ed2d1d6 100644 --- a/fix_tei.py +++ b/fix_tei.py @@ -354,9 +354,9 @@ def evaluate_report(report): print(' '*4, item) else: print("All figures were linked.") - if len(report["not_cited"]) > 0: - print("{} of {} {} could not be found in the bibliography database:".format(len(report["not_cited"]), report["len_citekeys"], libeoaconvert.plural(len(report["not_cited"]), "citation"))) - for item in report["not_cited"]: + if len(report["citekeys_not_in_bib"]) > 0: + print("{} of {} {} could not be found in the bibliography database:".format(len(report["citekeys_not_in_bib"]), report["len_citekeys"], libeoaconvert.plural(len(report["citekeys_not_in_bib"]), "citation"))) + for item in report["citekeys_not_in_bib"]: print(' '*4, item) print("\nThe missing citations were also stored in the pickle file and can be re-used by the create_tmpbib tool.\n") else: @@ -407,10 +407,10 @@ def main(): mod_string2, cited = convert_citations(xml_string) used_citekeys = [unescape(c) for c in cited] - not_cited = validate_citations(used_citekeys, bibdata) + citekeys_not_in_bib = validate_citations(used_citekeys, bibdata) report["len_citekeys"] = len(used_citekeys) - report["not_cited"] = not_cited + report["citekeys_not_in_bib"] = citekeys_not_in_bib mod_string3 = convert_figures(mod_string2) @@ -454,7 +454,7 @@ def main(): dictTables = {} dictPagelabels = {} - data_to_pickle = {'notcited' : not_cited, + data_to_pickle = {'citekey_not_in_bib' : citekeys_not_in_bib, 'citekeys' : used_citekeys, 'chapterdict' : dictChapters, 'eqdict' : dictEquations,