mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-24 18:47:43 +00:00
18 lines
526 B
Python
18 lines
526 B
Python
|
import json
|
||
|
import os
|
||
|
|
||
|
|
||
|
def update_des():
|
||
|
with open("list.json", "r", encoding="utf8") as f:
|
||
|
list_json = json.load(f)
|
||
|
for plugin in list_json["list"]:
|
||
|
if os.path.exists(f"{plugin['name']}{os.sep}DES.md"):
|
||
|
with open(f"{plugin['name']}{os.sep}DES.md", "r", encoding="utf8") as f:
|
||
|
plugin["des"] = f.read().strip()
|
||
|
with open("list.json", "w", encoding="utf8") as f:
|
||
|
json.dump(list_json, f, ensure_ascii=False, indent=4)
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
update_des()
|