diff --git a/.github/workflows/update-cmdpriv-template.yml b/.github/workflows/update-cmdpriv-template.yml index 8d8db1f8..dde400e7 100644 --- a/.github/workflows/update-cmdpriv-template.yml +++ b/.github/workflows/update-cmdpriv-template.yml @@ -27,7 +27,11 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install --upgrade yiri-mirai openai colorlog func_timeout dulwich Pillow - + + - name: Copy Scripts + run: | + cp res/scripts/generate_cmdpriv_template.py . + - name: Generate Files run: | python main.py diff --git a/.github/workflows/update-override-all.yml b/.github/workflows/update-override-all.yml index 850186c4..ec3efdbb 100644 --- a/.github/workflows/update-override-all.yml +++ b/.github/workflows/update-override-all.yml @@ -31,6 +31,10 @@ jobs: python -m pip install --upgrade pip # 在此处添加您的项目所需的其他依赖 + - name: Copy Scripts + run: | + cp res/scripts/generate_override_all.py . + - name: Run generate_override_all.py run: python3 generate_override_all.py diff --git a/generate_cmdpriv_template.py b/res/scripts/generate_cmdpriv_template.py similarity index 92% rename from generate_cmdpriv_template.py rename to res/scripts/generate_cmdpriv_template.py index 9b2d35af..45ff0b39 100644 --- a/generate_cmdpriv_template.py +++ b/res/scripts/generate_cmdpriv_template.py @@ -13,5 +13,5 @@ for key in cmdsmgr.__command_list__: template[key] = cmdsmgr.__command_list__[key]['privilege'] # 写入cmdpriv-template.json -with open('cmdpriv-template.json', 'w') as f: +with open('../../cmdpriv-template.json', 'w') as f: f.write(json.dumps(template, indent=4, ensure_ascii=False)) \ No newline at end of file diff --git a/generate_override_all.py b/res/scripts/generate_override_all.py similarity index 91% rename from generate_override_all.py rename to res/scripts/generate_override_all.py index 69674c38..cff27e02 100644 --- a/generate_override_all.py +++ b/res/scripts/generate_override_all.py @@ -19,5 +19,5 @@ for k, v in template.__dict__.items(): print(k, v, type(v)) output_json[k] = v -with open("override-all.json", "w", encoding="utf-8") as f: +with open("../../override-all.json", "w", encoding="utf-8") as f: json.dump(output_json, f, indent=4, ensure_ascii=False)