Skip to content

Commit

Permalink
v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Shua-github committed Jan 23, 2025
1 parent 50ce764 commit a66f2bb
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 15 deletions.
6 changes: 3 additions & 3 deletions CoreConfig.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
core:
temp_output: temp_output #输出缓存
temp_image: temp_image #图像缓存
jm_switch: False #是否开启外置jm库配置,默认使用内置配置
supported_formats: [pdf,zip] #支持的格式,没事请勿修改
jm: # 警告!下面是外置jm库配置,没事请勿修改
jm_switch: False #是否开启外置jm库配置,正常使用无需开启
supported_formats: [pdf,zip] #支持的格式,正常使用无需修改
jm: # 警告!下面是外置jm库配置
dir_rule:
base_dir: '' #图像缓存目录
download:
Expand Down
1 change: 0 additions & 1 deletion JMComicAPICore/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,5 @@ def _run(self, host: str, port: int):
参数:
- host (str): 服务器地址
- port (int): 端口号
- reload (bool): 是否启用代码热重载(默认开发环境使用)
"""
uvicorn.run(self.app, host=host, port=port)
2 changes: 1 addition & 1 deletion JMComicAPICore/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ def _read_config(self, config_path: str):
except KeyError as e:
raise KeyError(f"配置文件缺少必要的字段: {e}")
except Exception as e:
raise RuntimeError(f"读取配置时发生错误: {e}")
raise RuntimeError(f"{e}")
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@

## 功能
- [x] 传入本子`ID`返回`JSON`或文件
- [x] 文件服务
- [x] 文件提供
- [ ] 支持传入列表以批量下载本子
- [ ] 支持传入配置,针对用户长期记忆配置
- [ ] 提供输出加密

## 运行
1. 条件:理论`Python`>=3.7以上均可(我是使用3.12.8)
### `Windows`用户
1. 前往[Releases](https://github.com/Shua-github/JMComic-API-Python/releases)下载压缩包
2. 解压到一个文件夹
3. 运行`app.exe`

### 其它
1. 环境:理论`Python`>=3.7以上均可(推荐使用3.12)
2. 拉取本项目```git clone https://github.com/Shua-github/JMComic-API-Python.git```
3. `Windows`用户可以执行`Windows.bat`,`Macos``Liunx`用户可以执行`Macos丨Liunx.sh`
4. 运行`app.py`
3. 运行`venv_config.sh`
4. 执行`python app.py`

## 配置
网络在`RunConfig.yml`,核心在`CoreConfig.yml`
Expand All @@ -22,4 +28,7 @@
## 谢谢他们和它们
- [JMComic-Crawler-Python](https://github.com/hect0x7/JMComic-Crawler-Python)

- [![Contributors](https://contributors-img.web.app/image?repo=Shua-github/JMComic-API-Python)](https://github.com/Shua-github/JMComic-API-Python/graphs/contributors)
- [![Contributors](https://contributors-img.web.app/image?repo=Shua-github/JMComic-API-Python)](https://github.com/Shua-github/JMComic-API-Python/graphs/contributors)

## 其它
出现问题请开`issues`
2 changes: 1 addition & 1 deletion RunConfig.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
net:
host: "0.0.0.0"
port: 5000
core_path: "CoreConfig.yml"
core_config_path: "CoreConfig.yml"
4 changes: 0 additions & 4 deletions Windows.bat

This file was deleted.

File renamed without changes.

0 comments on commit a66f2bb

Please sign in to comment.