Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Renamed variables
  • Loading branch information
Klaus Thoden committed Mar 23, 2018
1 parent ea0f654 commit 9bde75d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion create_tmpbib.py
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions fix_tei.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9bde75d

Please sign in to comment.