Beispiel #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)
Beispiel #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()
Beispiel #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()
Beispiel #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)