From 30c4380d83a0fd6937bab7ee363adde29f3ab418 Mon Sep 17 00:00:00 2001 From: Matthew Sotoudeh Date: Wed, 30 Sep 2020 10:23:17 -0700 Subject: DBLP-ify rule: support entries without authors without failing (#7) Sometimes BibTeX entries don't have authors (or should, but don't yet). This caused the old DBLP-ify script to fail. Now it just indicates there is no author. --- dblpify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dblpify.py b/dblpify.py index c33d82b..e38de3c 100644 --- a/dblpify.py +++ b/dblpify.py @@ -28,8 +28,8 @@ def main(bib_file): if results.empty or result is None: out_file.write("\n% COULD NOT FIND " + entry["ID"] - + ": " + entry["title"] - + " by " + entry["author"] + "} \n") + + ": " + entry.get("title", "[None]") + + " by " + entry.get("author", "[None]") + "} \n") continue bibtex_url = f"https://dblp.uni-trier.de/rec/{result.Id}.bib?param=1" -- cgit v1.2.3