From d2295ade1b8422cb38aaeff9dadd3d8787baadd0 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Thu, 6 Jul 2023 12:34:51 +0800 Subject: [PATCH 1/7] docs: update docs --- backend/src/module/api/program.py | 2 ++ docs/deploy/Windows-本地部署.md | 12 ++++++------ docs/deploy/local-run.md | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/backend/src/module/api/program.py b/backend/src/module/api/program.py index 60d75fd0..d75bd4ea 100644 --- a/backend/src/module/api/program.py +++ b/backend/src/module/api/program.py @@ -1,6 +1,7 @@ import logging import os import signal +import sys from fastapi import APIRouter, Depends, HTTPException, status @@ -20,6 +21,7 @@ async def startup(): @router.on_event("shutdown") async def shutdown(): program.stop() + sys.exit(0) @router.get("/restart") diff --git a/docs/deploy/Windows-本地部署.md b/docs/deploy/Windows-本地部署.md index 0d7e216f..13a82222 100644 --- a/docs/deploy/Windows-本地部署.md +++ b/docs/deploy/Windows-本地部署.md @@ -5,7 +5,7 @@ cd Auto_Bangumi ``` -2. 修改 `src\module\api\web.py` 以允许 `DEV_VERSION` 下仍然可以显示 Web UI: +2. 修改 `backend\src\module\api\web.py` 以允许 `DEV_VERSION` 下仍然可以显示 Web UI: ```powershell ((Get-Content -path .\src\module\api\web.py -Raw) -replace 'if VERSION != "DEV_VERSION":','if True:') | Set-Content -Path .\src\module\api\web.py @@ -32,22 +32,22 @@ ```powershell Invoke-WebRequest -Uri "https://github.com/Rewrite0/Auto_Bangumi_WebUI/releases/latest/download/dist.zip" -OutFile "dist.zip" Expand-Archive -Path "dist.zip" - mv dist\* src\templates + mv dist\* backend\src\templates ``` 6. 创建 `data` 与 `config` 目录和空白的 `config_dev.json`(如果有必要将这些目录存储在其他位置,建议使用 Junction Directory 链接即可) ```powershell - mkdir src\data - mkdir src\config - echo "{}" > src\config\config_dev.json + mkdir backend\src\data + mkdir backend\src\config + echo "{}" > backend\src\config\config_dev.json ``` 默认情况下,PowerShell 输出文件编码为 `UTF-16LE`,你需要将 `config_dev.json` 的编码格式改为 `UTF-8`。 7. 运行程序测试是否配置正确: ```powershell - cd src + cd backend\src python main.py ``` diff --git a/docs/deploy/local-run.md b/docs/deploy/local-run.md index e7d6ffd8..107ceabf 100644 --- a/docs/deploy/local-run.md +++ b/docs/deploy/local-run.md @@ -16,7 +16,7 @@ python3 pip install -r requirements.txt ## 进入源代码目录并且创建版本信息 ```bash -cd src +cd backend/src echo "VERSION = 'local'" >> module/__version__.py ``` From 4a69de455a651cd6b65406865a97e4eca80895fb Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Thu, 6 Jul 2023 12:45:20 +0800 Subject: [PATCH 2/7] docs: fix vitepress index --- docs/deploy/Docker-cli.md | 2 +- docs/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/deploy/Docker-cli.md b/docs/deploy/Docker-cli.md index aee73295..7481166a 100644 --- a/docs/deploy/Docker-cli.md +++ b/docs/deploy/Docker-cli.md @@ -2,7 +2,7 @@ ### 设置环境变量 -添加环境变量(注意这里最好手动输入)详细内容请参考 [Docker Compose](https://github) 章节中同样内容 +添加环境变量(注意这里最好手动输入)详细内容请参考 [Docker Compose](/deploy/Docker-compose) 章节中同样内容 ```shell export \ diff --git a/docs/index.md b/docs/index.md index 923b92dd..83584ef3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,7 +8,7 @@ hero: actions: - theme: brand text: 快速开始 - link: /home/ + link: /deploy/quickstart - theme: alt text: 更新日志 link: /changelog/3.0 From d5101fa3f21cdc41f97b663367f8ea8d07520195 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Thu, 6 Jul 2023 13:11:50 +0800 Subject: [PATCH 3/7] docs: update index.md --- docs/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index 83584ef3..d773fe7e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,11 +14,11 @@ hero: link: /changelog/3.0 features: - - title: Feature A + - title: 自动解析下载规则 details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature B + - title: 自动重命名 details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature C + - title: 一键管理 details: Lorem ipsum dolor sit amet, consectetur adipiscing elit --- From 21ca59a0b6ed1fa80711730fda308a4d0631fc9d Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Thu, 6 Jul 2023 13:12:35 +0800 Subject: [PATCH 4/7] change: remove submodule --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 3d0bec7f..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "docs/wiki"] - path = docs/wiki - url = https://github.com/EstrellaXD/Auto_Bangumi.wiki.git From 8690030dc80fb0d37859d90acb60e8f3dca01362 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Thu, 6 Jul 2023 13:16:47 +0800 Subject: [PATCH 5/7] docs: building test --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index d773fe7e..7fae9578 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,7 +8,7 @@ hero: actions: - theme: brand text: 快速开始 - link: /deploy/quickstart + link: /deploy/ - theme: alt text: 更新日志 link: /changelog/3.0 From ac62c98a31ccf644098ff71c0d5ec09df460a298 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Thu, 6 Jul 2023 14:23:54 +0800 Subject: [PATCH 6/7] =?UTF-8?q?docs:=20=E9=83=A8=E7=BD=B2=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 7fae9578..28be00e8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -15,7 +15,7 @@ hero: features: - title: 自动解析下载规则 - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + details: 自动解析 Mikan Project RSS 并下载 - title: 自动重命名 details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - title: 一键管理 From b96d8215b7148ac75bcbb799ce54e3cbddb77778 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Thu, 6 Jul 2023 14:29:32 +0800 Subject: [PATCH 7/7] =?UTF-8?q?docs:=20=E9=83=A8=E7=BD=B2=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 28be00e8..73bc46c3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,7 +17,7 @@ features: - title: 自动解析下载规则 details: 自动解析 Mikan Project RSS 并下载 - title: 自动重命名 - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + details: 自动管理下载重命名的种子 - title: 一键管理 details: Lorem ipsum dolor sit amet, consectetur adipiscing elit ---