누구나 아는 전통 파일임

클릭해서 원본 다운 받아서 zip으로 바꾼 후 풀면 됨

main.exe 실행하면 되고.


사이트 주소 -> 저장할 폴더 주소 차례대로 엔터치면서 입력하면 됨


오픈-소스라 밑에 코드도 첨부함. 이거 때문에 깃헙엔 올리기 귀찮음

코드 올리는 다른 이유 중 하나는 바이러스 없다는 증명으로 ㅇㅇ

from requests import get
import os
from tqdm import tqdm
from concurrent.futures import ThreadPoolExecutor


def save_file(src, path):
    responses = get(src)
    if not responses.ok:
        return

    os.makedirs(os.path.dirname(path), exist_ok=True)
    with open(path, 'wb') as file:
        file.write(responses.content)


def load_file_multiple(iterable):
    src, path = iterable
    responses = get(src)
    if not responses.ok:
        return

    return path, responses.content


def save_file_from_data(path, data):
    os.makedirs(os.path.dirname(path), exist_ok=True)
    with open(path, 'wb') as file:
        file.write(data)


def download(src, download_path):
    print('프로젝트 설정 파일 다운로드 시작')
    save_file(f'{src}/dist/platform.json', f'{download_path}/platform.json')
    save_file(f'{src}/dist/imageSource.json', f'{download_path}/imageSource.json')
    save_file(f'{src}/dist/nodes/list.json', f'{download_path}/nodes/list.json')

    lineSettingList = get(f'{src}/dist/nodes/list.json').json()

    print('라인 다운로드 시작')
    for name in tqdm(lineSettingList):
        save_file(f'{src}/dist/nodes/{name}', f'{download_path}/nodes/{name}')

    print('라인 다운로드 완료. 이미지 다운로드 시작')
    image_list: list[str] = get(f'{src}/dist/imageSource.json').json().keys()
    image_list_tmp = set()
    for image in image_list:
        image_list_tmp.add(image)
        if image.endswith('.webp'):
            continue
        pos = image.rindex('.')
        image_list_tmp.add(image[:pos].strip() + '.webp')
    image_list = list(image_list_tmp)
    image_list: list[(str, str)] = list(map(lambda x: (f'{src}/dist/images/{x}', f'{download_path}/images/{x}'), image_list))

    with ThreadPoolExecutor(max_workers=10) as executor:
        results = list(tqdm(executor.map(load_file_multiple, image_list), total=len(image_list)))
        for result in results:
            if result is None:
                continue
            path, data = result
            save_file_from_data(path, data)


if __name__ == '__main__':
    print('다운로드 할 프로젝트 주소 입력')
    src = input().strip()
    print('컴퓨터의 다운로드 위치')
    download_path = input().strip()
    download(src, download_path)
    print('완료')


어짜피 이 프로그램 만들 예정이었긴 한데 아쉽네