diff --git a/create_repository.py b/create_repository.py index 8c01fdd..86bef72 100644 --- a/create_repository.py +++ b/create_repository.py @@ -12,6 +12,7 @@ ROOT_PATH = Path(__file__).resolve().parent PACKAGES_JSON_PATH = ROOT_PATH / "packages.json" REPOSITORY_JSON_PATH = ROOT_PATH / "repository.json" METADATA_FILEAME = "metadata.json" +ICON_FILENAME = "icon.png" REPOSITORY_BASE_URI = "https://raw.githubusercontent.com/pointhi/kicad-color-schemes/master" @@ -38,6 +39,10 @@ def create_pcm_from_color_scheme(path, resulting_file): continue zip.write(json_file, f"colors/{json_file.name}") + icon_file = path / ICON_FILENAME + if icon_file.exists(): + zip.write(icon_file, f"resources/{ICON_FILENAME}") + def install_size_of_zip(zip_path): install_size = 0