Mercurial > hg > Feedworm
comparison feedupdate-main.py @ 13:591ecc2a99bd
move logging configuration to the util module, configure logging for sqlalchemy
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Wed, 28 Apr 2010 02:23:00 +0200 |
parents | 9ede118b93ef |
children | 42a225be7e56 |
comparison
equal
deleted
inserted
replaced
12:9ede118b93ef | 13:591ecc2a99bd |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 from database import createSession | 3 from util import configureLogging, createSession |
4 from Feed import Feed | 4 from Feed import Feed |
5 from FeedUpdater import updateAllFeeds | 5 from FeedUpdater import updateAllFeeds |
6 import logging | 6 import logging |
7 | 7 |
8 logger = logging.getLogger("feedupdater") | 8 logger = logging.getLogger("feedupdater") |
19 logger.info("feed: " + feed.name) | 19 logger.info("feed: " + feed.name) |
20 for entry in feed.entries: | 20 for entry in feed.entries: |
21 print entry.title | 21 print entry.title |
22 | 22 |
23 if __name__ == "__main__": | 23 if __name__ == "__main__": |
24 configureLogging() | |
24 session = createSession() | 25 session = createSession() |
25 | 26 |
26 createFeed(session) | 27 createFeed(session) |
27 updateAllFeeds(session) | 28 updateAllFeeds(session) |
28 #listFeeds(session) | 29 #listFeeds(session) |