You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
575 B
27 lines
575 B
5 years ago
|
import shelve
|
||
|
|
||
|
import archive
|
||
|
|
||
|
archive.init()
|
||
|
|
||
|
#with shelve.open('data/data') as db:
|
||
|
# to_delete = []
|
||
|
#
|
||
|
# for s in db.values():
|
||
|
# if 'title' in s:
|
||
|
# archive.update(s)
|
||
|
# if 'id' in s:
|
||
|
# to_delete.append(s['id'])
|
||
|
#
|
||
|
# for id in to_delete:
|
||
|
# del db[id]
|
||
|
#
|
||
|
# for s in db['news_cache'].values():
|
||
|
# if 'title' in s:
|
||
|
# archive.update(s)
|
||
|
|
||
|
#with shelve.open('data/whoosh') as db:
|
||
|
# for s in db['news_cache'].values():
|
||
|
# if 'title' in s and not archive.get_story(s['id']):
|
||
|
# archive.update(s)
|