Skip to content

Commit 7b5612e

Browse files
committed
update document
1 parent b0ea16f commit 7b5612e

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

docs/en/docs/getting-started.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ If you want to try out the latest features or fixes, consider installing from so
3434
pip install -U "comiclib[full] @ git+https://github.com/comiclib/comiclib.git"
3535
```
3636

37+
### Docker (Experimental)
38+
39+
``` bash
40+
docker run -p 8000:8000 \
41+
--mount type=bind,source=<YOUR_COMIC_DIRECTORY_HERE>,target=/root/comiclib \
42+
urenko/comiclib
43+
```
44+
ComicLib now runs at http://localhost:8000 .
45+
46+
P.S.: Monitoring comic folders is disabled by default for Docker currently.
47+
48+
3749
## Launch
3850

3951
Change the working directory to the location of your comic library and run the following command to start:

docs/en/docs/scanner.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ See [Settings](settings.md) to change the behavior.
1818

1919
Treat *.zip files as comic files.
2020

21+
### 11-archive.py
22+
23+
Treat regular archived files, except zip, as comic files.
24+
It requires 7-Zip, download it from [https://7-zip.org/download.html](https://7-zip.org/download.html) and make sure 7zzs or 7zz or 7z is in the working directory or the directory indicated by PATH. 7-Zip obtained from some other sources may not support rar files.
25+
2126
### 20-ccloli.py
2227

2328
Parse comic files downloaded via [ccloli/E-Hentai-Downloader](https://github.com/ccloli/E-Hentai-Downloader).
@@ -64,14 +69,15 @@ The basic structure of scanners is as follows
6469
``` python
6570
from pathlib import Path
6671
from typing import Union
72+
from pydantic import Field
6773
from pydantic_settings import BaseSettings
6874
# some import and pre-process
6975
# this may be executed multiple times, thus should avoid things like opening files
7076

7177
# optional
7278
class Settings(BaseSettings):
7379
myscanner_settingA: bool = True # It is recommended to prefix with the scanner name
74-
myscanner_settingB: Union[bool, str] = True
80+
myscanner_settingB: Union[bool, str] = Field(default=True, union_mode='left_to_right')
7581
settings = Settings()
7682

7783
class Scanner:

docs/zh/docs/getting-started.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@
3434
pip install -U "comiclib[full] @ git+https://github.com/comiclib/comiclib.git"
3535
```
3636

37+
### Docker(试验性)
38+
39+
``` bash
40+
docker run -p 8000:8000 \
41+
--mount type=bind,source=你的漫画库路径,target=/root/comiclib \
42+
urenko/comiclib
43+
```
44+
现在 ComicLib 运行在了 http://localhost:8000
45+
46+
注:目前监视漫画文件夹默认对 Docker 禁用。
47+
48+
3749
## 运行
3850

3951
切换工作目录到你的漫画库的位置,通过如下命令启动:

docs/zh/docs/scanner.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ ComicLib 的主体仅负责遍历漫画库,漫画文件的判断、解析等
1818

1919
*.zip 文件作为漫画文件。
2020

21+
### 11-archive.py
22+
23+
将常见压缩文件(除 zip 外)作为漫画文件。
24+
需要安装 7-Zip,请从 [https://7-zip.org/download.html](https://7-zip.org/download.html) 下载并确保 7zzs 或 7zz 或 7z 处在工作目录或 PATH 指示的目录内。从其他一些渠道获取的 7-Zip 可能不支持 rar 文件。
25+
2126
### 20-ccloli.py
2227

2328
解析通过 [ccloli/E-Hentai-Downloader](https://github.com/ccloli/E-Hentai-Downloader) 下载的漫画文件。
@@ -63,14 +68,15 @@ ComicLib 的主体仅负责遍历漫画库,漫画文件的判断、解析等
6368
``` python
6469
from pathlib import Path
6570
from typing import Union
71+
from pydantic import Field
6672
from pydantic_settings import BaseSettings
6773
# some import and pre-process
6874
# this may be executed multiple times, thus should avoid things like opening files
6975

7076
# optional
7177
class Settings(BaseSettings):
7278
myscanner_settingA: bool = True # It is recommended to prefix with the scanner name
73-
myscanner_settingB: Union[bool, str] = True
79+
myscanner_settingB: Union[bool, str] = Field(default=True, union_mode='left_to_right')
7480
settings = Settings()
7581

7682
class Scanner:

0 commit comments

Comments
 (0)