Skip to content

Commit 37d7e97

Browse files
committed
v0.0.1b2
1 parent b82f84f commit 37d7e97

12 files changed

Lines changed: 30 additions & 24 deletions

File tree

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
English | [中文](https://github.com/comiclib/comiclib/blob/master/README.zh.md)
55

6-
💬 Join Discussion: [![Discord](https://img.shields.io/discord/1100655762411372604?logo=discord&style=flat-square)](https://discord.gg/UmjCbgGUFW)
7-
86
# ✨ Features
97
- 📁 Support [multiple archive formats](https://comiclib.github.io/comiclib/en/supported-formats/)
108
- 🏷️ Support tag and category metadata import and management
@@ -45,10 +43,6 @@ where `--host 0.0.0.0` specifies the bound IP (`0.0.0.0` enables LAN access), an
4543

4644
📄 Please see the [documentation](https://ComicLib.github.io/comiclib/en/) for more settings.
4745

48-
# ⚠️ Warning
49-
50-
ComicLib is currently in an early development stage🚧, and many things may change as new features are added. Click *watch* in the upper right corner of GitHub or join our group to be notified of the first official release.
51-
5246
# 👩‍💻 Contributing
5347
Contributions, issues and feature requests are very much welcome.
5448
Feel free to join the group for deeper communication.

README.zh.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
中文 | [English](https://github.com/comiclib/comiclib/blob/master/README.md)
55

6-
💬 加入讨论: [![Discord](https://img.shields.io/discord/1100655762411372604?logo=discord&style=flat-square)](https://discord.gg/UmjCbgGUFW)
7-
86
# ✨ 特点
97
- 📁 支持[多种存档格式](https://comiclib.github.io/comiclib/zh/supported-formats/)
108
- 🏷️ 支持tag和分类元数据导入和管理
@@ -45,10 +43,6 @@ uvicorn comiclib.main:app --host 0.0.0.0 --port 80
4543

4644
📄 更多设置请查看[文档](https://ComicLib.github.io/comiclib/zh/)
4745

48-
# ⚠️ 警告
49-
50-
目前ComicLib正处在早期开发阶段🚧,随着新功能的加入,很多东西都可能变化。点击GitHub右上角的watch或者加入我们的群组以获取第一个正式版本的通知。
51-
5246
# 👩‍💻 贡献
5347
我们非常欢迎贡献、问题和功能请求。
5448
欢迎加入群组以深度交流。

comiclib/LANraragi/public/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ Index.checkVersion = function () {
411411

412412
if (latestVersion > currentVersion) {
413413
LRR.toast({
414-
heading: `A new version of LANraragi (${data.tag_name}) is available !`,
414+
heading: `A new version of ComicLib (${data.tag_name}) is available !`,
415415
text: `<a href="${data.html_url}">Click here to check it out.</a>`,
416416
icon: "info",
417417
closeOnClick: false,

comiclib/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.0.1b1"
1+
__version__ = "0.0.1b2"
22
print(f" >>> ComicLib v{__version__}")
33

44
from .scan import watch, scannow

comiclib/scanner/40-thumb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ def scan(self, path: Path, id: str, metadata: dict, prev_scanners: list[str]) ->
1111
if not prev_scanners or not metadata.get('thumb') is None:
1212
return False
1313
logger.info(f' <- {path}')
14-
thumb = extract_thumbnail(path, id, 1)
14+
thumb = extract_thumbnail(path, id, 1, cover=True)
1515
metadata['thumb'] = str(thumb)
1616
return True

docs/en/docs/getting-started.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ For more settings, please refer to [Gunicorn's documentation](https://docs.gunic
113113

114114
In the end your command might look like this (my personal use case):
115115
``` bash
116-
CONTENT=../mycomics/ UA_convert_jxl= thumb=/tmp/thumb/ gunicorn comiclib.main:app --worker-class uvicorn.workers.UvicornWorker --bind unix:/tmp/comiclib.sock --preload --workers 4
116+
CONTENT=../mycomics/ thumb=/tmp/thumb/ gunicorn comiclib.main:app --worker-class uvicorn.workers.UvicornWorker --bind unix:/tmp/comiclib.sock --preload --workers 4
117117
```
118+
or
119+
``` bash
120+
importEHdb_matchtorrent=False importEHdb_matchtitle=False CONTENT=../mycomics/ thumb=/tmp/thumb/ uvicorn comiclib.main:app --uds /tmp/comiclib.sock --reload --log-level trace
121+
```
122+
for debugging.
118123
Then use Nginx to reverse proxy to HTTPS connection.

docs/en/docs/settings.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ The following is a list of available settings:
2929
| `debug` | Turn on debug output (`True`/`False`) | `False` |
3030
| `loglevel` | Log level (`DEBUG`/`INFO`/`WARNING`/`ERROR`/`CRITICAL`). If `debug` is `True`, it will be overwritten to `DEBUG` | `INFO` |
3131
| `content` | The path where the comic file is stored | `.` |
32-
| `thumb` | The path where the generated thumbnails are stored | `./thumb`|
32+
| `cover` | The path where the generated cover thumbnails are stored | `./thumb`|
33+
| `thumb` | The path where the generated page thumbnails are stored. If not provided (`None`), will be the same as `cover`. | `None`|
3334
| `metadata` | The URL for metadata database, refer to [SQLAlchemy documentation](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls) | `sqlite:///./comiclib_metadata.db` |
34-
| `password` | Admin password (also used as API Key currently). If it is `None`, any visitor will have editing permissions. This feature is designed to protect against gentlemen but not villains. If you need security protection, please use e.g. the HTTP basic authentication of the reverse proxy, Cloudflare Access or TLS client certificate, etc. | `None`|
35+
| `password` | Admin password (also used as API Key currently) [^1]. If it is `None`, any visitor will have editing permissions. This feature is designed to protect against gentlemen but not villains. If you need security protection, please use e.g. the HTTP basic authentication of the reverse proxy, Cloudflare Access or TLS client certificate, etc. | `None`|
3536
| `skip_exists`| Skip comics that have been scanned into the metadata database during scanning? (`True`/`False`) | `True` |
3637
| `watch` | Monitor comic folders and automatically scan (`True`/`False`) | `True` |
3738
| `UA_convert_jxl` | For requests with matched user-agent, convert JPEG XL files to other popular formats on the server side. The value is a regular expression. | `Android` |
3839
| `UA_convert_all` | For requests with matched user-agent, convert all files to other popular formats on the server side. The value is a regular expression. | `\b\B` (will not match anything) |
3940

40-
For the settings of the scanners, please refer to the respective instructions.
41+
In addition, there are settings for scanners, please refer to the respective instructions.
42+
43+
[^1]: The security system may change in future versions, including the meaning of the environment variable `password`.

docs/en/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ copyright: Copyright &copy; 2023 ComicLib
3434
markdown_extensions:
3535
- tables
3636
- def_list
37+
- footnotes
3738
- pymdownx.highlight:
3839
anchor_linenums: true
3940
line_spans: __span

docs/zh/docs/getting-started.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ gunicorn comiclib.main:app --worker-class uvicorn.workers.UvicornWorker --bind 0
113113

114114
最后你的命令可能会像这样(我的个人用例):
115115
``` bash
116-
CONTENT=../mycomics/ UA_convert_jxl= thumb=/tmp/thumb/ gunicorn comiclib.main:app --worker-class uvicorn.workers.UvicornWorker --bind unix:/tmp/comiclib.sock --preload --workers 4
116+
CONTENT=../mycomics/ thumb=/tmp/thumb/ gunicorn comiclib.main:app --worker-class uvicorn.workers.UvicornWorker --bind unix:/tmp/comiclib.sock --preload --workers 4
117117
```
118+
或者
119+
``` bash
120+
importEHdb_matchtorrent=False importEHdb_matchtitle=False CONTENT=../mycomics/ thumb=/tmp/thumb/ uvicorn comiclib.main:app --uds /tmp/comiclib.sock --reload --log-level trace
121+
```
122+
用于调试。
118123
然后通过 Nginx 反代为 HTTPS 连接。

docs/zh/docs/settings.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@
2929
| `debug` | 开启调试输出(`True`/`False`| `False` |
3030
| `loglevel` | 日志级别(`DEBUG`/`INFO`/`WARNING`/`ERROR`/`CRITICAL`),若`debug``True`,会被覆盖为`DEBUG` | `INFO` |
3131
| `content` | 漫画文件存放的路径 | `.` |
32-
| `thumb` | 生成的缩略图存放的路径 | `./thumb`|
32+
| `cover` | 生成的封面缩略图存放的路径。 | `./thumb`|
33+
| `thumb` | 生成的页面缩略图存放的路径。如果未提供 (`None`),会和 `cover` 的值一样。| `None`|
3334
| `metadata` | 元数据库 URL,参考[SQLAlchemy 文档](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls) | `sqlite:///./comiclib_metadata.db` |
34-
| `password` | 管理密码(目前也用作 API 密钥),若为`None`则任何访客皆可编辑。此功能防君子不防小人,若需安全保护请借助反向代理的 HTTP 基本验证、Cloudflare Access 或 TLS 客户端证书等。| `None`|
35+
| `password` | 管理密码(目前也用作 API 密钥)[^1],若为`None`则任何访客皆可编辑。此功能防君子不防小人,若需安全保护请借助反向代理的 HTTP 基本验证、Cloudflare Access 或 TLS 客户端证书等。| `None`|
3536
| `skip_exists`| 扫描时是否跳过曾扫入元数据库的漫画?(`True`/`False`| `True` |
3637
| `watch` | 监视漫画文件夹,自动扫描 (`True`/`False`| `True` |
3738
| `UA_convert_jxl` | 对于哪些 user-agent 的请求在服务端将 JPEG XL 文件转为其他流行格式,该值是一个用于匹配的正则表达式 | `Android` |
3839
| `UA_convert_all` | 对于哪些 user-agent 的请求在服务端将所有文件转为其他流行格式,该值是一个用于匹配的正则表达式 | `\b\B`(不匹配任何东西)|
3940

40-
对于扫描脚本的设置,请参看各自的说明。
41+
此外还有扫描脚本的设置,请参看各自的说明。
42+
43+
[^1]: 安全系统可能在未来的版本变更,包括环境变量 `password` 的含义。

0 commit comments

Comments
 (0)