From d5f340c078f1f7f25bf8f5a3cfd51f4a7de33ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=8A=E6=99=9A=E6=89=93=E8=80=81=E8=99=8E?= Date: Fri, 3 Apr 2026 18:40:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E6=8A=95=E7=A8=BF]=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=84=9A=E6=9C=AC:=20=E6=A8=A1=E6=8B=9Fcmd1.0=20=E2=80=94=20by?= =?UTF-8?q?=20ioo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scripts/basic/cmd1_0_mnirvpz0.py | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 script_library/scripts/basic/cmd1_0_mnirvpz0.py diff --git a/script_library/scripts/basic/cmd1_0_mnirvpz0.py b/script_library/scripts/basic/cmd1_0_mnirvpz0.py new file mode 100644 index 0000000..e9ca7a9 --- /dev/null +++ b/script_library/scripts/basic/cmd1_0_mnirvpz0.py @@ -0,0 +1,92 @@ +# 欢迎使用 PythonIDE!如果觉得好用,请给个好评哦~ +# cmd简练版 +R = "\033[91m" # 红 +G = "\033[92m" # 绿 +Y = "\033[93m" # 黄 +B = "\033[94m" # 蓝 +C = "\033[96m" # 青 +M = "\033[95m" # 紫 +X = "\033[0m" +new_l = "\n" +cmd = "" + +show = ">" +file={"command.com":"bin,can't see", + "io.sys":"bin,can't see", + "msdos.sys":"bin,can't see", + "ms.txt":"hello user!", + "sys.txt":"看到这个的人我祝福他幸福快乐每一天", + "thank.xz":"敢看嘛,其实是感谢使用", + "format.bat":"format" +} +print("DOS改版") + +print("输入help以了解命令") +while True: + + cmd = input(show).strip() #del " " + if not cmd == "\n": + # help + if cmd.startswith("help"): + print("echo 打印文字,如echo hello") + print("echo on 开启提示符,echo off 关闭提示符") + print("dir显示文件") + print("type显示文件内容") + print("del可以删除文件,无需路径") + print("我自定义了文件的写入方式") + print("add file-text") + print("new file name") + print("exit 退出程序") + print("(del如果显示文件名就是删除成功)") + #echo + elif cmd.startswith("echo"): + input_str = cmd[4:].lstrip() + if input_str.startswith("on"): + show = ">" + elif input_str.startswith("off"): + show = "" + else: + print(input_str) + # exit + elif cmd == "exit": + + exit() + elif cmd=="dir": + print(R+"file:") + print(B) + for i in list(file): + print(" "+i) + print(G+"file number:"+str(len(file)));print(X) + elif cmd == "oaoa": + print(G+"91*10086=917826");print(X) + # 在命令判断里加一段 + elif cmd.startswith("cls"): + for I in range(1145): + print("\a") + elif cmd.startswith("type"): + print(file.get(cmd[5:],"无法找到此文件")) + elif cmd.startswith("del"): + if not cmd.endswith(".sys"): + if file.pop(cmd[4:],False): + + + + bool=True + else: + bool=False + print("try del file:"+cmd[4:] if bool else "cannot find or del this file") + elif cmd.startswith("add"): + try: + file[cmd[4:]]+=input(">>text") + except: + file[cmd[4:]]=input(">>text") + elif cmd.startswith("new"): + name=cmd[4:] + text=input(">>text") + file[name]=text + else: + if cmd=="\n": + continue + else: + + print(f"'{cmd}' 不是内部或外部命令,也不是可运行的程序") From 142ad0ae5982993f6b0867a6cfddc5fae3ee6cbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=8A=E6=99=9A=E6=89=93=E8=80=81=E8=99=8E?= Date: Fri, 3 Apr 2026 18:40:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E6=8A=95=E7=A8=BF]=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20index.json:=20=E6=B7=BB=E5=8A=A0=20=E6=A8=A1=E6=8B=9Fcmd1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script_library/index.json | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/script_library/index.json b/script_library/index.json index c001276..edd9aec 100644 --- a/script_library/index.json +++ b/script_library/index.json @@ -1,7 +1,7 @@ { "format_version": 1, - "data_version": 64, - "updated": "2026-04-03T09:05:24.054Z", + "data_version": 65, + "updated": "2026-04-03T10:40:27.436Z", "announcement": null, "categories": [ { @@ -1259,6 +1259,29 @@ "updated": null, "status": "removed", "lines": 650 + }, + { + "id": "cmd1_0_mnirvpz0", + "name": "模拟cmd1.0", + "name_en": "模拟cmd1.0", + "desc": "一个模拟cmd的小脚本,为了方便改了一点语法,暂时只有这些功能english:A small script that simulates cmd. In order to facilitate a little syntax, it only has these functions for the time being.", + "desc_en": "一个模拟cmd的小脚本,为了方便改了一点语法,暂时只有这些功能english:A small script that simulates cmd. In order to facilitate a little syntax, it only has these functions for the time being.", + "category": "basic", + "file": "scripts/basic/cmd1_0_mnirvpz0.py", + "thumbnail": null, + "version": 1, + "file_type": "py", + "author": "ioo", + "author_en": "ioo", + "tags": [ + "community" + ], + "requires": [], + "min_app_version": "1.5.0", + "added": "2026-04-03", + "updated": null, + "status": "active", + "lines": 93 } ] }