From 0c0ea65a653ac19491e779aee61ffb6e0d80ac1c Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 16 Oct 2016 09:52:51 +0200 Subject: formatRefs: Fall back to creation date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …if publishing date is not available --- tools/formatRefs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/formatRefs.py b/tools/formatRefs.py index 265f04d..280a444 100755 --- a/tools/formatRefs.py +++ b/tools/formatRefs.py @@ -138,6 +138,9 @@ if __name__ == '__main__': # when was it published? when = first (getRecursive (s, g, ref, s.datePublished)) + if not when: + # fall back to creation date + when = first (getRecursive (s, g, ref, s.dateCreated)) # where can we find it? (print) # print from root to ref (i.e. magazine, volume, issue) -- cgit v1.2.3