← 返回命令列表

Linux command

calibredb 命令

趣味

复制后可按需替换文件名、目录或参数。

常用示例

List all books

calibredb list

Add book to library

calibredb add [book.epub]

Remove book by ID

calibredb remove [23]

Search for books

calibredb search "[title:keyword]"

Show book metadata

calibredb show_metadata [42]

Set book metadata

calibredb set_metadata [42] -f [title:"New Title"]

Export books

calibredb export [23,45] --to-dir [output/]

Add format to existing book

calibredb add_format [42] [book.mobi]

说明

calibredb is the command-line interface to the Calibre ebook database. It manages ebook libraries, adds/removes books, modifies metadata, and can connect to local or remote Calibre Content servers.

参数

--library-path _path_
Path to Calibre library (directory containing metadata.db).
--with-library _url_
Connect to a Calibre Content server (e.g., http://localhost:8080).
--username _user_
Username for Content server authentication.
--password _pass_
Password for Content server authentication.
--timeout _seconds_
Network connection timeout in seconds (default: 120).
-f, --field _name:value_
Set metadata field (used with set_metadata).
--as-opf
Output metadata as OPF XML.
--for-machine
Output in JSON format (machine-readable).

FAQ

What is the calibredb command used for?

calibredb is the command-line interface to the Calibre ebook database. It manages ebook libraries, adds/removes books, modifies metadata, and can connect to local or remote Calibre Content servers.

How do I run a basic calibredb example?

Run `calibredb list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --library-path _path_ do in calibredb?

Path to Calibre library (directory containing metadata.db).