summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <masotoudeh@ucdavis.edu>2020-09-30 10:23:17 -0700
committerGitHub <noreply@github.com>2020-09-30 10:23:17 -0700
commit30c4380d83a0fd6937bab7ee363adde29f3ab418 (patch)
tree0defdfa4604bed32b83465f66cf3ff61e47184e1
parent5d083c8ff8794c598f1e31c24d7f74f36b86cae9 (diff)
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.
-rw-r--r--dblpify.py4
1 files 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"
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback