From cd0e3d895bc4f596d06ed13cc6f688666d0fdff6 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 3 Nov 2018 14:53:37 -0700 Subject: [PATCH] Fix citation check for new citation semantics --- src/build.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/build.py b/src/build.py index 02b6db9..ac5ccf5 100644 --- a/src/build.py +++ b/src/build.py @@ -400,11 +400,10 @@ def build_all(path_prefix, lexicon_name): # Check that authors aren't citing themselves print("Running citation checks...") - article_by_title = {article.title : article for article in articles} - #for article in articles: - # for _, tup in article.citations.items(): - # cited = article_by_title[tup[1]] - # if article.player == cited.player: - # print(" {2}: {0} cites {1}".format(article.title, cited.title, cited.player)) + for parent in articles: + for article in [parent] + parent.addendums: + for citation in article.citations: + if article.player == citation.article.player: + print(" {2}: {0} cites {1}".format(article.title, citation.target, article.player)) print()