projects
/
iron-blogger
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8ff29c9
)
scan-feeds: Accept a list of users
author
Nelson Elhage
<nelhage@ksplice.com>
Mon, 24 May 2010 19:21:03 +0000
(15:21 -0400)
committer
Nelson Elhage
<nelhage@ksplice.com>
Mon, 24 May 2010 19:21:03 +0000
(15:21 -0400)
scan-feeds.py
patch
|
blob
|
history
diff --git
a/scan-feeds.py
b/scan-feeds.py
index bf60aefbaeec5a3b4e6b02bda4bffe89ce2f99cc..82438bb1b6c4fceaf6572eec9460cc98e0170157 100755
(executable)
--- a/
scan-feeds.py
+++ b/
scan-feeds.py
@@
-48,10
+48,16
@@
def parse_feeds(weeks, uri):
if post['url'] not in [p['url'] for p in weeks[wn]]:
weeks[wn].append(post)
if post['url'] not in [p['url'] for p in weeks[wn]]:
weeks[wn].append(post)
-for (username, u) in users.items():
- weeks = log.setdefault(username, [])
- for l in u['links']:
- parse_feeds(weeks, l[2])
+if len(sys.argv) > 1:
+ for username in sys.argv[1:]:
+ weeks = log.setdefault(username, [])
+ for l in users[username]['links']:
+ parse_feeds(weeks, l[2])
+else:
+ for (username, u) in users.items():
+ weeks = log.setdefault(username, [])
+ for l in u['links']:
+ parse_feeds(weeks, l[2])
with open('out/report.yml', 'w') as f:
yaml.safe_dump(log, f)
with open('out/report.yml', 'w') as f:
yaml.safe_dump(log, f)
Benjamin Mako Hill
||
Want to submit a patch?