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