aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-23 17:25:18 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-23 17:25:18 -0700
commit75f9f0538a40f92534f88884ec24e58b207bf3c8 (patch)
treee5ce9db1c23a1dfe885bc322a1cadaf87cfe4c6d
parent157e1ee0680e54c4ffe27ed23bac649111ca3772 (diff)
downloadchocula-75f9f0538a40f92534f88884ec24e58b207bf3c8.tar.gz
chocula-75f9f0538a40f92534f88884ec24e58b207bf3c8.zip
set is_active flag based on directories
-rw-r--r--chocula/database.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/chocula/database.py b/chocula/database.py
index 2588f60..2fea774 100644
--- a/chocula/database.py
+++ b/chocula/database.py
@@ -483,6 +483,11 @@ class ChoculaDatabase:
# TODO: other DOI registrars (japan, datacite)
if irow["slug"] == "wikidata":
out["wikidata_qid"] = irow["identifier"]
+ if irow["slug"] in ("vanished_disapeared", "vanished_inactive"):
+ out["is_active"] = False
+ elif irow["slug"] in ("doaj"):
+ # inactive publications get removed from DOAJ
+ out["is_active"] = True
for k in ("name",):
if not out.get(k) and irow[k]:
out[k] = irow[k]