projects
/
iron-blogger
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f7c1531
)
scan-feeds: Support more timestamp formats
author
Nelson Elhage
<nelhage@mit.edu>
Mon, 15 Feb 2010 20:30:33 +0000
(15:30 -0500)
committer
Nelson Elhage
<nelhage@mit.edu>
Mon, 15 Feb 2010 20:30:33 +0000
(15:30 -0500)
scan-feeds.py
patch
|
blob
|
history
diff --git
a/scan-feeds.py
b/scan-feeds.py
index 7e27b8c2a5c8e0e9012b744a19f2950747e7e9ff..bf60aefbaeec5a3b4e6b02bda4bffe89ce2f99cc 100755
(executable)
--- a/
scan-feeds.py
+++ b/
scan-feeds.py
@@
-21,9
+21,9
@@
def parse_published(pub):
return parse(pub).astimezone(tz.tzlocal()).replace(tzinfo=None)
def get_date(post):
-
if 'published' in post
:
- return post.published
- return post.updated
+
for k in ('published', 'created', 'updated')
:
+ if k in post:
+ return post[k]
def get_link(post):
return post.link
Benjamin Mako Hill
||
Want to submit a patch?