indemnity83/book-tools
Composer 安装命令:
composer create-project indemnity83/book-tools
包简介
Librarian CLI: A simple tool to organize and shelve audiobooks from import folders into a structured library.
README 文档
README
A simple command-line tool for managing audiobook files and organizing them into a clean, structured library.
Perfect for post-processing audiobooks prepared via AudioBookShelf or similar apps.
Command name:
librarian
Folder / repo name:book-tools
Current available command:shelve
🚀 Commands
shelve
Organizes and moves books from an import directory into a structured destination library.
php librarian shelve {importFolder} {destinationFolder?} {--dry-run} {--pretend}
Arguments
| Argument | Description |
|---|---|
importFolder |
(Required) Path to the import folder. This folder should contain subfolders for each book with metadata and files. |
destinationFolder |
(Optional) Path to the destination library root. Defaults to the current working directory if not provided. |
Options
| Option | Description |
|---|---|
--dry-run |
Shows what would be done without making any changes. |
--pretend |
Alias for --dry-run. |
📦 How it works
The shelve command will:
- Scan the
importFolderfor book subfolders. - Each book folder must contain a
metadata.jsonfile (produced by AudioBookShelf). - Files will be moved into:
[Author]/
[Series]/
[Series #] - [Title]/
Title, Book [#] of [Series] by [Author].m4b
cover.jpg
metadata.json
- If no series → simpler path without series folder.
- If multiple audio files → filenames will include
Part 1,Part 2, etc.
-
After processing:
- If in
--dry-run→ no files will be moved, only output shown. - If real mode → files are moved, extra files (cover, metadata) copied, and original import folder removed if empty.
- If in
✅ Example
php librarian shelve ~/audiobooks/_import ~/audiobooks
Will scan _import folder and move books to the main audiobooks library, cleaning up the import folder after.
php librarian shelve ~/audiobooks/_import ~/audiobooks --dry-run
Will show exactly what would happen, but not move anything.
📚 Future roadmap
This is version 1 (MVP) with only the shelve command.
Future tools planned may include:
scan→ check library for missing metadatarename→ force renaming of existing library to match patternscleanup→ remove orphaned or duplicate files
🧹 Development and testing
Feature and unit tests are provided using PestPHP. To run tests:
vendor/bin/pest
You can also test the CLI directly:
php librarian shelve --help
👷♂️ Contributors
Currently maintained by indemnity83. Pull requests welcome as the tool expands!
📜 License
MIT — do what you want, but please don’t sell it without adding value.
indemnity83/book-tools 适用场景与选型建议
indemnity83/book-tools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 05 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「library」 「console」 「Organizer」 「librarian」 「audiobooks」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 indemnity83/book-tools 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 indemnity83/book-tools 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 indemnity83/book-tools 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This class provides you with an easy-to-use interface to progress bars.
A Laravel package to retrieve data from Google Search Console
Additional artisan commands for Laravel
Inbox pattern process implementation for your Laravel Applications
A table generator class for the PHP CLI.
Core library that defines common interfaces used by the rest of the intahwebz..
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-08