jmci
A high-level wrapper around jmcomic that provides a fluent search and download API plus a simple CLI.
jmci keeps the most common album search and download workflows, while hiding lower-level details of jmcomic.
Features
- Fluent, chainable search API for albums
- Flexible download API with folder, PDF, and ZIP export formats
- Built-in CLI:
jmci searchandjmci download - Logging and progress output with rich formatting
- Minimal wrapper focused on the most useful
jmcomicworkflows
Install
Requires Python 3.12+
pip install jmci
Or with uv:
uv add jmci
Quick Start
Python API
from jmci import Download, Search, SearchType, ExportFormat, enable_logging
# Enable rich logging
enable_logging(True)
# Search albums
results = (
Search("keyword")
.searching(SearchType.author)
.pages([1, 2])
.order_by("score")
.filter_time("week")
.category("doujin")
.sub_category("chinese")
.process()
)
for item in results:
print(item.id, item.title)
# Download one or more albums
(
Download([123456, 789012])
.export_format(ExportFormat.folder | ExportFormat.pdf)
.directory("./downloads")
.jpg(True)
.pictures(30)
.process()
)
CLI
jmci search "keyword" --search-type author --order-by score --pages 1 2 --filter-time week
jmci download 123456 --directory ./downloads --export-format pdf zip --jpg
jmci download 123456 --cover
API Overview
Search
Use Search to build a search request and execute it with process().
from jmci import Search, SearchType, OrderBy, FilterTime, Category, SubCategory
results = (
Search("keyword")
.searching(SearchType.tag)
.pages([1])
.order_by(OrderBy.latest)
.filter_time(FilterTime.all)
.category(Category.all)
.sub_category(SubCategory.none)
.process()
)
Search supports:
searching(type)— chooseSearchType(all, work, author, tag, actor)pages(pages)— search pagination pageskeyword(keyword)— update the search keywordorder_by(order_by)— ordering strategyfilter_time(filter_time)— publication time filtercategory(category)— main category filtersub_category(sub_category)— subcategory filterprocess()— execute the search and return resultsprocess_select(converter)— convert results while processingwhere(filter),sort(key),reverse(),join(...)— filter and transform results
SearchResult objects expose:
idtitletags
Download
Use Download to download albums with configurable export options.
from jmci import Download, ExportFormat
(
Download([123456])
.directory("./downloads")
.export_format(ExportFormat.folder | ExportFormat.zip)
.jpg(True)
.pictures(20)
.process()
)
Download supports:
downloading(album_ids)— replace the album listadd(id),remove(id),pop(index),insert(index, id),extend(ids)— manage album IDsexport_format(format)— set output formatadd_export_format(format)/remove_export_format(format)— modify format setdirectory(directory)— output directoryjpg(convert_to_jpg=True)— convert pictures to JPGpictures(pictures)— limit download concurrency per albumprocess()— perform full album download and exportprocess_download_cover()— download album cover images only
Supported export formats:
ExportFormat.folderExportFormat.pdfExportFormat.zip
Formats can be combined using bitwise OR.
Logging
jmci exposes enable_logging() to toggle rich logging output.
from jmci import enable_logging
enable_logging(True)
Documentation
Documentation is available under docs/source and can be built with Sphinx:
uv run sphinx-build -b html docs/source docs/build
Dependencies
jmci is a lightweight wrapper and depends on:
jmcomicrichtyperbeartypeimg2pdf
License
MIT License
Metadata
Release files for jmci 0.1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jmci-0.1.0.2.tar.gz | 35.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jmci-0.1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.4 MB
Release files / jmci-0.1.0.2.tar.gz
| Download URL | jmci-0.1.0.2.tar.gz |
|---|---|
| Size | 35.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
503c567ce9cf6ba65717d1c9f509ae6d0a53671db0e3cd530e0f98080b94a79c
|
|
BLAKE2b-256 checksum How to use checksums |
c9ba76383452fd8bc818fa03cbd7fe05ea1cae5bea592def8a9b985567cdf660
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / jmci-0.1.0.2-py3-none-any.whl
| Download URL | jmci-0.1.0.2-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a90f0a964361eedd4cf3069707b78e55d9967b7c51d18324bd57c805a56dd69
|
|
BLAKE2b-256 checksum How to use checksums |
a24d4375876b1fc70659eb78e899555b62b03dadeb180659095c3ce6b6a70ac3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|