From cbedf030267da6f1eb5da63f3071b26c6c2749d8 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Fri, 21 Aug 2015 12:08:11 -0400 Subject: [PATCH] Another fix to prep_data. I'll get this right one day --- scripts/prep_data.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/prep_data.py b/scripts/prep_data.py index 9b5771bb8b..980beb4c8f 100644 --- a/scripts/prep_data.py +++ b/scripts/prep_data.py @@ -4,7 +4,7 @@ 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. +diff which can then be used to assist in the updating. """ import sys @@ -18,7 +18,7 @@ parser = argparse.ArgumentParser() parser.add_argument("-e", "--eve", dest="eve_path", help="Location of EVE directory", required=True) parser.add_argument("-c", "--cache", dest="cache_path", help="Location of EVE cache directory. If not specified, an attempt will be make to automatically determine path.") -parser.add_argument("-r", "--res", dest="res_path", help="Location of EVE shared resource cache", required=True) +parser.add_argument("-r", "--res", dest="res_path", help="Location of EVE shared resource cache. If not specified, an attempt will be make to automatically determine path.") parser.add_argument("-d", "--dump", dest="dump_path", help="Location of Phobos JSON dump directory", required=True) parser.add_argument("-p", "--phobos", dest="phb_path", help="Location of Phobos, defaults to path noted in script", default=phb_path) parser.add_argument("-s", "--singularity", action="store_true", help="Singularity build") @@ -27,7 +27,7 @@ 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 -res_path = os.path.expanduser(unicode(args.res_path, sys.getfilesystemencoding())) +res_path = os.path.expanduser(unicode(args.res_path, sys.getfilesystemencoding())) if args.res_path else None dump_path = os.path.expanduser(unicode(args.dump_path, sys.getfilesystemencoding())) script_path = os.path.dirname(unicode(__file__, sys.getfilesystemencoding())) @@ -54,6 +54,10 @@ def header(text, subtext=None): from writer import * rvr = reverence.blue.EVE(eve_path, cachepath=args.cache_path, sharedcachepath=res_path, server="singularity" if args.singularity else "tranquility") + print "EVE Directory: {}".format(rvr.paths.root) + print "Cache Directory: {}".format(rvr.paths.cache) + print "Shared Resource Directory: {}".format(rvr.paths.sharedcache) + print pickle_miner = ResourcePickleMiner(rvr) trans = Translator(pickle_miner) @@ -66,17 +70,19 @@ def header(text, subtext=None): TraitMiner(staticcache_miner, bulkdata_miner, trans), SqliteMiner(eve_path, trans), staticcache_miner, - CachedCallsMiner(rvr, trans), + #CachedCallsMiner(rvr, trans), pickle_miner ) + writers = ( JsonWriter(dump_path, indent=2), ) list = "dgmexpressions,dgmattribs,dgmeffects,dgmtypeattribs,dgmtypeeffects,"\ "dgmunits,icons,invcategories,invgroups,invmetagroups,invmetatypes,"\ - "invtypes,mapbulk_marketGroups,phbmetadata,phbtraits,fsdTypeOverrides" + "invtypes,mapbulk_marketGroups,phbmetadata,phbtraits,fsdTypeOverrides"\ + "evegroups,evetypes" FlowManager(miners, writers).run(list, "multi")