| import os | |
| def clone_repo(url, save_path): | |
| command = f'git clone {url} {save_path}' | |
| os.system(command) | |
| print(f"Repository cloned: {save_path}") | |
| # 複数のURLリスト | |
| urls = [ | |
| "https://github.com/AUTOMATIC1111/stable-diffusion-webui-wildcards", | |
| "https://github.com/adieyal/sd-dynamic-prompts", | |
| "https://github.com/Physton/sd-webui-prompt-all-in-one", | |
| "https://github.com/Katsuyuki-Karasawa/stable-diffusion-webui-localization-ja_JP" | |
| ] | |
| # 対応するファイル名リスト | |
| file_names = [ | |
| "stable-diffusion-webui-wildcards", | |
| "sd-dynamic-prompts", | |
| "sd-webui-prompt-all-in-one", | |
| "stable-diffusion-webui-localization-ja_JP" | |
| ] | |
| # 保存先ディレクトリ | |
| save_directory = "/content/ReForge/extensions" | |
| # 各URLからリポジトリをクローン | |
| for url, file_name in zip(urls, file_names): | |
| save_path = os.path.join(save_directory, file_name) | |
| clone_repo(url, save_path) | |