Fix prep_data script so that it actually works
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
This script bootstraps Phobos from a supplied path and feeds it
|
||||
information regarding EVE data paths and where to dump data. It then imports
|
||||
some other scripts and uses them to convert the json data into a SQLite
|
||||
database and then compare the new database to the existing one, producing a
|
||||
diff which can then be used to assist in the updating.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
@@ -20,7 +27,7 @@ parser.add_argument("-j", "--nojson", dest="nojson", action="store_true", help="
|
||||
args = parser.parse_args()
|
||||
eve_path = os.path.expanduser(unicode(args.eve_path, sys.getfilesystemencoding()))
|
||||
cache_path = os.path.expanduser(unicode(args.cache_path, sys.getfilesystemencoding())) if args.cache_path else None
|
||||
path_res = os.path.expanduser(unicode(args.res_path, sys.getfilesystemencoding()))
|
||||
res_path = os.path.expanduser(unicode(args.res_path, sys.getfilesystemencoding()))
|
||||
dump_path = os.path.expanduser(unicode(args.dump_path, sys.getfilesystemencoding()))
|
||||
script_path = os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
|
||||
|
||||
@@ -46,17 +53,19 @@ if not args.nojson:
|
||||
from translator import Translator
|
||||
from writer import *
|
||||
|
||||
rvr = reverence.blue.EVE(eve_path, cachepath=args.cache_path, respath=path_res, server="singularity" if args.singularity else "tranquility")
|
||||
rvr = reverence.blue.EVE(eve_path, cachepath=args.cache_path, sharedcachepath=res_path, server="singularity" if args.singularity else "tranquility")
|
||||
|
||||
pickle_miner = ResourcePickleMiner(rvr)
|
||||
trans = Translator(pickle_miner)
|
||||
bulkdata_miner = BulkdataMiner(rvr, trans)
|
||||
staticcache_miner = StaticdataCacheMiner(eve_path, trans)
|
||||
|
||||
miners = (
|
||||
MetadataMiner(eve_path),
|
||||
bulkdata_miner,
|
||||
TraitMiner(bulkdata_miner, trans),
|
||||
TraitMiner(staticcache_miner, bulkdata_miner, trans),
|
||||
SqliteMiner(eve_path, trans),
|
||||
staticcache_miner,
|
||||
CachedCallsMiner(rvr, trans),
|
||||
pickle_miner
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user