Mercurial > hg > Feedworm
view feedupdate-main.py @ 66:97c4e94f99cf
log when creating a new FeedEntry
author | dirk@xanthippe.ping.de |
---|---|
date | Thu, 29 Jul 2010 21:37:46 +0200 |
parents | d21f5025034d |
children | 525a52169f60 |
line wrap: on
line source
#!/usr/bin/env python import Database from Feed import Feed import FeedUpdater import logging import util logger = logging.getLogger("feedupdater") def listFeeds(session): allFeeds = session.query(Feed) for feed in allFeeds: logger.info("feed: " + feed.name) for entry in feed.entries: print entry.title if __name__ == "__main__": util.configureLogging() session = Database.createSession() #util.loadFeeds(session) #util.forceUpdateAllFeeds(session) #listFeeds(session) #OpmlImport.createFeedsFromOPML(session, "feed-data/feeds.opml.xml") FeedUpdater.updateAllFeeds(session) session.close()