Compare commits

..

No commits in common. "1afd6221963ff2c23706a88a8cda61fd62e80bc6" and "748609919bd2c4ad089e2ed2a01bb9924e27bafc" have entirely different histories.

View File

@ -1,30 +1,10 @@
import pymongo
import os
import ijson
import json
import sys
import bookstack
# import paperless database export
# manifest_path = "/mnt/user/media/paperless/media/manifest.json"
f = open("/mnt/tower/media/paperless/media/backup/manifest.json")
manifest = ijson.items(f, 'item')
paperless_docs = {}
for doc in manifest:
fields = doc['fields']
if 'title' in fields and 'content' in fields:
pk = doc['pk']
title = fields['title']
content = fields['content']
check = fields['checksum']
paperless_docs[pk] = {'checksum': check, 'title': title, 'content': content}
db = pymongo.MongoClient("10.0.0.59", 27017).paperless.content
db = pymongo.MongoClient("localhost", 27017).paperless.content
url = 'http://10.0.0.59:6875'