From a542bd86cef741f2782a0e72471784446536487f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 7 Apr 2026 16:37:23 +0000 Subject: [PATCH] =?UTF-8?q?=E6=8A=95=E7=A8=BF:=20cmd2.0=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=20=E2=80=94=20by=20ioo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script_library/index.json | 28 ++++++++++++++++-- .../scripts/basic/cmd2_0_mnoj7n30.py | 29 +++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 script_library/scripts/basic/cmd2_0_mnoj7n30.py diff --git a/script_library/index.json b/script_library/index.json index 38a33df..d9c7e16 100644 --- a/script_library/index.json +++ b/script_library/index.json @@ -1,7 +1,7 @@ { "format_version": 1, - "data_version": 84, - "updated": "2026-04-07T11:23:31.644Z", + "data_version": 85, + "updated": "2026-04-07T16:37:23Z", "announcement": null, "categories": [ { @@ -1397,6 +1397,30 @@ "updated": null, "status": "active", "lines": 26 + }, + { + "id": "community_cmd20修正测试__by_ioo", + "name": "cmd2.0修正测试 — by ioo", + "name_en": "cmd2.0修正测试 — by ioo", + "desc": "[投稿] cmd2.0修正测试 — by ioo", + "desc_en": "[投稿] cmd2.0修正测试 — by ioo", + "category": "basic", + "file": "scripts/basic/cmd2_0_mnoj7n30.py", + "thumbnail": null, + "version": 1, + "file_type": "py", + "author": "社区投稿", + "author_en": "社区投稿", + "tags": [ + "community", + "basic" + ], + "requires": [], + "min_app_version": "1.5.0", + "added": "2026-04-07", + "updated": null, + "status": "active", + "lines": 29 } ] } diff --git a/script_library/scripts/basic/cmd2_0_mnoj7n30.py b/script_library/scripts/basic/cmd2_0_mnoj7n30.py new file mode 100644 index 0000000..1e12d58 --- /dev/null +++ b/script_library/scripts/basic/cmd2_0_mnoj7n30.py @@ -0,0 +1,29 @@ +# 欢迎使用 PythonIDE!如果觉得好用,请给个好评哦~ +import json +from pathlib import Path +import time +import random +Y = "\033[93m" +print("==========by ioo project==========") +time.sleep(1) +print("= 这是一个测试文件 =") +time.sleep(1) +print("=使用我的作品 模拟cmd可能会出现一些问题=") +time.sleep(1) +print("= 建议使用此工具进行测试 =") +for i in range(51): + percent = i *2 + print(f"\r|{ '█' * i }{ ' ' * (50 - i) }|{ percent }%", end="") + time.sleep(random.uniform(0.1, 0.3)) +path=Path("dosfile.txt") +if path.exists(): + file=json.loads(path.read_text()) + print(file) + print("= 测试成功4.1 =") +else: + file={"command.com":"bin","io.sys":"sys"} + print("\n= 错误,已修复 =") + path.write_text(json.dumps(file)) +k="#愚人节做的嘿嘿" +if input(">") == "Y": + print(k) \ No newline at end of file