示例#1
0
 def add_bookmarks_from_delicious(self, bookmarks):
     added = []
     for bookmark in bookmarks:
         new_bookmark = Bookmark.from_delicious(self, bookmark)
         added.append(new_bookmark)
         meta.Session.add(new_bookmark)
     return added
示例#2
0
 def clean_update(self):
     for bookmark in self.bookmarks:
         meta.Session.delete(bookmark)
     new_bookmarks = d.get_bookmarks_by_tags(self.credentials,
                                             self.required_tags)
     for bookmark in new_bookmarks:
         meta.Session.add(Bookmark.from_delicious(self, bookmark))
     self.last_updated = datetime.now()