Man page - calibredb(1)

Packages contains this manual

Available languages:

en fr mr pt_BR is es kn it ca pl vi nb sl lv pt eo ms ko fa eu et nl ar da cs gl tr zh_HK sk hu bg sv hr ja he lt uk fi ru ro zh_TW sr ka el zh_CN de

Manual

CALIBREDB

NAME
通 用 選 項
LIST
ADD
正 在 從 資 料 夾 中 加 入
REMOVE
ADD_FORMAT
REMOVE_FORMAT
SHOW_METADATA
SET_METADATA
EXPORT
CATALOG
EPUB 選 項
SAVED_SEARCHES
ADD_CUSTOM_COLUMN
CUSTOM_COLUMNS
REMOVE_CUSTOM_COLUMN
SET_CUSTOM
RESTORE_DATABASE
CHECK_LIBRARY
LIST_CATEGORIES
BACKUP_METADATA
CLONE
EMBED_METADATA
SEARCH
FTS_INDEX
FTS_SEARCH
AUTHOR
COPYRIGHT

NAME

calibredb - calibredb

calibredb command [options] [arguments]

calibredb is the command line interface to the calibre database. It has several sub-commands, documented below.

calibredb can be used to manipulate either a calibre database specified by path or a calibre Content server running either on the local machine or over the internet. You can start a calibre Content server using either the calibre-server program or in the main calibre program click Connect/share  →  Start Content server. Since calibredb can make changes to your calibre libraries, you must setup authentication on the server first. There are two ways to do that:

If you plan to connect only to a server running on the same computer, you can simply use the --enable-local-write option of the Content server, to allow any program, including calibredb, running on the local computer to make changes to your calibre data. When running the server from the main calibre program, this option is in Preferences → Sharing over the net → Advanced.

If you want to enable access over the internet, then you should setup user accounts on the server and use the --username and --password options to calibredb to give it access. You can setup user authentication for calibre-server by using the --enable-auth option and using --manage-users to create the user accounts. If you are running the server from the main calibre program, use Preferences → Sharing over the net → Require username/password.

To connect to a running Content server, pass the URL of the server to the --with-library option, see the documentation of that option for details and examples.

通 用 選 項

list

add

正 在 從 資 料 夾 中 加 入

remove

add_format

remove_format

show_metadata

set_metadata

export

catalog

EPUB 選 項

saved_searches

add_custom_column

custom_columns

remove_custom_column

set_custom

restore_database

check_library

list_categories

backup_metadata

clone

embed_metadata

search

fts_index

fts_search

通 用 選 項

--help, -h

顯 示 說 明 訊 息 並 退 出

--library-path, --with-library

calibre 書 庫 的 路 徑 。 預 設 是 使 用 儲 存 在 設 定 中 的 路 徑 。 您 還 可 以 連 接 到 calibre 內 容 伺 服 器 , 以 便 在 遠 端 書 庫 上 執 行 操 作 。 為 此 使 用 表 單 的 URL: http://hostname:port/#library_id 例 如 , - http://localhost:8080/#mylibrary 。 library_id 是 要 在 內 容 伺 服 器 上 連 接 的 書 庫 的 書 庫 id。 您 可 以 使 用 特 殊 的 library_id 值 來 取 得 伺 服 器 上 可 用 書 庫 id 的 清 單 。 有 關 如 何 透 過 內 容 伺 服 器 設 定 存 取 的 詳 細 資 訊 , 請 參 閱 https://manual.calibre-ebook.com/generated/en/calibredb.html。

--password

用 來 連 線 至 calibre 伺 服 器 的 密 碼 。 要 使 用 標 準 輸 入 中 讀 取 密 碼 , 請 使 用 特 殊 值 :<stdin>。 如 果 要 從 檔 案 中 讀 取 密 碼 , 請 使 用 :<f:/path/to/file>( 例 如 : <f: 檔 案 的 完 整 路 徑 以 及 後 置 >)。 前 方 所 寫 的 角 括 號 是 必 須 使 用 的 , 請 記 得 在 命 令 介 面 中 使 用 跳 脫 字 元 或 是 引 號 。

--timeout

透 過 網 路 連 接 到 calibre 書 庫 時 的 逾 時 時 間 , 以 秒 為 單 位 。 預 設 值 為 兩 分 鍾 。

--username

登 入 Calibre網 路 伺 服 器 時 所 用 之 使 用 者 名 稱

--version

顯 示 程 式 版 本 編 號 並 退 出

LIST

calibredb list [options]

列 出 calibre 資 料 庫 中 可 用 書 本 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--ascending

以 遞 增 次 序 排 列 結 果

--fields, -f

在 列 出 資 料 庫 中 書 籍 時 要 顯 示 的 欄 位 。 應 該 是 逗 號 分 隔 的 欄 位 列 表 。 可 用 欄 位 : author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, template, timestamp, title, uuid 預 設 值 : title,authors。 特 殊 欄 位 「 all」 可 用 於 選 擇 所 有 欄 位 。 除 了 上 述 內 建 欄 位 之 外 , 自 訂 欄 位 還 等 價 於 *field_name, 例 如 , 對 於 自 訂 欄 位 #rating, 使 用 名 稱 : *rating

--for-machine

產 生 適 用 於 機 器 讀 取 用 的 JSON檔 案 , 線 寬 及 分 隔 符 號 將 被 忽 略 。

--limit

結 果 顯 示 的 最 大 數 目 。 預 設 : 全 部

--line-width, -w

輸 出 中 單 一 行 的 最 大 寬 度 。 預 設 值 為 偵 測 螢 幕 大 小 。

--prefix

所 有 檔 案 路 徑 的 前 綴 。 預 設 值 為 書 庫 資 料 夾 的 絕 對 路 徑 。

--search, -s

以 搜 尋 的 查 詢 來 過 濾 結 果 。 要 了 解 搜 尋 的 查 詢 格 式 , 請 參 閱 使 用 者 手 冊 中 的 搜 尋 相 關 文 件 。 預 設 值 為 不 做 任 何 過 濾 。

--separator

用 來 分 離 欄 位 的 字 串 。 預 設 為 空 白 。

--sort-by

The field by which to sort the results. You can specify multiple fields by separating them with commas. Available fields: author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, template, timestamp, title, uuid Default: id

--template

The template to run if " template " is in the field list. Note that templates are ignored while connecting to a calibre server. Default: None

--template_file, -t

Path to a file containing the template to run if " template " is in the field list. Default: None

--template_heading

Heading for the template column. Default: template. This option is ignored if the option --for-machine is set

ADD

calibredb add [選 項 ] file1 file2 file3 ...

加 入 指 定 檔 案 為 書 籍 到 資 料 庫 。 您 可 以 指 定 目 錄 , 請 檢 視 下 面 目 錄 相 關 選 項 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--authors, -a

編 輯 已 加 入 的 書 本 作 者

--automerge, -m

如 果 找 到 具 有 相 似 標 題 和 作 者 的 圖 書 , 請 自 動 將 傳 入 格 式 (檔 案 )合 併 到 現 有 圖 書 記 錄 中 。 值 「 Ignore」 表 示 丟 棄 重 複 的 格 式 。 值 「 overwrite」 表 示 書 庫 中 的 重 複 格 式 將 被 新 加 入 的 檔 案 覆 蓋 。 值 「 new_record」 表 示 將 重 複 的 格 式 放 入 新 的 圖 書 記 錄 中 。

--cover, -c

供 已 加 入 書 本 使 用 之 書 本 封 面 路 徑

--duplicates, -d

即 使 已 經 存 在 , 也 加 入 書 籍 到 資 料 庫 中 。 根 據 書 名 和 作 者 進 行 比 較 。 請 注 意 , --automerge 選 項 優 先 。

--empty, -e

加 入 空 的 電 子 書 ( 沒 有 格 式 的 書 本 )

--identifier, -I

為 這 本 書 設 定 識 別 項 , 例 如 -I asin:XXX -I isbn:YYY

--isbn, -i

編 輯 已 加 入 的 書 本 ISBN

--languages, -l

以 逗 號 分 隔 的 語 言 清 單 (最 好 使 用 ISO639所 規 範 的 語 言 格 式 , 不 過 有 些 語 言 的 名 稱 也 能 夠 識 別 )

--series, -s

編 輯 已 加 入 的 書 本 系 列

--series-index, -S

編 輯 已 加 入 的 書 本 編 號

--tags, -T

編 輯 已 加 入 的 書 本 標 籤

--title, -t

編 輯 已 加 入 的 書 本 標 題

正 在 從 資 料 夾 中 加 入

用 來 控 制 從 資 料 夾 中 加 入 書 本 的 選 項 。 預 設 情 況 下 , 只 會 加 入 具 有 已 知 電 子 書 檔 案 類 型 的 檔 案 。

--add

檔 名 (glob) 模 式 , 在 掃 描 資 料 夾 中 的 檔 案 時 將 加 入 與 此 模 式 相 符 的 檔 案 , 即 使 這 些 檔 案 不 是 已 知 的 電 子 書 檔 案 類 型 。 可 以 為 多 個 模 式 多 次 指 定 。

--ignore

檔 名 模 式 (glob) , 在 掃 瞄 資 料 夾 中 的 檔 案 時 , 與 此 模 式 相 符 的 檔 案 將 被 忽 略 。 可 以 為 多 個 模 式 多 次 指 定 。 例 如 : *.pdf 將 忽 略 所 有 PDF 檔 案

--one-book-per-directory, -1

假 定 每 個 資 料 夾 只 有 一 本 書 , 而 在 其 中 的 所 有 檔 案 都 是 那 本 書 的 不 同 電 子 書 格 式

--recurse, -r

遞 迴 地 處 理 資 料 夾

REMOVE

calibredb remove ids

從 資 料 庫 移 除 指 定 id 的 書 籍 。 ids 應 為 以 逗 號 分 隔 的 id 號 列 表 (您 可 以 使 用 搜 尋 命 令 來 取 得 id 號 )。 例 如 , 23,34,57-85 (如 果 指 定 一 個 區 間 , 該 區 間 的 最 後 一 個 數 字 不 會 被 包 括 在 內 )。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--permanent

不 要 使 用 資 源 回 收 筒

ADD_FORMAT

calibredb add_format [options] id ebook_file

用 ebook_file 將 電 子 書 加 入 到 由 id 標 識 的 邏 輯 圖 書 的 可 用 格 式 中 。 如 果 格 式 已 經 存 在 , 則 取 代 它 , 除 非 指 定 了 不 取 代 選 項 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--as-extra-data-file

將 檔 案 作 為 額 外 的 數 據 檔 案 而 不 是 電 子 書 格 式 新 增 到 書 籍 中

--dont-replace

在 格 式 已 存 在 時 不 要 取 代

REMOVE_FORMAT

calibredb remove_format [options] id fmt

從 ID 辨 識 的 邏 輯 書 中 刪 除 fmt 格 式 。 您 可 以 透 過 使 用 搜 尋 命 令 取 得 ID。 fmt 應 該 是 形 如 LRF 或 TXT 或 EPUB 的 一 個 檔 案 副 檔 名 。 如 果 邏 輯 書 沒 有 fmt 可 用 則 什 麼 也 不 做 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"

SHOW_METADATA

calibredb show_metadata [options] id

顯 示 在 calibre 資 料 庫 中 儲 存 的 id 所 標 識 的 圖 書 的 中 繼 資 料 。 id 是 來 自 搜 尋 命 令 的 id 編 號 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--as-opf

以 OPF 格 式 (XML) 列 印 詮 釋 資 料

SET_METADATA

calibredb set_metadata [options] book_id [/path/to/metadata.opf]

Set the metadata stored in the calibre database for the book identified by book_id from the OPF file metadata.opf. book_id is a book id number from the search command. You can get a quick feel for the OPF format by using the --as-opf switch to the show_metadata command. You can also set the metadata of individual fields with the --field option. If you use the --field option, there is no need to specify an OPF file.

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--field, -f

設 定 欄 位 。 格 式 是 field_name:value, 例 如 : --field tags:tag1,tag2。 使 用 :option: --list-fields`來 取 得 所 有 欄 位 名 稱 的 列 表 。 您 可 以 多 次 指 定 此 選 項 來 設 定 多 個 欄 位 。 注 意 : 對 於 語 言 , 您 必 須 使 用 ISO639語 言 代 碼 (例 如 en代 表 英 文 , fr代 表 法 語 等 )。 對 於 識 別 項 , 語 法 是 :option: --field` identifiers:isbn:XXXX,doi:YYYYY。 對 於 布 林 (是 /否 )欄 位 使 用 真 與 假 或 是 和 否 。

--list-fields, -l

列 出 所 有 --field 選 項 所 可 以 使 用 的 詮 釋 資 料 欄 位

EXPORT

calibredb export [options] ids

Export the books specified by ids (a comma separated list) to the filesystem. The export operation saves all formats of the book, its cover and metadata (in an OPF file). Any extra data files associated with the book are also saved. You can get id numbers from the search command.

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"

--all

匯 出 資 料 庫 中 所 有 的 書 本 , 忽 略 id 列 表 。

--dont-asciiize

讓 calibre 將 所 有 非 英 文 字 元 轉 換 成 英 文 對 應 字 元 的 檔 名 。 如 果 儲 存 到 不 完 全 支 援 Unicode 檔 名 的 舊 檔 案 系 統 中 , 這 將 非 常 有 用 。 指 定 這 個 開 關 會 關 閉 這 個 行 為 。

--dont-save-cover

Normally, calibre will save the cover in a separate file along with the actual e-book files. 指 定 這 個 開 關 會 關 閉 這 個 行 為 。

--dont-save-extra-files

Save any data files associated with the book when saving the book 指 定 這 個 開 關 會 關 閉 這 個 行 為 。

--dont-update-metadata

通 常 calibre將 會 更 新 從 書 庫 中 所 儲 存 的 詮 釋 資 料 , 這 會 讓 儲 存 至 磁 碟 變 慢 。 指 定 這 個 開 關 會 關 閉 這 個 行 為 。

--dont-write-opf

通 常 calibre會 把 詮 釋 資 料 寫 入 個 別 的 OPF檔 , 和 真 實 的 電 子 書 分 離 。 指 定 這 個 開 關 會 關 閉 這 個 行 為 。

--formats

每 本 書 本 的 格 式 列 表 , 逗 號 間 隔 。 預 設 保 存 所 有 可 用 格 式 。

--progress

回 報 進 度

--replace-whitespace

以 底 線 替 代 空 格 。

--single-dir

匯 出 全 部 的 書 本 到 單 一 個 資 料 夾 中

--template

The template to control the filename and folder structure of the saved files. Default is " {author_sort}/{title}/{title} - {authors} " which will save books into a per-author subfolder with filenames containing title and author. Available controls are: {author_sort, authors, id, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, tags, timestamp, title}

--timefmt

顯 示 日 期 的 格 式 。 %d - 日 、 %b - 月 、 %m - 數 字 月 、 %Y - 年 。 預 設 值 為 : %b, %Y

--to-dir

匯 出 書 本 到 指 定 的 資 料 夾 中 , 預 設 為 : .

--to-lowercase

路 徑 轉 換 為 小 寫 。

CATALOG

calibredb catalog /path/to/destination.(csv|epub|mobi|xml...) [options]

以 Path/to/Destination extension指 定 的 格 式 匯 出 目 錄 。 選 項 控 制 列 目 在 產 生 的 目 錄 輸 出 中 的 顯 示 方 式 。 請 注 意 , 不 同 的 目 錄 格 式 支 援 不 同 的 選 項 集 。 要 檢 視 不 同 的 選 項 , 請 指 定 輸 出 檔 案 的 名 稱 , 然 後 指 定 --help選 項 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--ids, -i

逗 號 分 割 資 料 庫 ID 到 書 目 的 列 表 。 一 旦 聲 明 , 則 忽 略 --search 預 設 值 : 全 部

--search, -s

為 搜 尋 查 詢 過 濾 結 果 。 搜 尋 查 詢 格 式 請 參 見 使 用 者 手 冊 中 搜 尋 相 關 內 容 。 預 設 : 不 過 濾

--verbose, -v

顯 示 詳 細 的 輸 出 資 訊 , 便 於 除 錯 。

EPUB 選 項

--catalog-title

生 成 目 录 的 标 题 用 作 元 数 据 标 题 。 默 认 值 : ' My Books ' 适 用 于 : AZW3, ePub, MOBI 等 输 出 格 式

--cross-reference-authors

为 具 有 多 个 作 者 的 书 籍 在 作 者 节 中 创 建 交 叉 引 用 。 默 认 值 : ' False ' 适 用 于 : AZW3, EPUB, MOBI输 出 格 式

--debug-pipeline

Save the output from different stages of the conversion pipeline to the specified folder. Useful if you are unsure at which stage of the conversion process a bug is occurring. Default: ' None ' Applies to: AZW3, EPUB, MOBI output formats

--exclude-genre

描 述 以 排 除 类 型 的 标 签 正 则 表 达 式 。 默 认 值 : ' [.+]|ˆ+$ ' 不 包 括 括 号 内 的 标 签 , 例 如 ' [Project Gutenberg] ' , 和 ' + ' , 默 认 的 用 于 阅 读 书 籍 的 标 签 。 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--exclusion-rules

指 定 用 於 從 產 生 的 目 錄 中 排 除 書 籍 的 規 則 。 排 除 規 則 的 模 型 是 ( ' <rule name> ' , ' 標 籤 ' , ' <comma-separated list of tags> ' ) 或 ( ' <rule name> ' , ' <custom column> ' , ' <pattern> ' )。 例 如 : (( ' 已 封 存 的 書 籍 ' , ' #狀 態 ' , ' 已 封 存 ' ),) 將 在 自 訂 列 「 狀 態 」 中 排 除 值 為 「 已 封 存 」 的 圖 書 。 定 義 多 個 規 則 時 , 將 套 用 所 有 規 則 。 預 設 : " (( ' Catalogs ' , ' Tags ' , ' Catalog ' ),) " 適 用 於 : AZW3, EPUB, MOBI 輸 出 格 式

--generate-authors

目 录 中 包 括 “作 者 ”部 分 。 默 认 值 : ' False ' 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--generate-descriptions

目 录 中 包 括 “描 述 ”部 分 。 默 认 值 : ' False ' 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--generate-genres

目 录 中 包 括 “类 型 ”部 分 。 默 认 值 : ' False ' 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--generate-recently-added

目 录 中 包 括 “最 近 添 加 ”部 分 。 默 认 值 : ' False ' 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--generate-series

目 录 中 包 括 “丛 书 系 列 ”部 分 。 默 认 值 : ' False ' 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--generate-titles

目 录 中 包 括 “标 题 ”部 分 。 默 认 值 : ' False ' 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--genre-source-field

“类 型 ”部 分 的 源 字 段 。 默 认 值 : ' 標 籤 ' 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--header-note-source-field

包 含 要 在 描 述 标 头 中 插 入 的 注 释 文 本 的 自 定 义 域 。 默 认 值 : '' 适 用 于 : AZW3, EPUB, MOBI输 出 格 式

--merge-comments-rule

#<custom field>:[before|after]:[True|False] 指 定 : <custom field> 包 含 與 註 解 合 併 的 註 解 的 自 訂 欄 位 [before|after] 關 於 註 解 的 註 解 放 置 位 置 [True|False] - 在 備 註 和 註 解 之 間 插 入 水 平 規 則 預 設 值 : ' :: ' 適 用 於 : AZW3, EPUB, MOBI 輸 出 格 式

--output-profile

指 定 输 出 配 置 文 件 。 在 某 些 情 况 下 , 输 出 配 置 文 件 用 于 优 化 某 些 设 备 的 书 目 分 类 。 例 如 , ' kindle ' ' kindle_dx ' 以 章 节 和 文 章 的 方 式 来 生 成 目 录 结 构 。 默 认 : ' None ' 适 用 于 : AZW3、 EPUB、 MOBI 等 输 出 格 式

--prefix-rules

指 定 用 於 包 括 表 示 已 讀 書 籍 , 收 藏 清 單 項 目 和 其 他 使 用 者 定 前 綴 的 前 綴 的 規 則 。 前 綴 規 則 的 模 型 ( ' <rule name> ' , ' <source field> ' , ' <pattern> ' , ' <prefix> ' )。 當 定 義 了 多 個 規 則 時 , 將 使 用 第 一 個 相 符 規 則 。 預 設 規 則 : " (( ' Read books ' , ' tags ' , ' + ' , ' ' ),( ' Wishlist item ' , ' tags ' , ' Wishlist ' , ' × ' )) " 適 用 於 : AZW3, EPUB, MOBI 輸 出 格 式

--preset

使 用 GUI目 录 生 成 器 创 建 的 命 名 预 设 。 预 设 指 定 用 于 构 建 目 录 的 所 有 设 置 。 默 认 值 : ' None ' 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--thumb-width

目 录 中 书 籍 封 面 的 大 小 提 示 (英 寸 )。 范 围 : 1.0 - 2.0 默 认 值 : ' 1.0 ' 适 用 于 : AZW3, EPUB, MOBI 输 出 格 式

--use-existing-cover

在 產 生 目 錄 時 取 代 現 有 的 封 面 。 預 設 值 : ' False ' 適 用 於 : AZW3, EPUB, MOBI 輸 出 格 式

SAVED_SEARCHES

calibredb saved_searches [options] (list|add|remove)

管 理 儲 存 在 該 資 料 庫 中 的 儲 存 搜 尋 。 如 果 嘗 試 加 入 已 經 存 在 的 一 個 名 稱 查 詢 , 則 它 將 被 取 代 。

加 入 語 法 :

calibredb saved_searches add search_name search_expression

刪 除 語 法 :

calibredb saved_searches remove search_name

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"

ADD_CUSTOM_COLUMN

calibredb add_custom_column [options] label name datatype

建 立 一 個 自 訂 的 欄 位 , 標 籤 名 為 機 器 讀 取 用 的 名 稱 , 不 能 包 含 空 格 或 冒 號 。 名 稱 則 是 方 便 人 類 閱 讀 。 資 料 類 型 可 為 : bool, comments, composite, datetime, enumeration, float, int, rating, series, text

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--display

一 個 自 訂 選 項 如 何 解 釋 該 列 中 資 料 的 字 典 。 這 是 一 個 JSON 字 串 。 對 於 枚 舉 列 , 使 用 --display " {\ " enum_values\ " :[\ " val1\ " , \ " val2\ " ]} " 有 許 多 選 項 可 以 進 入 顯 示 變 數 , 按 列 類 型 的 選 項 是 : composite: composite_template, composite_sort, make_category,contains_html, use_decorations datetime: date_format enumeration: enum_values, enum_colors, use_decorations int, float: number_format text: is_names, use_decorations 找 到 適 當 組 合 的 最 好 方 法 是 在 GUI 中 建 立 適 當 類 型 的 自 訂 列 , 然 後 檢 視 圖 書 的 備 份 OPF (確 保 自 從 加 入 該 列 以 來 已 經 建 立 了 新 的 OPF)。 在 OPF 中 的 新 列 中 , 您 將 看 到 JSON 的 「 顯 示 」 。

--is-multiple

這 個 欄 位 儲 存 類 似 標 籤 的 資 料 ( 例 如 多 個 逗 號 分 隔 的 數 值 ) 。 只 有 在 資 料 類 型 為 文 字 時 套 用 。

CUSTOM_COLUMNS

calibredb custom_columns [options]

列 出 可 用 的 自 訂 列 欄 位 。 顯 示 欄 位 標 籤 和 ids。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--details, -d

顯 示 每 個 欄 位 的 詳 細 資 料 。

REMOVE_CUSTOM_COLUMN

calibredb remove_custom_column [options] label

用 標 籤 刪 除 的 自 訂 列 標 識 。 可 以 使 用 custom_columns command命 令 檢 視 可 用 列

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--force, -f

不 需 要 進 行 詢 問 確 認

SET_CUSTOM

calibredb set_custom [options] column id value

為 id 標 識 的 書 設 定 自 訂 列 的 值 。 您 可 以 使 用 搜 尋 命 令 取 得 id 列 表 。 您 可 以 使 用 custom_columns 命 令 取 得 自 訂 列 名 的 列 表 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--append, -a

如 果 欄 位 可 存 多 值 , 將 選 定 的 屬 性 加 入 現 有 屬 性 中 , 而 非 取 代 。

RESTORE_DATABASE

calibredb restore_database [options]

Restore this database from the metadata stored in OPF files in each folder of the calibre library. This is useful if your metadata.db file has been corrupted.

WARNING: This command completely regenerates your database. You will lose all saved searches, user categories, plugboards, stored per-book conversion settings, and custom recipes. Restored metadata will only be as accurate as what is found in the OPF files.

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--really-do-it, -r

確 實 執 行 還 原 。 這 個 指 令 除 非 指 定 這 個 選 項 否 則 不 會 執 行 。

CHECK_LIBRARY

calibredb check_library [options]

對 表 示 書 庫 的 檔 案 系 統 執 行 一 些 檢 查 。 產 生 報 告 是 invalid_titles, extra_titles, invalid_authors, extra_authors, missing_formats, extra_formats, extra_files, missing_covers, extra_covers, failed_folders

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--csv, -c

輸 出 為 CSV

--ignore_extensions, -e

以 逗 號 分 割 忽 略 的 副 檔 名 。 預 設 值 : 全 部

--ignore_names, -n

以 逗 號 分 割 忽 略 的 檔 名 。 預 設 值 : 全 部

--report, -r

以 逗 號 分 割 報 告 清 單 。 預 設 值 : 全 部

--vacuum-fts-db

清 空 全 文 搜 尋 資 料 庫 。 這 可 能 非 常 緩 慢 且 佔 用 大 量 記 憶 體 , 具 體 取 決 於 資 料 庫 的 大 小 。

LIST_CATEGORIES

calibredb list_categories [options]

在 資 料 庫 中 產 生 一 個 目 錄 資 訊 的 報 告 。 該 資 訊 與 標 籤 窗 格 中 顯 示 的 資 訊 等 效 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--categories, -r

以 逗 號 分 割 分 類 查 詢 名 稱 。 預 設 值 : 全 部

--csv, -c

輸 出 為 CSV

--dialect

指 定 輸 出 的 CSV檔 案 格 式 , 格 式 : excel, excel-tab, unix

--item_count, -i

只 列 出 每 個 分 類 中 的 書 本 總 數 , 而 不 是 列 出 每 個 分 類 中 的 書 本 。

--width, -w

輸 出 中 單 一 行 的 最 大 寬 度 。 預 設 值 為 偵 測 螢 幕 大 小 。

BACKUP_METADATA

calibredb backup_metadata [選 項 ]

將 儲 存 在 資 料 庫 中 的 中 繼 資 料 備 份 到 每 個 圖 書 資 料 夾 中 的 單 個 OPF 檔 案 中 。 這 通 常 是 自 動 發 生 的 , 但 是 您 可 以 執 行 此 命 令 來 強 制 重 新 產 生 OPF 檔 案 , 並 使 用 --all 選 項 。

請 注 意 , 通 常 不 需 要 這 樣 做 , 因 為 每 次 中 繼 資 料 變 更 時 , OPF 檔 案 都 會 自 動 備 份 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"

--all

此 命 令 通 常 僅 對 於 過 時 的 OPT檔 案 進 行 操 作 , 此 選 項 會 使 它 在 所 有 的 書 本 上 操 作 。

CLONE

calibredb 複 製 到 path/to/new/library

建 立 目 前 書 庫 的 副 本 。 它 建 立 了 一 個 新 的 、 空 的 書 庫 , 它 所 有 的 自 訂 列 、 虛 擬 書 庫 和 其 他 設 定 與 目 前 書 庫 相 同 。

副 本 書 庫 將 沒 有 任 何 書 籍 。 如 果 您 想 要 建 立 一 個 完 整 的 副 本 書 庫 , 包 括 所 有 的 書 籍 , 那 麼 只 需 使 用 您 的 檔 案 系 統 工 具 來 複 製 書 庫 資 料 夾 。

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"

EMBED_METADATA

calibredb embed_metadata [options] book_id

從 calibre 資 料 庫 中 的 中 繼 資 料 更 新 儲 存 在 calibre 書 庫 中 的 實 際 圖 書 檔 案 中 的 中 繼 資 料 。 通 常 , 只 有 從 calibre 匯 出 檔 案 時 才 更 新 中 繼 資 料 , 如 果 希 望 檔 案 就 地 更 新 , 則 此 命 令 很 有 用 。 請 注 意 , 不 同 的 檔 案 格 式 支 援 不 同 數 量 的 中 繼 資 料 。 您 可 以 使 用 book_id 的 特 殊 值 「 all」 來 更 新 所 有 書 籍 中 的 中 繼 資 料 。 還 可 以 指 定 許 多 由 空 間 分 隔 的 書 籍 ID 和 由 連 字 號 分 隔 的 ID 範 圍 。 例 如 : calibredb embed_metadata 1 2 10-15 23

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--only-formats, -f

只 更 新 特 定 格 式 檔 案 的 詮 釋 資 料 , 可 以 指 定 多 個 檔 案 格 式 。 預 設 值 將 會 更 新 所 有 格 式 的 檔 案 。

SEARCH

calibredb search [options] search expression

搜 尋 書 庫 中 指 定 的 搜 尋 項 目 , 返 回 與 搜 尋 運 算 式 相 符 的 以 逗 號 分 隔 的 圖 書 ID列 表 。 輸 出 格 式 對 於 輸 入 格 式 接 受 ID列 表 的 其 他 命 令 非 常 有 用 。 搜 尋 運 算 式 可 以 是 來 自 calibre強 大 的 搜 尋 查 詢 語 言 中 的 任 何 內 容 , 例 如 : calibredb search author:asimov 'title:"i robot"'

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--limit, -l

結 果 回 傳 結 果 的 最 大 數 目 。 預 設 回 傳 全 部 結 果

FTS_INDEX

calibredb fts_index [options] enable/disable/status/reindex

Control the Full text search indexing process.

enable

Turns on FTS indexing for this library

disable

Turns off FTS indexing for this library

status

Shows the current indexing status

reindex

Can be used to re-index either particular books or the entire library. To re-index particular books specify the book ids as additional arguments after the reindex command. If no book ids are specified the entire library is re-indexed.

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--indexing-speed

索 引 的 速 度 。 使 用 快 速 索 引 可 使 用 所 有 電 腦 資 源 進 行 快 速 索 引 , 使 用 慢 速 索 引 可 使 用 較 少 的 資 源 進 行 索 引 。 請 注 意 , 每 次 呼 叫 索 引 後 , 索 引 速 度 都 會 重 設 為 Slow。

--wait-for-completion

等 到 所 有 圖 書 都 被 編 入 索 引 , 定 期 顯 示 索 引 進 度

FTS_SEARCH

calibredb fts_search [options] search expression

Do a full text search on the entire library or a subset of it.

每 当 向 具 有 它 们 自 己 空 间 的 calibredb传 递 参 数 时 , 用 引 号 括 起 这 些 参 数 。 例 如 : "/some path/with spaces"
--do-not-match-on-related-words

Only match on exact words not related words. So correction will not match correcting.

--include-snippets

包 括 每 個 匹 配 項 相 關 的 文 字 片 段 。 請 注 意 , 這 會 使 搜 索 速 度 慢 得 多 。

--indexing-threshold

How much of the library must be indexed before searching is allowed, as a percentage. Defaults to 90

--match-end-marker

The marker used to indicate the end of a matched word inside a snippet

--match-start-marker

The marker used to indicate the start of a matched word inside a snippet

--output-format

The format to output the search results in. Either " text " for plain text or " json " for JSON output.

--restrict-to

Restrict the searched books, either using a search expression or ids. For example: ids:1,2,3 to restrict by ids or search:tag:foo to restrict to books having the tag foo.

AUTHOR

Kovid Goyal

COPYRIGHT

Kovid Goyal