add export and import util to support v1 to v2 upgrade
This commit is contained in:
parent
f0c82cf325
commit
ca04ee1ab1
15
utils/export.py
Normal file
15
utils/export.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
from pymongo import MongoClient
|
||||||
|
import os
|
||||||
|
import pymongo
|
||||||
|
|
||||||
|
CONNECTION_STRING = os.getenv("MONGODB_URI")
|
||||||
|
client = MongoClient(CONNECTION_STRING+'/admin')
|
||||||
|
|
||||||
|
|
||||||
|
# Create a new collection
|
||||||
|
collection = client["serra"]["cards"]
|
||||||
|
|
||||||
|
cards=collection.find()
|
||||||
|
|
||||||
|
for c in cards:
|
||||||
|
print("./serra add %s/%s -c %s" % (c["set"], c["collectornumber"], c["serra_count"]))
|
||||||
Loading…
x
Reference in New Issue
Block a user