From 2d781b91511750643b14088218a9e382f7cbf197 Mon Sep 17 00:00:00 2001 From: skimrme Date: Wed, 4 Feb 2026 10:37:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8E=9F=E6=9C=AC=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E7=BB=93=E6=9E=84=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ Download.py => windows/command/Download.py | 3 ++- windows/command/help.py | 2 ++ windows/command/version.py | 2 ++ windows/main.py | 23 ++++++++++++++++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .gitignore rename Download.py => windows/command/Download.py (57%) create mode 100644 windows/command/help.py create mode 100644 windows/command/version.py create mode 100644 windows/main.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ddb90ed --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +db/** +**/venv/** \ No newline at end of file diff --git a/Download.py b/windows/command/Download.py similarity index 57% rename from Download.py rename to windows/command/Download.py index 9a68371..ddb05fe 100644 --- a/Download.py +++ b/windows/command/Download.py @@ -1,6 +1,7 @@ import jmcomic as jm +import os, sys -print(f'Input jmcomic Car_ID') +print(f'请输入 jmcomic 车号') car_id = input() diff --git a/windows/command/help.py b/windows/command/help.py new file mode 100644 index 0000000..e3cf51a --- /dev/null +++ b/windows/command/help.py @@ -0,0 +1,2 @@ +print("jm", "{:12}选择你需要下载的漫画".format(" ")) +print("version", "{:7}查看当前版本".format(" ")) \ No newline at end of file diff --git a/windows/command/version.py b/windows/command/version.py new file mode 100644 index 0000000..8e04244 --- /dev/null +++ b/windows/command/version.py @@ -0,0 +1,2 @@ +print("jm_download_python") +print("2026-02-04", "(v0.02)") \ No newline at end of file diff --git a/windows/main.py b/windows/main.py new file mode 100644 index 0000000..58363b4 --- /dev/null +++ b/windows/main.py @@ -0,0 +1,23 @@ +import sys, os, subprocess +from pathlib import Path + +# 设定使用的python环境 +venv_python = Path(r"./venv/Scripts/python.exe") + + +# 设定 +if len(sys.argv) == 1: + # 如果什么都没输入就输出 + subprocess.run([str(venv_python),".\\command\\help.py"], check=True) + +if len(sys.argv) > 1: + command = sys.argv[1] + + if command == "help": + subprocess.run([str(venv_python),".\\command\\help.py"], check=True) + elif command == "jm": + subprocess.run([str(venv_python),".\\command\\Download.py"], check=True) + elif command == "version": + subprocess.run([str(venv_python),".\\command\\version.py"], check=True) + else: + print(f"未知的命令: {command}") \ No newline at end of file