Mercurial > hg > Feedworm
comparison backend/couchdb/CouchDbBackend.py @ 166:04c3b9796b89
feedparser uses the proxy now if one is configured. To implement this the FeedUpdater had to change a bit - sqlalchemy backend is not yet refactored.
author | dirk |
---|---|
date | Sat, 03 Sep 2011 04:12:35 +0200 |
parents | 3eeda7cec39b |
children | 91a24f499318 |
comparison
equal
deleted
inserted
replaced
165:a5bda54309ba | 166:04c3b9796b89 |
---|---|
65 | 65 |
66 def markAllEntriesRead(self, feed): | 66 def markAllEntriesRead(self, feed): |
67 raise Exception("not yet implemented") | 67 raise Exception("not yet implemented") |
68 | 68 |
69 def createFeed(self, url): | 69 def createFeed(self, url): |
70 FeedUpdater.createFeed(url, self.database) | 70 feed = Feed.create(url) |
71 feed.store(self.database) | |
72 FeedUpdater(self.database, self.preferences()).update(feed) | |
71 | 73 |
72 def updateFeed(self, feed, changes): | 74 def updateFeed(self, feed, changes): |
73 for key in changes.keys(): | 75 for key in changes.keys(): |
74 feed[key] = changes[key] | 76 feed[key] = changes[key] |
75 feed.store(self.database) | 77 feed.store(self.database) |
94 def updateAllFeeds(self): | 96 def updateAllFeeds(self): |
95 # TODO use a view instead of iterating all feeds | 97 # TODO use a view instead of iterating all feeds |
96 allFeeds = Feed.all(self.database) | 98 allFeeds = Feed.all(self.database) |
97 for feed in allFeeds: | 99 for feed in allFeeds: |
98 if feed.needsUpdate(): | 100 if feed.needsUpdate(): |
99 FeedUpdater(feed, self.database).update() | 101 FeedUpdater(self.database, self.preferences()).update(feed) |
100 | 102 |
101 def expireFeedEntries(self): | 103 def expireFeedEntries(self): |
102 print("Expiring feeds is not yet implemented") | 104 print("Expiring feeds is not yet implemented") |
103 # raise Exception("not yet implemented") | 105 # raise Exception("not yet implemented") |
104 | 106 |