summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2016-10-16 09:52:51 +0200
committerLars-Dominik Braun <lars@6xq.net>2016-10-16 09:52:51 +0200
commit0c0ea65a653ac19491e779aee61ffb6e0d80ac1c (patch)
tree1770a6b9c50a5943f6d16121c66b80c673f541a7 /tools
parenta2101a326347a3e276c7f4fdd2f4ba5873d78b08 (diff)
downloadeumel-0c0ea65a653ac19491e779aee61ffb6e0d80ac1c.tar.gz
eumel-0c0ea65a653ac19491e779aee61ffb6e0d80ac1c.tar.bz2
eumel-0c0ea65a653ac19491e779aee61ffb6e0d80ac1c.zip
formatRefs: Fall back to creation date
…if publishing date is not available
Diffstat (limited to 'tools')
-rwxr-xr-xtools/formatRefs.py3
1 files changed, 3 insertions, 0 deletions
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)