sourCEntral - mobile manpages

pdf

CALIBREDB

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

ADDING FROM DIRECTORIES

remove

add_format

remove_format

show_metadata

set_metadata

export

catalog

EPUB OPTIONS

saved_searches

add_custom_column

custom_columns

remove_custom_column

set_custom

restore_database

check_library

list_categories

backup_metadata

clone

embed_metadata

search

グローバルオプション

−−help, −h

このヘルプメッセージを表示して終了

−−library−path, −−with−library

Path to the calibre library. Default is to use the path stored in the settings. You can also connect to a calibre Content server to perform actions on remote libraries. To do so use a URL of the form: http://hostname:port/#library_id for example, http://localhost:8080/#mylibrary. library_id is the library id of the library you want to connect to on the Content server. You can use the special library_id value of − to get a list of library ids available on the server. For details on how to setup access via a Content server, see https://manual.calibre−ebook.com/generated/en/calibredb.html.

−−password

Password for connecting to a calibre Content server. To read the password from standard input, use the special value: <stdin>. To read the password from a file, use: <f:/path/to/file>.)

−−username

Username for connecting to a calibre Content server

−−version

プログラムのバージョン番号を表示して終了

LIST

calibredb list [options]

Calibreデータベースに存在する本のリスト

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−ascending

昇順に並び替え

−−fields, −f

The fields to display when listing books in the database. Should be a comma separated list of fields. Available fields: author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, timestamp, title, uuid Default: title,authors. The special field "all" can be used to select all fields. In addition to the builtin fields above, custom fields are also available as *field_name, for example, for a custom field #rating, use the name: *rating

−−for−machine

JSONフォーマットで出力します。JSONはコンピュータでの処理により適した形式です。このオプションを指定すると行幅とセパレーターオプションは無視されます。

−−limit

表示する最大結果数。デフォルトはすべて

−−line−width, −w

出力ファイル中の、1行の最大の長さ。デフォルトは画面サイズから判別。

−−prefix

すべてのファイルパスのプレフィックス。デフォルトはライブラリフォルダーへの絶対パス。

−−search, −s

検索文字列で結果をフィルターする。検索文字列のフォーマットについては、ユーザーマニュアルの検索関連のドキュメントを参照してください。デフォルトは何もフィルターしません。

−−separator

区切り文字(デフォルトは半角スペース)

−−sort−by

ソートに使用するフィールド 使用可能フィールド: author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, timestamp, title, uuid デフォルト: id

ADD

calibredb add [options] file1 file2 file3 ...

指定したファイルをデータベースに追加する。ディレクトリを追加することもできます。下のディレクトリ関連オプションも参照してください。

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−authors, −a

追加する本の著者を設定

−−cover, −c

追加する本の表紙をパスで指定

−−duplicates, −d

本がすでにデータベースに存在する場合でも追加します。本のタイトルに基づいて比較します。

−−empty, −e

空の本を追加する(フォーマットが1つも無い本)

−−identifier, −I

追加する本の識別子を設定、例: −I asin:XXX −I isbn:YYY

−−isbn, −i

追加する本のISBNを設定

−−languages, −l

カンマ区切りの言語のリスト(ISO639言語コードで指定するのが確実ですが、それ以外のいくつかの言語名も認識します)

−−series, −s

追加する本のシリーズを設定

−−series−index, −S

追加する本のシリーズ番号を設定

−−tags, −T

追加する本のタグを設定

−−title, −t

追加する本のタイトルを設定

ADDING FROM DIRECTORIES
Options to control the adding of books from directories. By default only files that have extensions of known e−book file types are added.

−−add

A filename (glob) pattern, files matching this pattern will be added when scanning directories for files, even if they are not of a known e−book file type. Can be specified multiple times for multiple patterns.

−−ignore

A filename (glob) pattern, files matching this pattern will be ignored when scanning directories for files. Can be specified multiple times for multiple patterns. For e.g.: *.pdf will ignore all pdf files

−−one−book−per−directory, −1

各ディレクトリには1つの本しかなく、すべてのファイルは、その本の違ったフォーマットである、と仮定します。

−−recurse, −r

ディレクトリを再帰的に処理する

REMOVE

calibredb remove ids

Remove the books identified by ids from the database. ids should be a comma separated list of id numbers (you can get id numbers by using the search command). For example, 23,34,57−85 (when specifying a range, the last number in the range is not included).

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−permanent

Do not use the recycle bin

ADD_FORMAT

calibredb add_format [options] id ebook_file

Add the e−book in ebook_file to the available formats for the logical book identified by id. You can get id by using the search command. If the format already exists, it is replaced, unless the do not replace option is specified.

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−dont−replace

フォーマットがすでに存在する場合に置換しない

REMOVE_FORMAT

calibredb remove_format [options] id fmt

fmt で指定したフォーマットを id で指定した本から削除します。id は search コマンドで取得できます。fmt はLRF, TXT, EPUB のようにファイルの拡張子で指定してください。本に指定したフォーマットがない場合、なにもしません。

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」

SHOW_METADATA

calibredb show_metadata [options] id

id で指定された本の、Calibreのデータベースに保存された書誌情報を表示します。id はsearch コマンドで取得できるID番号です。

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−as−opf

OPFフォーマット(XML)で書誌情報を表示

SET_METADATA

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



id で指定された本のCalibreのデータベースに保存された書誌情報に

metadata.opf で指定したOPFファイルの内容を設定します。 id はsearch コマンドで取得できるID番号です。 OPF ファイルについて簡単に知りたい場合は、show_metadata コマンドの –as−opfオプションを使用してみてください。 –field オプションを使用する場合は OPFファイルを指定する必要は ありません。

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−field, −f

フィールドに設定する値。field_name:value の形式で指定してください。例: −−field tags:tag1,tag2。使用可能なフィールド名のリストを得るには −−list−fields を使用してください。複数のフィールドの値を設定するためには、このオプションを複数指定してください。注意: 言語を指定する場合は ISO639言語コードを使用してください(英語は en、フランス語は fr 等)。識別子は以下の書式で指定してください −−field identifiers:isbn:XXXX,doi:YYYYY。Boolean型(yes/no)のフィールドは、true, false またはyes, no で指定してください。

−−list−fields, −l

−−field オプションで使用可能な書誌情報フィールド名のリストを表示

EXPORT

calibredb export [options] ids

指定したID(カンマ区切りリスト)の本をファイルシステムにエクスポートします。 エクスポート処理では、すべてのフォーマットと表紙と書誌情報(OPFファイル)を 保存します。 ID番号は search コマンドで取得できます。

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」

−−all

IDのリストを無視してデータベースからすべての本をエクスポートします。

−−dont−asciiize

Calibreは、通常のファイル名にすべての非アルファベット文字を、英語に相当するものへ変換します。注意: これをOFFにした場合、ファイルシステムがどの程度ユニコードをサポートしているかによって、保存時にエラーが発生することがあります。 このスイッチ指定すると、この挙動をOFFにできます。

−−dont−save−cover

Normally, calibre will save the cover in a separate file along with the actual e−book files. このスイッチ指定すると、この挙動をOFFにできます。

−−dont−update−metadata

通常、Calibreはライブラリ内のファイルの書誌情報をアップデートしますが、これはディスクへの保存を遅くします。 このスイッチ指定すると、この挙動をOFFにできます。

−−dont−write−opf

通常、Calibreは電子書籍ファイル本体に付随する別個のOPFファイルに書誌情報を書き込みます。 このスイッチ指定すると、この挙動をOFFにできます。

−−formats

各本を保存する時のカンマ区切りのフォーマットのリスト。デフォルトではすべての存在するフォーマットが保存されます。

−−replace−whitespace

空白をアンダースコアに置換

−−single−dir

ディレクトリにすべての本をエクスポート

−−template

保存されるファイルの、ファイル名とディレクトリ構造を指定するテンプレート。デフォルトは"{author_sort}/{title}/{title} − {authors}"で、これは本を著者別のディレクトリに入れ、タイトルと著者名のファイル名をつけます。使用可能な操作は:{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]

Export a catalog in format specified by path/to/destination extension. Options control how entries are displayed in the generated catalog output. Note that different catalog formats support different sets of options.

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−ids, −i

カタログに対するカンマ区切りのデータベースID。 宣言する場合は、:option:
`
–search`は無視されます。 デフォルト: all

−−search, −s

結果を検索文字列でフィルターします。検索文字列のフォーマットについては、ユーザーマニュアルの検索関連ドキュメントを参照してください。 デフォルト: フィルターなし

−−verbose, −v

詳細な出力情報を表示します。デバッグに便利です。

EPUB OPTIONS
−−catalog−title

Title of generated catalog used as title in metadata. Default: 'My Books' Applies to: AZW3, EPUB, MOBI output formats

−−cross−reference−authors

Create cross−references in Authors section for books with multiple authors. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats

−−debug−pipeline

Save the output from different stages of the conversion pipeline to the specified directory. 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

Regex describing tags to exclude as genres. Default: '[.+]|^+$' excludes bracketed tags, e.g. '[Project Gutenberg]', and '+', the default tag for read books. Applies to: AZW3, EPUB, MOBI output formats

−−exclusion−rules

Specifies the rules used to exclude books from the generated catalog. The model for an exclusion rule is either ('<rule name>','Tags','<comma−separated list of tags>') or ('<rule name>','<custom column>','<pattern>'). For example: (('Archived books','#status','Archived'),) will exclude a book with a value of 'Archived' in the custom column 'status'. When multiple rules are defined, all rules will be applied. Default: "(('Catalogs','Tags','Catalog'),)" Applies to: AZW3, EPUB, MOBI output formats

−−generate−authors

Include 'Authors' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats

−−generate−descriptions

Include 'Descriptions' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats

−−generate−genres

Include 'Genres' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats

−−generate−recently−added

Include 'Recently Added' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats

−−generate−series

Include 'Series' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats

−−generate−titles

Include 'Titles' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats

−−genre−source−field

Source field for 'Genres' section. Default: 'タグ' Applies to: AZW3, EPUB, MOBI output formats

−−header−note−source−field

Custom field containing note text to insert in Description header. Default: '' Applies to: AZW3, EPUB, MOBI output formats

−−merge−comments−rule

#<custom field>:[before|after]:[True|False] specifying: <custom field> Custom field containing notes to merge with Comments [before|after] Placement of notes with respect to Comments [True|False] − A horizontal rule is inserted between notes and Comments Default: '::' Applies to: AZW3, EPUB, MOBI output formats

−−output−profile

Specifies the output profile. In some cases, an output profile is required to optimize the catalog for the device. For example, 'kindle' or 'kindle_dx' creates a structured Table of Contents with Sections and Articles. Default: 'None' Applies to: AZW3, EPUB, MOBI output formats

−−prefix−rules

Specifies the rules used to include prefixes indicating read books, wishlist items and other user−specified prefixes. The model for a prefix rule is ('<rule name>','<source field>','<pattern>','<prefix>'). When multiple rules are defined, the first matching rule will be used. Default: "(('Read books','tags','+',''),('Wishlist item','tags','Wishlist','×'))" Applies to: AZW3, EPUB, MOBI output formats

−−preset

Use a named preset created with the GUI catalog builder. A preset specifies all settings for building a catalog. Default: 'None' Applies to: AZW3, EPUB, MOBI output formats

−−thumb−width

Size hint (in inches) for book covers in catalog. Range: 1.0 − 2.0 Default: '1.0' Applies to: AZW3, EPUB, MOBI output formats

−−use−existing−cover

Replace existing cover when generating the catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats

SAVED_SEARCHES

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

Manage the saved searches stored in this database. If you try to add a query with a name that already exists, it will be replaced.

Syntax for adding:

calibredb saved_searches add search_name search_expression

Syntax for removing:

calibredb saved_searches remove search_name

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」

ADD_CUSTOM_COLUMN

calibredb add_custom_column [options] label name datatype

カスタム列を作成。labelはマシン・フレンドリな列の名前。スペースやコロンを含めません。 nameは人間に読みやすい列の名前。 datatypeは以下のいずれか: bool, comments, composite, datetime, enumeration, float, int, rating, series, text

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−display

列のデータがどのように翻訳されるかをカスタマイズする辞書を指定するオプションです。JSON文字列で指定します。列挙型の列の場合、以下を使用してください:option:–display"{\ "enum_values\ ":[\ "val1\ ", \ "val2\ "]}" 。 値の表示方法には、様々なオプションがあります。列の型ごとのオプションは以下の通りです。 合成型: composite_template, composite_sort, make_category,contains_html, use_decorations 日付: date_format 列挙型: enum_values, enum_colors, use_decorations 整数、浮動小数点数: number_format テキスト: is_names, use_decorations 型とオプションの正しい組み合わせを知るには、GUIから適切な型のカスタム列を作成して、出力されるバックアップのOPFファイルを見てみるのが一番よい方法です(列を追加して以降にOPFが再生成されていることを確認してください)。OPFの新しい列に "display" というJSONが見つかるでしょう。

−−is−multiple

この列はタグ状のデータ(例: 複数のカンマ区切りの値)を保持します。datatypeがtextの時のみ有効です。

CUSTOM_COLUMNS

calibredb custom_columns [options]

List available custom columns. Shows column labels and ids.

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−details, −d

各列の詳細を表示

REMOVE_CUSTOM_COLUMN

calibredb remove_custom_column [options] label

Remove the custom column identified by label. You can see available columns with the custom_columns command.

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−force, −f

確認を表示しない

SET_CUSTOM

calibredb set_custom [options] column id value

Set the value of a custom column for the book identified by id. You can get a list of ids using the search command. You can get a list of custom column names using the custom_columns command.

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−append, −a

もし列に複数の値を設定できる場合、値を指定した値に入れ替えるのではなく、すでにある値に付け加えます。

RESTORE_DATABASE

calibredb restore_database [options]

Calibreライブラリの各フォルダーにあるOPFファイルから書誌情報を読み取り、データベースを再構築します。 これはmetadata.dbファイルが壊れてしまった時に有用です。

注意: このコマンドは完全にデータベースを再生成します。すべての保存された検索、ユーザーカテゴリー、書誌情報変換ルール、書誌ごとの変換設定、カスタムレシピは失われます。再生された書誌情報は、OPFファイルの内容と同様になります。

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/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

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−csv, −c

CSVで出力

−−ignore_extensions, −e

無視する拡張子(カンマ区切りのリスト) デフォルト: all

−−ignore_names, −n

無視する名前のカンマ区切りのリスト デフォルト: all

−−report, −r

カンマ区切りのレポートのリスト デフォルト: all

LIST_CATEGORIES

calibredb list_categories [options]

データベース中のカテゴリー情報のレポートを作成します。情報はタグブラウザーに表示されるものと同等です。

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−categories, −r

Comma−separated list of category lookup names. Default: all

−−csv, −c

CSVで出力

−−dialect

The type of CSV file to produce. Choices: excel, excel−tab

−−item_count, −i

カテゴリー内のアイテムのカウント番号ではなく、カテゴリー内のアイテム番号のみを出力します。

−−width, −w

出力ファイル中の、1行の最大の長さ。デフォルトは画面サイズから判別。

BACKUP_METADATA

calibredb backup_metadata [options]

データベースに保存された書誌情報のバックアップを、それぞれの本の ディレクトリに個別のOPFファイルとして保存します。 通常この処理は自動的に行われますが、–allオプションを つけて実行すると、強制的にOPFファイルの再生成が実行できます。

通常は書誌情報を更新する毎にOPFファイルへのバックアップが自動的に 行われるため、このコマンドを実行する必要はありません。

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」

−−all

通常このコマンドは、古くなったOPFファイルに対してのみ実行されます。このオプションを指定すると、すべての本に対して実行されます。

CLONE

calibredb clone path/to/new/library

現在のライブラリの複製を作成します。現在のライブラリと 列、仮想ライブラリ、その他の設定が同じである、新しい空の ライブラリが作成されます。

複製されたライブラリに本は含まれません。すべての本を含む複製を 作成したい場合には、単にライブラリのフォルダーをコピーしてください。

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」

EMBED_METADATA

calibredb embed_metadata [options] book_id

Calibreライブラリ内に保存されている電子書籍ファイルの書誌情報を Calibreデータベースの書誌情報で更新します。 通常、電子書籍ファイルの書誌情報の更新は、エクスポート時のみ 行われますが、このコマンドはすぐに更新を行いたい場合に便利です。 ファイルフォーマット毎にサポートする書誌情報のフィールドが 異なることに留意ください。 book_id に特別な値 『all』 を指定すると、すべての本が更新されます。 また、スペース区切りで複数のidを指定すること、ハイフン区切りで 範囲を指定することができます。 例: calibredb embed_metadata 1 2 10−15 23

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−only−formats, −f

指定したフォーマットのファイルのみ書誌情報を更新します。複数のフォーマットを指定する場合は、オプションを複数回指定してください。デフォルトでは、すべてのフォーマットが更新されます。

SEARCH

calibredb search [options] search expression

検索条件を指定してライブラリを検索し、結果を本のIDのカンマ区切りリストで返します。 出力された結果は、本のIDを引数にとる他のコマンドの入力として 使用するのに便利です。

以下のようにCalibreの強力な検索用言語が使用できます。例: author:asimov title:robot

Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: 「/some path/with spaces」
−−limit, −l

返却する最大結果数。デフォルトはすべての結果。

AUTHOR

Kovid Goyal

COPYRIGHT

Kovid Goyal

pdf