<p align="center" style="text-decoration:none">
<img align="center" src="https://cdn.jsdelivr.net/gh/Ljzd-PRO/KToolBox@latest/static/repository-open-graph-2.svg" alt="logo">
</p>
<h1 align="center">
KToolBox
</h1>
<p align="center">
KToolBox is a useful CLI tool for downloading posts content in
<a href="https://kemono.cr/">Kemono.cr / Kemono.su / Kemono.party</a>
</p>
<p align="center">
<a href="https://pypi.org/project/ktoolbox" target="_blank">
<img src="https://img.shields.io/github/v/release/Ljzd-PRO/KToolBox?logo=python" alt="Version">
</a>
<a href="https://pypi.org/project/ktoolbox" target="_blank">
<img src="https://img.shields.io/pypi/dm/ktoolbox?label=pypi-downloads" alt="PyPI Downloads">
</a>
<a href="https://github.com/Ljzd-PRO/KToolBox/releases" target="_blank">
<img src="https://img.shields.io/github/downloads/Ljzd-PRO/KToolBox/total?label=github-downloads" alt="GitHub Release Downloads">
</a>
<a href="./LICENSE">
<img src="https://img.shields.io/github/license/Ljzd-PRO/KToolBox" alt="BSD 3-Clause"/>
</a>
<a href="https://github.com/Ljzd-PRO/KToolBox/activity">
<img src="https://img.shields.io/github/last-commit/Ljzd-PRO/KToolBox/devel" alt="Last Commit"/>
</a>
<a href="https://codecov.io/gh/Ljzd-PRO/KToolBox" target="_blank">
<img src="https://codecov.io/gh/Ljzd-PRO/KToolBox/branch/master/graph/badge.svg?token=5XK9CYQHQN" alt="codecov"/>
</a>
<a href='https://ktoolbox.readthedocs.io/'>
<img src='https://readthedocs.org/projects/ktoolbox/badge/?version=latest' alt='Documentation Status' />
</a>
<a style="text-decoration:none">
<img src="https://img.shields.io/badge/Platform-Windows%20|%20Linux%20|%20macOS-blue" alt="Platform Win | Linux | macOS"/>
</a>
</p>
<p align="center">
<a href="./README.md">English</a> | <a href="./README_zh-CN.md">中文</a>
</p>
<p align="center">
<a href='https://ko-fi.com/N4N51J14RW'>
<img src='https://ko-fi.com/img/githubbutton_sm.svg' alt='ko-fi' />
</a>
</p>
## Features
- Support concurrent downloading of multiple files
- Automatically retry on API call or download failure
- Support downloading a single post or **all posts** of a specified artist
- Can **update downloaded** artist directories to the latest state
- Support customizing the **file and directory name format** and **directory structure** for downloaded posts/artists
- For example, the post directory can be set to the format `[2025-01-02]_TheTitle`, and image files can be named sequentially as `1.jpg`, `2.jpg`, etc.
- If you want to store all images from an artist's posts in a single directory for preview, you can use the `job.mix_posts` config option with a custom filename format to get a directory with hundreds or thousands of images
- Such as `[2025-01-02]_TheTitle_1.jpg`, `[2025-01-02]_TheTitle_2.jpg`, `[2025-01-02]_TheTitle_3.jpg`, etc.
- Support excluding **specified file formats** or downloading only specified formats
- For example, if you don't want to download large and duplicate PSD or archive files, you can exclude `.psd` and `.zip` files in the config
- Support filtering downloads by **file size**
- For example, if you want to avoid downloading large video files when running out of disk space, you can set a maximum file size limit in the config
- You can also set a minimum file size to skip downloading thumbnail or preview images
- Support filtering downloads by post **title keywords**
- For example, if you only want to download posts whose titles contain "表情" or "効果音差分", you can use the `sync-creator` command with the `--keywords` option
- You can also exclude posts with specific keywords in the title using the `--keywords-exclude` option
- Support filtering downloads by post **publish date range**
- Can parse and download images contained in the multi-info text of the post page HTML
- These posts are characterized by images not loading immediately when the browser enters the page, and no preview images
- Can collect **cloud drive links** listed on the post page and save them to a text file
- Can search for artists and posts, and export results
- If you want to process artist and post data yourself, you can use this feature to export JSON data
- Cross-platform support, with iOS shortcuts provided
- The pure Python branch can run on iOS a-Shell or in the browser via Pyodide
- For _Coomer.st / Coomer.su / Coomer.party_ support, please refer to the documentation [Coomer](https://ktoolbox.readthedocs.io/latest/zh/coomer/)
## Dev Plan
- [ ] GUI
- [ ] Discord support
## Tutorial
See [documentation](https://ktoolbox.readthedocs.io/) for more details.
### Installation
You can use executables from [releases](https://github.com/Ljzd-PRO/KToolBox/releases) page
Manually install:
- Recommend
```bash
pip3 install pipx
# Windows
pipx install ktoolbox[urwid,winloop]
# Linux / macOS
pipx install ktoolbox[urwid,uvloop]
```
- For [a-Shell](https://github.com/holzschu/a-shell) or [pyodide](https://pyodide.org/en/stable/),
or if you can only use pure Python and you cannot compile [pydantic](https://docs.pydantic.dev/latest/) v2.x.x
```bash
pip3 install ktoolbox-pure-py
```
### Command
For more information, use the help command or goto [Command](https://ktoolbox.readthedocs.io/latest/commands/guide) page.
#### ❓ Get general help
```bash
ktoolbox -h
```
#### ❓ Get help of a command
```bash
ktoolbox download-post -h
```
#### ⬇️🖼️ Download a specific post
```bash
ktoolbox download-post https://kemono.su/fanbox/user/49494721/post/6608808
```
If some files failed to download, you can try to execute the command line again,
the downloaded files will be **skipped**.
#### ⬇️🖌️ Download posts from a creator
```bash
# Download all posts of the creator/artist
ktoolbox sync-creator https://kemono.su/fanbox/user/9016
# Download latest 10 posts of the creator/artist
ktoolbox sync-creator https://kemono.su/fanbox/user/9016 --length=10
# Download latest No.11-No.15 posts of the creator/artist
ktoolbox sync-creator https://kemono.su/fanbox/user/9016 --offset=10 --length=5
# Download posts from the creator/artist from 2024-1-1 to 2024-3-1
ktoolbox sync-creator https://kemono.su/fanbox/user/9016 --start-time=2024-1-1 --end-time=2024-3-1
# Download posts from the creator/artist whose title contains "表情"
ktoolbox sync-creator https://kemono.su/fanbox/user/9016 --keywords "表情"
# Download posts from the creator/artist whose title contains "表情" or "効果音差分"
ktoolbox sync-creator https://kemono.su/fanbox/user/9016 --keywords "表情,効果音差分"
```
### Configuration
- Download 10 files at the same time
- Rename attachments in numerical order, e.g. `1.png`, `2.png`, ...
- Prefix the post directory name with its release/publish date, e.g. `[2024-1-1]HelloWorld`
- Use the post title as the prefix for file names, e.g. `HelloWorld_1.png`, `HelloWorld_2.png`, ...
- Download revisions of posts
- Exclude `.psd` and `.zip` files
- Extract cloud drive links from posts and save them to a text file
- ...
Goto [Configuration-Guide](https://ktoolbox.readthedocs.io/latest/configuration/guide/) page for more details.


### iOS Shortcuts
Goto [Shortcuts for iOS](https://ktoolbox.readthedocs.io/latest/shortcut/) page for more details.
## Other Branches
- Pure Python branch: [🔗pure-py](https://github.com/Ljzd-PRO/KToolBox/tree/pure-py)
- Use pydantic v1 so that cargo is not needed for installation
- For example, you can use it on iOS terminal App [a-Shell](https://github.com/holzschu/a-shell)
- 🔗[PyPI](https://pypi.org/project/ktoolbox-pure-py/)
- Development branch: [🔗devel](https://github.com/Ljzd-PRO/KToolBox/tree/devel)
## Code Coverage

## License
KToolBox is licensed under BSD 3-Clause.
Copyright © 2023 by Ljzd-PRO.
Raw data
{
"_id": null,
"home_page": "https://ktoolbox.readthedocs.io/",
"name": "ktoolbox-pure-py",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.8",
"maintainer_email": null,
"keywords": "kemono, kemono.cr, kemono.su, kemono.party, cli-app, downloader, os-independent",
"author": "Ljzd-PRO",
"author_email": "me@ljzd.link",
"download_url": "https://files.pythonhosted.org/packages/73/af/b16beca23d5f6e620fab07cd26db5478e4fdcef2b7749bd16a086392492d/ktoolbox_pure_py-0.23.0.tar.gz",
"platform": null,
"description": "<p align=\"center\" style=\"text-decoration:none\">\n <img align=\"center\" src=\"https://cdn.jsdelivr.net/gh/Ljzd-PRO/KToolBox@latest/static/repository-open-graph-2.svg\" alt=\"logo\">\n</p>\n\n<h1 align=\"center\">\n KToolBox\n</h1>\n\n<p align=\"center\">\n KToolBox is a useful CLI tool for downloading posts content in\n <a href=\"https://kemono.cr/\">Kemono.cr / Kemono.su / Kemono.party</a>\n</p>\n\n<p align=\"center\">\n <a href=\"https://pypi.org/project/ktoolbox\" target=\"_blank\">\n <img src=\"https://img.shields.io/github/v/release/Ljzd-PRO/KToolBox?logo=python\" alt=\"Version\">\n </a>\n\n <a href=\"https://pypi.org/project/ktoolbox\" target=\"_blank\">\n <img src=\"https://img.shields.io/pypi/dm/ktoolbox?label=pypi-downloads\" alt=\"PyPI Downloads\">\n </a>\n\n <a href=\"https://github.com/Ljzd-PRO/KToolBox/releases\" target=\"_blank\">\n <img src=\"https://img.shields.io/github/downloads/Ljzd-PRO/KToolBox/total?label=github-downloads\" alt=\"GitHub Release Downloads\">\n </a>\n \n <a href=\"./LICENSE\">\n <img src=\"https://img.shields.io/github/license/Ljzd-PRO/KToolBox\" alt=\"BSD 3-Clause\"/>\n </a>\n\n <a href=\"https://github.com/Ljzd-PRO/KToolBox/activity\">\n <img src=\"https://img.shields.io/github/last-commit/Ljzd-PRO/KToolBox/devel\" alt=\"Last Commit\"/>\n </a>\n\n <a href=\"https://codecov.io/gh/Ljzd-PRO/KToolBox\" target=\"_blank\">\n <img src=\"https://codecov.io/gh/Ljzd-PRO/KToolBox/branch/master/graph/badge.svg?token=5XK9CYQHQN\" alt=\"codecov\"/>\n </a>\n\n <a href='https://ktoolbox.readthedocs.io/'>\n <img src='https://readthedocs.org/projects/ktoolbox/badge/?version=latest' alt='Documentation Status' />\n </a>\n\n <a style=\"text-decoration:none\">\n <img src=\"https://img.shields.io/badge/Platform-Windows%20|%20Linux%20|%20macOS-blue\" alt=\"Platform Win | Linux | macOS\"/>\n </a>\n</p>\n\n<p align=\"center\">\n <a href=\"./README.md\">English</a> | <a href=\"./README_zh-CN.md\">\u4e2d\u6587</a>\n</p>\n\n<p align=\"center\">\n <a href='https://ko-fi.com/N4N51J14RW'>\n <img src='https://ko-fi.com/img/githubbutton_sm.svg' alt='ko-fi' />\n </a>\n</p>\n\n## Features\n\n- Support concurrent downloading of multiple files\n- Automatically retry on API call or download failure\n- Support downloading a single post or **all posts** of a specified artist\n- Can **update downloaded** artist directories to the latest state\n- Support customizing the **file and directory name format** and **directory structure** for downloaded posts/artists\n - For example, the post directory can be set to the format `[2025-01-02]_TheTitle`, and image files can be named sequentially as `1.jpg`, `2.jpg`, etc.\n - If you want to store all images from an artist's posts in a single directory for preview, you can use the `job.mix_posts` config option with a custom filename format to get a directory with hundreds or thousands of images\n - Such as `[2025-01-02]_TheTitle_1.jpg`, `[2025-01-02]_TheTitle_2.jpg`, `[2025-01-02]_TheTitle_3.jpg`, etc.\n- Support excluding **specified file formats** or downloading only specified formats\n - For example, if you don't want to download large and duplicate PSD or archive files, you can exclude `.psd` and `.zip` files in the config\n- Support filtering downloads by **file size**\n - For example, if you want to avoid downloading large video files when running out of disk space, you can set a maximum file size limit in the config\n - You can also set a minimum file size to skip downloading thumbnail or preview images\n- Support filtering downloads by post **title keywords**\n - For example, if you only want to download posts whose titles contain \"\u8868\u60c5\" or \"\u52b9\u679c\u97f3\u5dee\u5206\", you can use the `sync-creator` command with the `--keywords` option\n - You can also exclude posts with specific keywords in the title using the `--keywords-exclude` option\n- Support filtering downloads by post **publish date range**\n- Can parse and download images contained in the multi-info text of the post page HTML\n - These posts are characterized by images not loading immediately when the browser enters the page, and no preview images\n- Can collect **cloud drive links** listed on the post page and save them to a text file\n- Can search for artists and posts, and export results\n - If you want to process artist and post data yourself, you can use this feature to export JSON data\n- Cross-platform support, with iOS shortcuts provided\n - The pure Python branch can run on iOS a-Shell or in the browser via Pyodide\n- For _Coomer.st / Coomer.su / Coomer.party_ support, please refer to the documentation [Coomer](https://ktoolbox.readthedocs.io/latest/zh/coomer/)\n\n## Dev Plan\n\n- [ ] GUI\n- [ ] Discord support\n\n## Tutorial\n\nSee [documentation](https://ktoolbox.readthedocs.io/) for more details.\n\n### Installation\n\nYou can use executables from [releases](https://github.com/Ljzd-PRO/KToolBox/releases) page\n\nManually install:\n\n- Recommend\n ```bash\n pip3 install pipx\n \n # Windows\n pipx install ktoolbox[urwid,winloop]\n # Linux / macOS\n pipx install ktoolbox[urwid,uvloop]\n ```\n\n- For [a-Shell](https://github.com/holzschu/a-shell) or [pyodide](https://pyodide.org/en/stable/), \n or if you can only use pure Python and you cannot compile [pydantic](https://docs.pydantic.dev/latest/) v2.x.x\n ```bash\n pip3 install ktoolbox-pure-py\n ```\n\n### Command\n\nFor more information, use the help command or goto [Command](https://ktoolbox.readthedocs.io/latest/commands/guide) page.\n \n#### \u2753 Get general help\n```bash\nktoolbox -h\n```\n \n#### \u2753 Get help of a command\n```bash\nktoolbox download-post -h\n```\n\n#### \u2b07\ufe0f\ud83d\uddbc\ufe0f Download a specific post\n```bash\nktoolbox download-post https://kemono.su/fanbox/user/49494721/post/6608808\n```\n\nIf some files failed to download, you can try to execute the command line again, \nthe downloaded files will be **skipped**.\n \n#### \u2b07\ufe0f\ud83d\udd8c\ufe0f Download posts from a creator\n```bash\n# Download all posts of the creator/artist\nktoolbox sync-creator https://kemono.su/fanbox/user/9016\n\n# Download latest 10 posts of the creator/artist\nktoolbox sync-creator https://kemono.su/fanbox/user/9016 --length=10\n\n# Download latest No.11-No.15 posts of the creator/artist\nktoolbox sync-creator https://kemono.su/fanbox/user/9016 --offset=10 --length=5\n\n# Download posts from the creator/artist from 2024-1-1 to 2024-3-1\nktoolbox sync-creator https://kemono.su/fanbox/user/9016 --start-time=2024-1-1 --end-time=2024-3-1\n\n# Download posts from the creator/artist whose title contains \"\u8868\u60c5\"\nktoolbox sync-creator https://kemono.su/fanbox/user/9016 --keywords \"\u8868\u60c5\"\n\n# Download posts from the creator/artist whose title contains \"\u8868\u60c5\" or \"\u52b9\u679c\u97f3\u5dee\u5206\"\nktoolbox sync-creator https://kemono.su/fanbox/user/9016 --keywords \"\u8868\u60c5,\u52b9\u679c\u97f3\u5dee\u5206\"\n```\n\n### Configuration\n\n- Download 10 files at the same time\n- Rename attachments in numerical order, e.g. `1.png`, `2.png`, ...\n- Prefix the post directory name with its release/publish date, e.g. `[2024-1-1]HelloWorld`\n- Use the post title as the prefix for file names, e.g. `HelloWorld_1.png`, `HelloWorld_2.png`, ...\n- Download revisions of posts\n- Exclude `.psd` and `.zip` files\n- Extract cloud drive links from posts and save them to a text file\n- ...\n\nGoto [Configuration-Guide](https://ktoolbox.readthedocs.io/latest/configuration/guide/) page for more details.\n\n\n\n\n### iOS Shortcuts\n\nGoto [Shortcuts for iOS](https://ktoolbox.readthedocs.io/latest/shortcut/) page for more details.\n\n## Other Branches\n\n- Pure Python branch: [\ud83d\udd17pure-py](https://github.com/Ljzd-PRO/KToolBox/tree/pure-py)\n - Use pydantic v1 so that cargo is not needed for installation\n - For example, you can use it on iOS terminal App [a-Shell](https://github.com/holzschu/a-shell)\n - \ud83d\udd17[PyPI](https://pypi.org/project/ktoolbox-pure-py/)\n- Development branch: [\ud83d\udd17devel](https://github.com/Ljzd-PRO/KToolBox/tree/devel)\n\n## Code Coverage\n\n\n\n## License\n\nKToolBox is licensed under BSD 3-Clause.\n\nCopyright \u00a9 2023 by Ljzd-PRO.\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "A useful CLI tool for downloading posts in Kemono.cr / .su / .party",
"version": "0.23.0",
"project_urls": {
"Bug Tracker": "https://github.com/Ljzd-PRO/KToolBox/issues",
"Documentation": "https://ktoolbox.readthedocs.io/",
"Homepage": "https://ktoolbox.readthedocs.io/",
"Repository": "https://github.com/Ljzd-PRO/KToolBox"
},
"split_keywords": [
"kemono",
" kemono.cr",
" kemono.su",
" kemono.party",
" cli-app",
" downloader",
" os-independent"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8ade30682d76fa32ad09b8a0f06f7ec6005684b81c9c57e85b9d09017a7e09de",
"md5": "9eccb16a92a53457afc645b7d2f1a57b",
"sha256": "fcadbd11fdac8ac0f8ef463c8851ffb8c11bbe0721c177153ceff41b228dbd57"
},
"downloads": -1,
"filename": "ktoolbox_pure_py-0.23.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9eccb16a92a53457afc645b7d2f1a57b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.8",
"size": 58704,
"upload_time": "2025-09-07T04:38:42",
"upload_time_iso_8601": "2025-09-07T04:38:42.575072Z",
"url": "https://files.pythonhosted.org/packages/8a/de/30682d76fa32ad09b8a0f06f7ec6005684b81c9c57e85b9d09017a7e09de/ktoolbox_pure_py-0.23.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "73afb16beca23d5f6e620fab07cd26db5478e4fdcef2b7749bd16a086392492d",
"md5": "90c08e05ce733886d831806e497478f3",
"sha256": "06a7c29822c33c32703940d068061452a29b7918e374c03707a9d4a35b2a1c40"
},
"downloads": -1,
"filename": "ktoolbox_pure_py-0.23.0.tar.gz",
"has_sig": false,
"md5_digest": "90c08e05ce733886d831806e497478f3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.14,>=3.8",
"size": 47722,
"upload_time": "2025-09-07T04:38:43",
"upload_time_iso_8601": "2025-09-07T04:38:43.701417Z",
"url": "https://files.pythonhosted.org/packages/73/af/b16beca23d5f6e620fab07cd26db5478e4fdcef2b7749bd16a086392492d/ktoolbox_pure_py-0.23.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-07 04:38:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Ljzd-PRO",
"github_project": "KToolBox",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "ktoolbox-pure-py"
}