diff --git a/.github/scripts/build_index.py b/.github/scripts/build_index.py index f5ca8aaa..901746f1 100644 --- a/.github/scripts/build_index.py +++ b/.github/scripts/build_index.py @@ -6,7 +6,7 @@ import validate def read_extension(file: Path): - with open(file, 'r') as f: + with open(file, 'r', encoding='utf-8') as f: extension = json.load(f) for required_key in [ "name", @@ -24,8 +24,8 @@ def read_extension(file: Path): except: # add "added": "YYYY-MM-DD" extension["added"] = str(datetime.datetime.now().date()) - with open(file, 'w') as f: - json.dump(extension, f, indent=4) + with open(file, 'w', encoding='utf-8') as f: + json.dump(extension, f, indent=4, ensure_ascii=False) return extension @@ -40,7 +40,7 @@ def read_extension_dir(): def update_index(exts: dict, tags: dict): # update existing remove removed and add new extensions - with open(build_index_path, 'r') as f: + with open(build_index_path, 'r', encoding='utf-8') as f: existing_extensions = {extension['url']: extension for extension in json.load(f)['extensions']} for extensions_url, extension in exts.items(): @@ -51,14 +51,14 @@ def update_index(exts: dict, tags: dict): extensions_list = [extension for extensions_url, extension in existing_extensions.items() if extensions_url in extensions] extension_index = {'tags': tags, 'extensions': extensions_list} - with open(build_index_path, 'w') as f: - json.dump(extension_index, f, indent=4) + with open(build_index_path, 'w', encoding='utf-8') as f: + json.dump(extension_index, f, indent=4, ensure_ascii=False) return extension_index def update_master_index(index: dict): # add keys from master/index that are not in extensions/tags to extensions/tags as new master/index - with open(deploy_index_path, 'r') as f: + with open(deploy_index_path, 'r', encoding='utf-8') as f: master_exts = {extension['url']: extension for extension in json.load(f)['extensions']} index_ext = {extension['url']: extension for extension in index['extensions']} @@ -71,8 +71,8 @@ def update_master_index(index: dict): index_ext[master_ext_url][master_exts_key] = master_ext[master_exts_key] new_master_index = {'tags': index['tags'], 'extensions': list(index_ext.values())} - with open(deploy_index_path, 'w') as f: - json.dump(new_master_index, f, indent=4) + with open(deploy_index_path, 'w', encoding='utf-8') as f: + json.dump(new_master_index, f, indent=4, ensure_ascii=False) return new_master_index diff --git a/.github/scripts/update_metadata.py b/.github/scripts/update_metadata.py index c2524430..b7dc2a11 100644 --- a/.github/scripts/update_metadata.py +++ b/.github/scripts/update_metadata.py @@ -75,7 +75,7 @@ def get_github_metadata(extension: dict): index_path = Path(args.deploy_branch).joinpath('index.json') get_github_api_call_failed = False - with open(index_path, 'r') as f: + with open(index_path, 'r', encoding='utf-8') as f: extension_index = json.load(f) github_api_core_rait_limit = get_github_api_limit() @@ -90,8 +90,8 @@ def get_github_metadata(extension: dict): threads = [executor.submit(get_github_metadata, extension) for extension in extension_index['extensions']] wait(threads) - with open(index_path, 'w') as f: - json.dump(extension_index, f, indent=4) + with open(index_path, 'w', encoding='utf-8') as f: + json.dump(extension_index, f, indent=4, ensure_ascii=False) get_github_api_limit() diff --git a/extensions/Stable-Diffusion-Webui-Civitai-Helper.json b/extensions/Stable-Diffusion-Webui-Civitai-Helper.json index 0bcb37c5..c80fd5e1 100644 --- a/extensions/Stable-Diffusion-Webui-Civitai-Helper.json +++ b/extensions/Stable-Diffusion-Webui-Civitai-Helper.json @@ -8,4 +8,4 @@ "UI related", "online" ] -} +} \ No newline at end of file diff --git a/extensions/ddetailer.json b/extensions/ddetailer.json index e7418249..e6ae102b 100644 --- a/extensions/ddetailer.json +++ b/extensions/ddetailer.json @@ -6,4 +6,4 @@ "tags": [ "editing" ] -} +} \ No newline at end of file diff --git a/extensions/kandinsky-for-automatic1111.json b/extensions/kandinsky-for-automatic1111.json index 973458d4..be0c0fca 100644 --- a/extensions/kandinsky-for-automatic1111.json +++ b/extensions/kandinsky-for-automatic1111.json @@ -7,4 +7,4 @@ "script", "editing" ] -} +} \ No newline at end of file diff --git a/extensions/mine-diffusion.json b/extensions/mine-diffusion.json index 2ca9b25d..a8134c1a 100644 --- a/extensions/mine-diffusion.json +++ b/extensions/mine-diffusion.json @@ -6,4 +6,4 @@ "tags": [ "tab" ] -} +} \ No newline at end of file diff --git a/extensions/sd-civitai-browser-plus.json b/extensions/sd-civitai-browser-plus.json index 657bf23b..cf8e142d 100644 --- a/extensions/sd-civitai-browser-plus.json +++ b/extensions/sd-civitai-browser-plus.json @@ -8,4 +8,4 @@ "online" ], "added": "2023-08-24" -} +} \ No newline at end of file diff --git a/extensions/sd-webui-deoldify.json b/extensions/sd-webui-deoldify.json index 2d4c7f69..1ac1d780 100644 --- a/extensions/sd-webui-deoldify.json +++ b/extensions/sd-webui-deoldify.json @@ -9,4 +9,4 @@ "tab", "animation" ] -} +} \ No newline at end of file diff --git a/extensions/sd-webui-lobe-theme.json b/extensions/sd-webui-lobe-theme.json index 277e415f..367004c0 100644 --- a/extensions/sd-webui-lobe-theme.json +++ b/extensions/sd-webui-lobe-theme.json @@ -1,10 +1,10 @@ { - "name": "Lobe Theme", - "url": "https://github.com/canisminor1990/sd-webui-lobe-theme.git", - "description": "The modern theme for stable diffusion webui, legacy verison a.k.a kitchen theme.", - "added": "2023-06-28", - "tags": [ - "UI related", - "online" - ] + "name": "Lobe Theme", + "url": "https://github.com/canisminor1990/sd-webui-lobe-theme.git", + "description": "The modern theme for stable diffusion webui, legacy verison a.k.a kitchen theme.", + "added": "2023-06-28", + "tags": [ + "UI related", + "online" + ] } \ No newline at end of file diff --git a/extensions/sd-webui-qrcode-toolkit.json b/extensions/sd-webui-qrcode-toolkit.json index edd8e08f..a4fcf890 100644 --- a/extensions/sd-webui-qrcode-toolkit.json +++ b/extensions/sd-webui-qrcode-toolkit.json @@ -8,4 +8,4 @@ "editing", "online" ] -} +} \ No newline at end of file diff --git a/extensions/sd-webui-reactor.json b/extensions/sd-webui-reactor.json index 30230d2c..f9aff85d 100644 --- a/extensions/sd-webui-reactor.json +++ b/extensions/sd-webui-reactor.json @@ -7,4 +7,4 @@ "manipulations" ], "added": "2023-10-17" -} +} \ No newline at end of file diff --git a/extensions/sd-webui-roop.json b/extensions/sd-webui-roop.json index cdc61657..17718923 100644 --- a/extensions/sd-webui-roop.json +++ b/extensions/sd-webui-roop.json @@ -7,4 +7,4 @@ "editing", "manipulations" ] -} +} \ No newline at end of file diff --git a/extensions/seamless-tile-inpainting.json b/extensions/seamless-tile-inpainting.json index 8939cc5a..1d0b5bf3 100644 --- a/extensions/seamless-tile-inpainting.json +++ b/extensions/seamless-tile-inpainting.json @@ -6,4 +6,4 @@ "tags": [ "script" ] -} +} \ No newline at end of file diff --git a/extensions/stable-diffusion-webui-composable-lora.json b/extensions/stable-diffusion-webui-composable-lora.json index 04f98a1b..93c48e9a 100644 --- a/extensions/stable-diffusion-webui-composable-lora.json +++ b/extensions/stable-diffusion-webui-composable-lora.json @@ -6,4 +6,4 @@ "tags": [ "manipulations" ] -} +} \ No newline at end of file diff --git a/extensions/stable-diffusion-webui-wd14-tagger.json b/extensions/stable-diffusion-webui-wd14-tagger.json index 4fa42e2a..73e1f152 100644 --- a/extensions/stable-diffusion-webui-wd14-tagger.json +++ b/extensions/stable-diffusion-webui-wd14-tagger.json @@ -7,4 +7,4 @@ "tab", "training" ] -} +} \ No newline at end of file diff --git a/extensions/uddetailer.json b/extensions/uddetailer.json index 75d68013..e4ebc8bd 100644 --- a/extensions/uddetailer.json +++ b/extensions/uddetailer.json @@ -1,7 +1,7 @@ { - "name": "\u00b5 Detection Detailer", + "name": "µ Detection Detailer", "url": "https://github.com/wkpark/uddetailer.git", - "description": "\u00b5 Detection Detailer. Fork of ddetailer. Supports bbox/segment object detection, auto-mask and inpainting using mmdetection, mediapipe and ultralytics. also supports ControlNet.", + "description": "µ Detection Detailer. Fork of ddetailer. Supports bbox/segment object detection, auto-mask and inpainting using mmdetection, mediapipe and ultralytics. also supports ControlNet.", "tags": [ "editing", "manipulations"