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.
19 lines
426 B
19 lines
426 B
4 years ago
|
import archive
|
||
|
import database
|
||
|
import json
|
||
|
|
||
|
database.init()
|
||
|
archive.init()
|
||
|
|
||
|
with archive.ix.searcher() as searcher:
|
||
|
for docnum in searcher.document_numbers():
|
||
|
try:
|
||
|
print('docnum', docnum)
|
||
|
res = searcher.stored_fields(docnum)
|
||
|
print('id', res['id'])
|
||
|
database.put(res['story'])
|
||
|
print()
|
||
|
except:
|
||
|
print('skipping', docnum)
|
||
|
pass
|