Exemplo n.º 1
0
def create_files():
    for key in champion_keys():
        path = Path.cwd().joinpath(
            Path("results/" + key + "/Recommended/" + key + ".json"))
        with path.open('w') as f:
            json.dump(
                ItemSetBuilder(BuildAnalyzer(key)).generate(),
                f,
                indent=2)
Exemplo n.º 2
0
def create_zipfile(path):
    zf = zipfile.ZipFile(path, mode='w', compression=zipfile.ZIP_LZMA)
    for key in champion_keys():
        print("Building items for " + key)
        fname = key + "/Recommended/" + key + ".json"
        j = json.dumps(ItemSetBuilder(BuildAnalyzer(key,
                                                    args.days)).generate(),
                       indent=2)
        zf.writestr(fname, j)
    zf.close()
Exemplo n.º 3
0
def create_zipfile(path):
    zf = zipfile.ZipFile(
        path, mode='w', compression=zipfile.ZIP_LZMA)
    for key in champion_keys():
        print("Building items for " + key)
        fname = key + "/Recommended/" + key + ".json"
        j = json.dumps(
            ItemSetBuilder(BuildAnalyzer(key, args.days)).generate(),
            indent=2)
        zf.writestr(fname, j)
    zf.close()
Exemplo n.º 4
0
def create_directories():
    for key in champion_keys():
        path = Path.cwd().joinpath(Path("results/" + key + "/Recommended/"))
        if path.exists() is False:
            path.mkdir(parents=True)