Esempio n. 1
0
def run(path_eve, server_alias, path_cachedcalls, filter_string, language,
        path_json):
    resource_browser = ResourceBrowser(eve_path=path_eve,
                                       server_alias=server_alias)

    pickle_miner = PickleMiner(resbrowser=resource_browser)
    trans = Translator(pickle_miner=pickle_miner)
    fsdlite_miner = FsdLiteMiner(resbrowser=resource_browser, translator=trans)
    fsdbinary_miner = FsdBinaryMiner(resbrowser=resource_browser,
                                     translator=trans)
    miners = [
        MetadataMiner(resbrowser=resource_browser),
        BulkdataMiner(resbrowser=resource_browser,
                      translator=trans), fsdlite_miner, fsdbinary_miner,
        TraitMiner(fsdlite_miner=fsdlite_miner,
                   fsdbinary_miner=fsdbinary_miner,
                   translator=trans),
        SqliteMiner(resbrowser=resource_browser, translator=trans),
        CachedCallsMiner(path_cachedcalls=path_cachedcalls, translator=trans),
        pickle_miner
    ]

    writers = [JsonWriter(path_json, indent=2)]

    FlowManager(miners, writers).run(filter_string=filter_string,
                                     language=language)
Esempio n. 2
0
def run(rvr, path_json):
    pickle_miner = ResourcePickleMiner(rvr)
    trans = Translator(pickle_miner)
    bulkdata_miner = BulkdataMiner(rvr, trans)
    staticcache_miner = ResourceStaticCacheMiner(rvr, trans)
    miners = (MetadataMiner(path_eve), bulkdata_miner, staticcache_miner,
              TraitMiner(staticcache_miner, bulkdata_miner,
                         trans), SqliteMiner(rvr.paths.root, trans),
              CachedCallsMiner(rvr, trans), pickle_miner)

    writers = (JsonWriter(path_json, indent=2), )

    FlowManager(miners, writers).run(args.list, args.translate)
Esempio n. 3
0
        TraitMiner(staticcache_miner, bulkdata_miner, trans),
        SqliteMiner(rvr.paths.root, trans),
        CachedCallsMiner(rvr, trans),
        pickle_miner
    )

    writers = (
        JsonWriter(dump_path, indent=2),
    )

    list = "dgmexpressions,dgmattribs,dgmeffects,dgmtypeattribs,dgmtypeeffects,"\
           "dgmunits,invcategories,invgroups,invmetagroups,invmetatypes,"\
           "invtypes,mapbulk_marketGroups,phbmetadata,phbtraits,fsdTypeOverrides,"\
           "evegroups,evetypes,evecategories,mapbulk_marketGroups,clonegrades"

    FlowManager(miners, writers).run(list, "en-us")

### SQL Convert
import jsonToSql

db_file = os.path.join(dump_path, "eve.db")
header("Converting Data to SQL", db_file)

if os.path.isfile(db_file):
    os.remove(db_file)

jsonToSql.main("sqlite:///"+db_file, dump_path)

### Diff generation
import itemDiff
diff_file = os.path.join(dump_path, "diff.txt")
Esempio n. 4
0
    spickle_miner = StuffedPickleMiner(rvr)
    trans = Translator(spickle_miner)
    bulkdata_miner = BulkdataMiner(rvr, trans)

    miners = (MetadataMiner(eve_path), bulkdata_miner,
              TraitMiner(bulkdata_miner, trans), SqliteMiner(eve_path, trans),
              CachedCallsMiner(rvr, trans), spickle_miner)

    writers = (JsonWriter(dump_path, indent=2), )

    list = "dgmexpressions,dgmattribs,dgmeffects,dgmtypeattribs,dgmtypeeffects,"\
           "dgmunits,icons,invcategories,invgroups,invmetagroups,invmetatypes,"\
           "invtypes,mapbulk_marketGroups,phbmetadata,phbtraits"

    FlowManager(miners, writers).run(list, "multi")

### SQL Convert
import jsonToSql

db_file = os.path.join(dump_path, "eve.db")
header("Converting Data to SQL", db_file)

if os.path.isfile(db_file):
    os.remove(db_file)

jsonToSql.main("sqlite:///" + db_file, dump_path)

### Diff generation
import itemDiff
diff_file = os.path.join(dump_path, "diff.txt")
Esempio n. 5
0
        writer_safe_name = re.sub('[^\w\-.,() ]', '_', name, flags=re.UNICODE)
        return writer_safe_name


path_eve = path_eve
server_alias = args.server
language = args.translate
path_json = path_json

resource_browser = ResourceBrowser(eve_path=path_eve,
                                   server_alias=server_alias)

pickle_miner = PickleMiner(resbrowser=resource_browser)
trans = Translator(pickle_miner=pickle_miner)
fsdlite_miner = FsdLiteMiner(resbrowser=resource_browser, translator=trans)
fsdbinary_miner = FsdBinaryMiner(resbrowser=resource_browser, translator=trans)
miners = [
    MetadataMiner(resbrowser=resource_browser), fsdlite_miner, fsdbinary_miner,
    TraitMiner(fsdlite_miner=fsdlite_miner,
               fsdbinary_miner=fsdbinary_miner,
               translator=trans), pickle_miner
]

writers = [PyfaJsonWriter(path_json, indent=2, group=5000)]

filters = 'dogmaattributes,dogmaeffects,dogmaunits,dynamicitemattributes,marketgroups,metagroups,' \
          'typedogma,requiredskillsfortypes,clonegrades,dbuffcollections,evecategories,evegroups,' \
          'evetypes,traits,metadata'

FlowManager(miners, writers).run(filter_string=filters, language=language)