-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.3.10: 搭建readthedocs文档网站并迁移所有文档,新增插件—下载图片后缀过滤器,优化代码。(#152)
- Loading branch information
Showing
53 changed files
with
741 additions
and
739 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.12" | ||
mkdocs: | ||
configuration: assets/docs/mkdocs.yml | ||
|
||
# Optionally declare the Python requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: assets/docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
site_name: jmcomic | ||
theme: | ||
name: readthedocs | ||
highlightjs: true | ||
plugins: | ||
- search | ||
- mkdocstrings: | ||
custom_templates: templates | ||
handlers: | ||
# See: https://mkdocstrings.github.io/python/usage/ | ||
python: | ||
paths: [ '../../src/' ] | ||
options: | ||
docstring_style: sphinx | ||
|
||
|
||
markdown_extensions: | ||
- markdown_include.include: | ||
base_path: . | ||
- admonition | ||
|
||
docs_dir: sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mkdocs | ||
mkdocstrings[python] | ||
markdown-include | ||
mkdocs-material |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 大版本更新内容计划 | ||
# Plan For Update Content | ||
|
||
| 版本范围 | 更新内容 | | ||
|:--------:|:--------------------------------------:| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# client | ||
|
||
::: jmcomic.jm_client_impl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# config | ||
|
||
::: jmcomic.jm_config.JmModuleConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# download | ||
|
||
::: jmcomic.api | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# entity | ||
|
||
::: jmcomic.jm_entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# option | ||
|
||
::: jmcomic.jm_option.JmOption |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# plugin | ||
|
||
::: jmcomic.jm_plugin |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# jmcomic | ||
|
||
Python API for JMComic(禁漫天堂) | ||
|
||
## Features | ||
|
||
- Bypasses Cloudflare anti-bot measures. | ||
- Multiple usage ways: | ||
|
||
- GitHub Actions: Requires only a GitHub account. (See | ||
tutorial → [Tutorial - Download Album via GitHub Actions](./tutorial/1_github_actions.md)) | ||
|
||
- Command line: No need to write Python code, simple and easy to use. (See tutorial → [Tutorial - Download Album via Command Line](./tutorial/2_command_line.md)) | ||
- Python code: The most flexible and powerful way, requires some basic knowledge of Python programming. | ||
|
||
- Supports two client implementations: web-based and mobile-based. Switchable through configuration (mobile-based has | ||
better IP compatibility, web-based has higher efficiency). | ||
- Supports automatic request retry and domain switching mechanism. | ||
- Multi-threaded downloading (can be fine-tuned to one thread per image, highly efficient). | ||
- Highly configurable: | ||
|
||
- Can be used without configuration, very convenient. | ||
- Configuration can be generated from a configuration file, supports multiple file formats. | ||
- Configuration options | ||
include: `request domain`, `client implementation`, `number of chapters/images downloaded simultaneously`, `image format conversion`, `download path rules`, `request metadata (headers, cookies, proxies)`, | ||
and more. | ||
|
||
- Highly extensible: | ||
|
||
- Supports Plugin plugins for easy functionality extension and use of other plugins. | ||
- Currently built-in | ||
plugins: `login plugin`, `hardware usage monitoring plugin`, `only download new chapters plugin`, `zip compression plugin`. | ||
- Supports custom callback functions before and after downloading album/chapter/images. | ||
- Supports custom debug logging. | ||
- Supports custom core | ||
classes: `Downloader (responsible for scheduling)`, `Option (responsible for configuration)`, `Client (responsible for requests)`, `entity classes`, | ||
and more. | ||
|
||
## Install | ||
|
||
- Install via official pip source (recommended, and also used for updates): | ||
|
||
``` | ||
pip install jmcomic -i https://pypi.org/project --upgrade | ||
``` | ||
|
||
- Install via GitHub code: | ||
|
||
``` | ||
pip install git+https://github.com/hect0x7/JMComic-Crawler-Python | ||
``` | ||
|
||
## Getting Started | ||
|
||
### 1. Download album: | ||
|
||
- Python code | ||
|
||
```python | ||
import jmcomic | ||
# Pass the ID of the album you want to download, and it will download all chapters of the album to your local machine. | ||
jmcomic.download_album('422866') | ||
``` | ||
|
||
- Command line | ||
|
||
``` | ||
jmcomic 422866 | ||
``` | ||
|
||
### 2. Customize download behavior using an option: | ||
|
||
For example, if you want to convert all downloaded images to the .jpg format, you can create a YAML file with the | ||
following content (refer to [option file syntax](./option_file_syntax.md)): | ||
|
||
```yml | ||
download: | ||
image: | ||
suffix: .jpg # Don't forget the '.' | ||
``` | ||
Then, use one of the following ways: | ||
* Python code | ||
```python | ||
from jmcomic import download_album, create_option | ||
option = create_option('/path/to/your/optionfile') | ||
download_album('422866', option) | ||
``` | ||
|
||
* Command line | ||
|
||
``` | ||
jmcomic 422866 --option="/path/to/your/optionfile" | ||
``` | ||
|
||
## Acknowledgement | ||
|
||
### Image Segmentation Algorithm Code + JMComic Mobile API | ||
|
||
[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=tonquer&repo=JMComic-qt)](https://github.com/tonquer/JMComic-qt) |
Oops, something went wrong.