From be938ce065a9223b79e6aa10bdbb00c8843e4968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=91=E8=B4=A8?= Date: Mon, 25 Dec 2023 09:47:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9ESVG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- script/1.svg | 21 --------------------- script/JSON.svg | 21 +++++++++++++++++++++ script/releaseDeck.py | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 22 deletions(-) delete mode 100644 script/1.svg create mode 100644 script/JSON.svg diff --git a/README.md b/README.md index 7aa872e..d90a90d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 扩展市场 -![json](./script/1.svg) +![json](./script/JSON.svg) 本仓库用于供应扩展文件内容和对应的接口 diff --git a/script/1.svg b/script/1.svg deleted file mode 100644 index 01c4971..0000000 --- a/script/1.svg +++ /dev/null @@ -1,21 +0,0 @@ - - test: test - - - - - - - - - - - - - - - test - - test - - diff --git a/script/JSON.svg b/script/JSON.svg new file mode 100644 index 0000000..d6f8fdb --- /dev/null +++ b/script/JSON.svg @@ -0,0 +1,21 @@ + + test: test + + + + + + + + + + + + + + + JSON + + 0 + + diff --git a/script/releaseDeck.py b/script/releaseDeck.py index 893bf56..3d19f52 100644 --- a/script/releaseDeck.py +++ b/script/releaseDeck.py @@ -5,6 +5,17 @@ from urllib import parse import codecs +dictMappping = { + 'classic': 'JSON', + 'yaml': 'YAML', + 'excel': 'XLSX' +} + +dictCount = { + 'classic': 0, + 'yaml': 0, + 'excel': 0 +} def formatUTF8WithBOM(data:bytes): res = data @@ -115,3 +126,31 @@ def formatUTF8WithBOM(data:bytes): f.write(json.dumps(index_data, indent=4, ensure_ascii=False)) shutil.copyfile('../target/deck/index.json', '../deck/index.json') print('releaseDeck done!') + + for typeName in dictCount: + str_this = f''' + test: test + + + + + + + + + + + + + + + {dictMappping.get(typeName, "N/A")} + + {dictCount.get(typeName, "N/A")} + + +''' + with open(f'../target/deck/{typeName}.svg', 'w', encoding='utf-8') as f: + f.write(str_this) + + print('releaseSvg done!')