From 75f9f0538a40f92534f88884ec24e58b207bf3c8 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 23 Jun 2020 17:25:18 -0700 Subject: set is_active flag based on directories --- chocula/database.py | 5 +++++ 1 file changed, 5 insertions(+) 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] -- cgit v1.2.3