table of contents
- NAME
- PILIHAN SEJAGAT
- LIST
- ADD
- REMOVE
- ADD_FORMAT
- REMOVE_FORMAT
- SHOW_METADATA
- SET_METADATA
- EXPORT
- CATALOG
- 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
- NOTES
- ITEMS
- VIRTUAL_LIBRARIES
- ANNOTATIONS
- TRASH
- DATA_FILES
- Author
- Copyright
- trixie 8.5.0+ds-1+deb13u3
- trixie-backports 8.16.2+ds+~0.10.5-3~bpo13+1
- testing 9.18.0+ds+~1.1.2-1
- unstable 9.18.0+ds+~1.1.2-1
- العربية
- български
- català (ca)
- čeština
- dansk
- Deutsch
- Ελληνικά
- English
- español
- eesti
- euskara
- فارسی
- suomi
- français
- galego
- עברית
- hrvatski
- magyar
- íslenska
- italiano
- 日本語
- ಕನ್ನಡ
- 한국어
- lietuvių
- latviešu
- मराठी
- Melayu
- norsk bokmål
- Nederlands
- polski
- português (pt)
- português (pt-BR)
- română
- русский
- slovenčina
- slovenščina
- српски
- srpskohrvatski
- svenska
- Türkçe
- українська
- Tiếng Việt
- 中文 (zh-CN)
- 繁體中文 (zh-HK)
- 繁體中文 (zh-TW)
| CALIBREDB(1) | calibre | CALIBREDB(1) |
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. Be careful though, because some browsers, primarily Firefox, allow arbitrary websites to also access local servers. If you use Firefox, it is better to setup username and password, as described below. Local Network Access restriction has still not been implemented as of Firefox v149.
- 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.
- PILIHAN SEJAGAT
- list
- add
- •
- DITAMBAH DARI FOLDER
- remove
- add_format
- remove_format
- show_metadata
- set_metadata
- export
- catalog
- •
- EPUB PILIHAN
- 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
- notes
- items
- virtual_libraries
- annotations
- trash
- data_files
PILIHAN SEJAGAT¶
- --help, -h
- tunjuk mesej bantuan ini dan keluar
- --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
- Kata laluan untuk menyambung dengan pelayan Kandungan calibre. Untuk membaca kata laluan dari input piawai, gunakan nilai khas: <stdin>. Manakala, untuk membaca kata laluan dari fail, guna: <f:/path/to/file> (i.e. <f: diikuti dengan laluan penuh ke fail dan juga tanda >). Kurungan seperti di atas diperlukan, ingat kena kurungkan.
- --timeout
- The timeout, in seconds, when connecting to a calibre library over the network. The default is two minutes.
- --username
- Nama pengguna untuk menyambung dengan pelayan Kandungan calibre
- --version
- tunjuk nombor versi program dan keluar
LIST¶
calibredb list [options]
Senaraikan buku tersedia dalam pangkalan data 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
- Isih keputusan dalam tertib menaik
- --fields, -f
- Medan yang dipaparkan bila menyenaraikan buku dalam pangkalan data. Seharusnya senarai medan dipisah-tanda-koma. Medan tersedia: author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, template, timestamp, title, uuid Lalai: % lalai. Medan khas "all" boleh digunakan untuk pilih semua medan. Selain dari medan terbina-dalam seperti di atas, medan suai juga tersedia seperti *field_name, sebagai contoh, untuk medan suai #rating, gunakan nama: *rating
- --for-machine
- Jalan output dalam format JSON, yang lebih sesuai untuk penghuraian mesin. Menyebabkan lebar garisan dan pilihan pemisah diabaikan.
- --limit
- Bilangan keputusan makismum untuk dipaparkan. Lalai: semua
- --line-width, -w
- Lebar maksimum baris tunggal dalam output. Lalai ialah mengesan saiz skrin.
- --prefix
- Awalan untuk semua laluan fail. Lalai ialah laluan mutlak ke folder pustaka.
- --search, -s
- Tapis keputusan dengan pertanyaan gelintar. Bagi format pertanyaan gelintar, sila rujuk dokumentasi berkaitan gelintar dalam Panduan Pengguna. Lalai adalah tidak membuat penapisan.
- --separator
- Rentetan yang digunakan untuk memisahkan medan. Lalai ialah jarak.
- --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. 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
- --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 [options] file1 file2 file3 ...
Add the specified files as books to the database. You can also specify folders, see the folder related options below.
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- Tetapkan pengarang buku yang ditambah
- --automerge, -m
- If books with similar titles and authors are found, merge the incoming formats (files) automatically into existing book records. A value of "ignore" means duplicate formats are discarded. A value of "overwrite" means duplicate formats in the library are overwritten with the newly added files. A value of "new_record" means duplicate formats are placed into a new book record.
- --cover, -c
- Laluan ke kulit buku digunakan untuk buku yang ditambah
- --duplicates, -d
- Add books to database even if they already exist. Comparison is done based on book titles and authors. Note that the --automerge option takes precedence.
- --empty, -e
- Tambah buku kosong (buku tanpa format)
- --identifier, -I
- Set the identifiers for this book, e.g. -I asin:XXX -I isbn:YYY
- --isbn, -i
- Tetapkan ISBN buku yang ditambah
- --languages, -l
- Senarai dipisah tanda koma bahasa (terbaik gunakan kod bahasa ISO639, walaupun sesetengah nama bahasa juga dikenalpasti)
- --series, -s
- Tetapkan siri bagi buku yang ditambah
- --series-index, -S
- Tetapkan nombor siri bagi buku yang ditambah
- Tetapkan tag bagi buku yang ditambah
- --title, -t
- Tetapkan tajuk buku yang ditambah
DITAMBAH DARI FOLDER¶
Pilihan untuk mengawal penambahan buku dari folder. Secara lalai hanya fail yang mempunyai sambungan jenis fail e-buku yang diketahui boleh ditambah.
- --add
- Satu pola (glob) nama fail, fail yang sepadan dengan pola ini akan ditambah bila mengimbas folder untuk dapatkan fail, walaupun jika ia bukanlah jenis fail e-buku yang dikenali. Boleh dinyatakan lebih dari sekali untuk pola berbilang.
- --ignore
- Satu pola (glob) nama fail, fail yang sepadan dengan pola ini akan diabaikan bila mengimbas folder untuk dapatkan fail. Boleh dinyatakan lebih dari sekali untuk pola berbilang. Sebagai contoh: *.pdf akan abaikan semua fail PDF
- --one-book-per-directory, -1
- Anggap setiap folder hanya mempunyai satu buku logikal dan semua fail berada di dalamnya adalah format ebuku yang berlainan bagi buku tersebut
- --recurse, -r
- Proses folder secara rekursif
REMOVE¶
calibredb remove ids
Buang buku yang dikenalpasti dengan id dari pangkalan data. id seharusnya senarai terpisah-tanda-koma nombor id (anda boleh dapatkan nombor id dengan menggunakan perintah gelintar). Sebagai contoh, 23,34,57-85 (bila menyatakan julat, nombor terakhir dalam julat tidak disertakan).
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 trash bin
ADD_FORMAT¶
calibredb add_format [options] id fail_ebuku
Tambah e-buku dalam fail_ebuku kepada format tersedia untuk buku logikal yang dkenalpasti dengan id. Anda boleh dapatkan id menerusi perintah gelintar. Jika format sudah wujud, ia akan digantikan, melainkan pilihan tidak ganti dinyatakan.
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --as-extra-data-file
- Tambah fail sebagai fail data ekstra buku, bukan format ebuku
- --dont-replace
- Jangan ganti format jika ia sudah wujud
REMOVE_FORMAT¶
calibredb remove_format [options] id fmt
Buang format fmt dari buku logikal yang dikenalpasti dengan id. Anda boleh dapatkan id menerusi perintah gelintar. fmt seharusnya sambungan fail seperti LRF atau TXT atau EPUB. Jika buku logikal tidak mempunyai fmt, jangan buat apa-apa.
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
Tunjuk data meta yang tersimpan dalam pangkalan data calibre bagi buku yang dikenalpasti oleh id. id ialah nombor id dari perintah gelintar.
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
- Cetak data meta dalam bentuk 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.
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
- Medan yang ditetapkan. Format ialah field_name:value, contohnya: --field tags:tag1,tag2. Guna --list-fields untuk dapatkansenarai bagi semua nama medan. Anda boleh nyatakan pilihan ini berbilang kali untuk tetapkan medan berbilang. Perhatian: Bagi bahasa anda mesti guna kod bahasa ISO639 (contohnya en untuk bahasa Inggeris, ms untuk Bahasa Melayu dan sebagainya). Bagi pengecam, sintaks ialah --field identifiers:isbn:XXXX,doi:YYYYY. Bagi medan boolean (yes/no) gunakan true dan false atau yes dan no.
- --list-fields, -l
- Senarai nama medan data meta yang boleh digunakan dengan pilihan --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.
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --all
- Eksport semua buku dalam pangkalan data, mengabaikan senarai id.
- --dont-asciiize
- Have calibre convert all non English characters into English equivalents for the file names. This is useful if saving to a legacy filesystem without full support for Unicode filenames. Menyatakan suis ini akan matikan kelakuan ini.
- --dont-save-cover
- Biasanya, calibre akan simpan kulit buku dalam fail berasingan bersama-sama dengan fail ebuku yang sebenarnya. Menyatakan suis ini akan matikan kelakuan ini.
- --dont-save-extra-files
- Save any data files associated with the book when saving the book Menyatakan suis ini akan matikan kelakuan ini.
- --dont-update-metadata
- Biasanya, calibre akan mengemaskini data meta dalam fail tersimpan dari pustaka calibre. Menjadikan proses penyimpanan ke dalam cakera lebih lambat. Menyatakan suis ini akan matikan kelakuan ini.
- --dont-write-opf
- Biasanya, calibre akan tulis data meta ke dalam fail OPS secara berasingan bersama-sama dengan fail ebuku yang sebenarnya. Menyatakan suis ini akan matikan kelakuan ini.
- --formats
- Senarai format dipisah-koma untuk simpan setiap buku. Secara lalai semua format yang tersedia disimpan.
- --progress
- Kemajuan laporan
- --replace-whitespace
- Ganti ruang putih dengan underscore.
- --single-dir
- Eksport semua buku ke dalam satu folder
- --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, pages, pubdate, publisher, rating, series, series_index, tags, timestamp, title}
- --timefmt
- Format yang memaparkan tarikh. %d - hari, %b - bulan, %m - nombor bulan, %Y - tahun. Lalai ialah: %b, %Y
- --to-dir
- Eksport buku ke folder yang dinyatakan, Lalai ialah .
- --to-lowercase
- Tukar laluan menjadi huruf kecil.
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. To see the different options, specify the name of the output file and then the --help option.
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
- Senarai terpisah-koma bagi ID pangkalan data ke katalog. Jika diisytihar, --search diabaikan. Lalai: all
- --search, -s
- Tapis keputusan dengan pertanyaan gelintar. Bagi format pertanyaan gelintar, sila rujuk dokumentasi berkaitan gelintar dalam Panduan Pengguna. Lalai: tanpa penapisan
- --verbose, -v
- Tunjuk maklumat output terperinci. Berguna untuk penyahpepijatan
EPUB PILIHAN¶
- --catalog-title
- Tajuk katalog terjana yang digunakan sebagai tajuk dalam data meta. Lalai: 'My Books' Dilaksana pada: format output AZW3, EPUB, MOBI
- --cross-reference-authors
- Cipta rujukan-silang pada seksyen Pengarang bagi buku dengan pengarang berbilang. Lalai: 'False' Dilaksana pada: format output 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
- Ungkapan nalar menjelaskan tag untuk diasing sebagai genre. Lalai: '[.+]|^+$' asingkan tag terkurung, seperti '[Project Gutenberg]', dan '+', tag lalai untuk baca buku. Dilaksana pada: format output AZW3, EPUB, MOBI
- --exclusion-rules
- Nyatakan peraturan yang digunakan untuk asingkan buku dari katalog terjana. Model peraturan pengecualian adalah sama ada ('<rule name>','Tags','<comma-separated list of tags>') atau ('<rule name>','<custom column>','<pattern>'). Contohnya: (('Archived books','#status','Archived'),) akan asingkan buku dengan nilai 'Archived' dalam lajur suai 'status'. Bila peraturan berbilang ditakrif, semua peraturan akan dilaksanakan. Lalai: "(('Catalogs','Tags','Catalog'),)" Dilaksana pada format output AZW3, EPUB, MOBI
- --generate-authors
- Sertakan seksyen 'Pengarang' dalam katalog. Lalai: 'False' Dilaksanakan pada: format output AZW3, EPUB, MOBI
- --generate-descriptions
- Sertakan seksyen 'Keterangan' dalam katalog. Lalai: 'False' Dilaksanakan pada: format output AZW3, EPUB, MOBI
- --generate-genres
- Sertakan seksyen 'Genre' dalam katalog. Lalai: 'False' Dilaksanakan pada: format output AZW3, EPUB, MOBI
- --generate-recently-added
- Sertakan seksyen 'Ditambah Baru-Baru Ini' dalam katalog. Lalai: 'False' Dilaksanakan pada: format output AZW3, EPUB, MOBI
- --generate-series
- Sertakan seksyen 'Siri' dalam katalog. Lalai: 'False' Dilaksanakan pada: format output AZW3, EPUB, MOBI
- --generate-titles
- Sertakan seksyen 'Tajuk' dalam katalog. Lalai: 'False' Dilaksanakan pada: format output AZW3, EPUB, MOBI
- --genre-source-field
- Medan sumber untuk seksyen 'Genre'. Lalai: 'Tag' Dilaksana pada: format output AZW3, EPUB, MOBI
- --header-note-source-field
- Medan suai mengandungi teks nota untuk disisip dalam Pengepala Keterangan. Lalai: '' Dilaksana pada: format output AZW3, EPUB, MOBI
- --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
- Nyatakan profil output. Dalam sesetengah kes, satu profil output diperlukan untuk optimumkan katalog bagi peranti. Contohnya, 'kindle' atau 'kindle_dx' hasilkan Senarai Kandungan berstrukutr dengan Seksyen dan Artikel. Lalai: 'None' Dilaksana pada: format output AZW3, EPUB, MOBI
- --prefix-rules
- Nyatakan peraturan yang digunakan untuk disertakan awalan yang menunjukkan buku telah dibaca, item senarai idaman dan lain-lain awalan khusus-pengguna. Model untuk peraturan awalan ialah ('<rule name>','<source field>','<pattern>','<prefix>'). Bila peraturan berbilang ditakrif, peraturan pertama yang sepadan akan digunaakn. Lalai: "(('Read books','tags','+','✓'),('Wishlist item','tags','Wishlist','×'))" Dilaksana pada format output AZW3, EPUB, MOBI
- --preset
- Guna praset bernama yang dicipta dengan pembina katalog GUI. Satu praset menyatakan semua tetapan untuk membina katalog. Lalai: 'None' Dilaksana pada: format output AZW3, EPUB, MOBI
- --thumb-width
- Saiz pembayang (dalam inci) untuk kulit buku dalam katalog. Julat: 1.0 - 2.0 Lalai: '1.0' Dilaksanakan pada: format output AZW3, EPUB, MOBI
- --use-existing-cover
- Ganti kulit buku sedia ada bila menjana katalog. Lalai: 'False' Dilaksanakan pada: format output AZW3, EPUB, MOBI
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 listing, the default action:
calibredb saved_searches list
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
Cipta lajur suai. label ialah nama mesra mesin bagi lajur. Seharusnya tidak mengandungi jarak atau titik bertindih. nama adalah nama lajur yang boleh dibaca oleh manusia. jenis data adalah salah satu dari: 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
- Satu kamus pilihan untuk suaikan bagaimana data dalam lajur ini ditafsir. Ia adalah rentetan JSON. Untuk lajur enumerasi, guna --display"{\ "enum_values\ ":[\ "val1\ ", \ "val2\ "]}" Terdapat banyak pilihan yang boleh pergi ke dalam pembolehubah paparan. Pilihan mengikut lajur adalah: 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 Cara terbaik mencari gabungan sah ialah dengan mencipta lajur suai bagi jenis bersesuaian dalam GUI kemudian cari dalam sandar OPF bagi sesebuah buku (pastikan OPF baharu telah dicipta semenjak lajur telah ditambah). Anda akan lihat JSON untuk "display" bagi lajur baharu dalam OPF.
- --is-multiple
- Lajur ini menyimpan tag seperti data (iaitu nilai berbilang dipisah-tanda-koma). Hanya dilaksana jika jenis data adalah teks.
CUSTOM_COLUMNS¶
calibredb custom_columns [options] Senaraikan lajur suai tersedia. Tunjuk label dan id lajur.
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
- Tunjuk perincian untuk setiap lajur.
REMOVE_CUSTOM_COLUMN¶
calibredb remove_custom_column [options] label Buang lajur suai yang dikenalpasti oleh label. Anda boleh lihat lajur tersedia dengan perintah custom_columns.
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
- Jangan tanya untuk pengesahan
SET_CUSTOM¶
calibredb set_custom [options] column id value
Tetapkan nilai lajur suai bagi buku yang dikenalpasti oleh id. Anda boleh dapatkan senarai id menggunakan perintah gelintar. Anda boleh dapatkan senarai nama lajur suai menggunakan perintah custom_columns.
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
- Jika lajur menyimpan nilai berbilang, tambah nilai yang dinyatakan pada mana-mana yang ada, selain dari menulis-ganti ia.
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.
The exit status is 0 if the restore succeeded, 1 if it failed completely and 2 if the database was restored but some books or other data could not be.
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
- Pasti mahu buat pemulihan. Perintah tidak akan berjalan melainkan pilihan ini dinyatakan.
CHECK_LIBRARY¶
calibredb check_library [options]
Buat beberapa semakan pada sistem fail yang mewakili pustaka. Laporan adalah invalid_titles, extra_titles, invalid_authors, extra_authors, missing_formats, extra_formats, extra_files, missing_covers, extra_covers, malformed_formats, malformed_paths, 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
- Output dalam CSV
- --ignore_extensions, -e
- Senarai sambungan dipisah-tanda-koma untuk diabaikan. Lalai: semua
- --ignore_names, -n
- Senarai nama dipisah-tanda-koma untuk diabaikan. Lalai: semua
- --report, -r
- Senarai laporan dipisah-tanda-koma. Lalai: semua
- --vacuum-fts-db
- Vacuum the full text search database. This can be very slow and memory intensive, depending on the size of the database.
LIST_CATEGORIES¶
calibredb list_categories [options]
Produce a report of the category information in the database. The information is the equivalent of what is shown in the Tag browser.
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
- Senarai nama carian kategori dipisah-tanda-koma. Lalai: semua
- --csv, -c
- Output dalam CSV
- --dialect
- Jenis fail CSV yang dihasilkan. Pilihan: excel, excel-tab, unix
- --item_count, -i
- Hanya output bilangan item dalam kategori selain dari kiraan per item di dalam kategori
- --width, -w
- Lebar maksimum baris tunggal dalam output. Lalai ialah mengesan saiz skrin.
BACKUP_METADATA¶
calibredb backup_metadata [options]
Backup the metadata stored in the database into individual OPF files in each books folder. This normally happens automatically, but you can run this command to force re-generation of the OPF files, with the --all option.
Note that there is normally no need to do this, as the OPF files are backed up automatically, every time metadata is changed.
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --all
- Biasanya, perintah ini hanya beroperasi pada buku yang mempunyai fail OPF yang telah luput. Pilihan ini menjadikannya beroperasi pada semua buku.
CLONE¶
calibredb clone path/to/new/library
Create a clone of the current library. This creates a new, empty library that has all the same custom columns, Virtual libraries and other settings as the current library.
The cloned library will contain no books. If you want to create a full duplicate, including all books, then simply use your filesystem tools to copy the library folder.
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
Kemaskin data meta dalam fail buku sebenar yang disimpan dalam pustaka calibre daripada data meta dalam pangkalan data calibre. Kebiasaannya, data meta hanya dikemaskini bila mengeksport fail dari calibre, perintah ini berguna jika anda mahu fail dikemaskini pada tempatnya. Perhatian format fail berbeza mentokong sejumlah data meta yang berbeza. Anda boleh guna nilai khas 'all' bagi book_id untuk kemaskini data meta dalam semua buku. Anda juga boleh nyatakan banyak id buku dengan dipisah tanda jarak dan julat id dipisah dengan tanda sengkang. Contohnya: 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
- Hanya kemaskini data meta dalam fail bagi format yang dinyatakan. Nyatakan ia berbilang kali untuk format berbilang. Secara lalai, semua format dikemaskinikan.
SEARCH¶
calibredb search [options] search expression
Search the library for the specified search term, returning a comma separated list of book ids matching the search expression. The output format is useful to feed into other commands that accept a list of ids as input.
The search expression can be anything from calibre's powerful search query language, for example: calibredb search author:asimov 'title:"i 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
- Bilangan keputusan makismum yang dikembalikann. Lalai ialah semua keputusan.
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.
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --indexing-speed
- Kelajuan pengindeksan. Guna pengindeksan pantas menggunakan semua sumber komputer anda dan perlahan bagi pengindeksan intensif dengan sedikit sumber. Perhatian, kelajuan ditetapkan pada lalai selepas setiap tindakan.
- --wait-for-completion
- Tunggu sehingga semua buku diindekskan, menunjukkan kemajuan pengindeksan secara berkala
FTS_SEARCH¶
calibredb fts_search [options] search expression
Do a full text search on the entire library or a subset of it.
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/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
- Include snippets of the text surrounding each match. Note that this makes searching much slower.
- --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.
NOTES¶
calibredb notes [options] [list|search|show|set|remove]
Manage the notes attached to items such as authors, series, tags and publishers. FIELD is the lookup name of the field, for example: authors, series, tags, publisher or #mycolumn. ITEM is the name of the item, for example the name of an author. Items are matched case insensitively.
List the items that have notes, optionally only those in the specified field. This is the default action:
calibredb notes list [FIELD]
Search the text of notes using the same SQLite full text search syntax as the Browse notes tool in calibre. Print the field, item name and an excerpt for each match. Use --field to search only the notes in a particular field:
calibredb notes search "search expression" calibredb notes search --field authors "search expression"
Print the note for an item as Markdown formatted text, or with --as-html as an HTML document with any images embedded, suitable for use with set:
calibredb notes show FIELD ITEM
Replace the note for an item with the contents of an HTML file. Use - to read the HTML from standard input. Images embedded as base64-encoded data: URLs are added to the note for both local and remote libraries. When using a local library and reading from a file, images referenced by paths relative to the file are added as well:
calibredb notes set FIELD ITEM FILE
Remove the note for an item:
calibredb notes remove FIELD ITEM
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --as-html
- When showing a note, output it as HTML instead of Markdown formatted text
- --field
- When searching notes, restrict the search to this field, for example: authors, tags or #mycolumn
ITEMS¶
calibredb items [options] (rename|remove) FIELD ITEM ...
Rename or remove items such as authors, tags, series and publishers in all books, the same as the Manage authors, tags, etc. actions in the calibre interface. FIELD is the lookup name of the field, for example: authors, tags, series, publisher or #mycolumn. Items are matched case insensitively.
Rename an item. If an item named NEW_NAME already exists, the two items are merged. For fields that contain multiple values, NEW_NAME can contain more than one value, separated by the separator for the field, for example a comma for tags. The item is then replaced by all the values:
calibredb items rename FIELD ITEM NEW_NAME
Remove one or more items from all books. Authors cannot be removed:
calibredb items remove FIELD ITEM [ITEM ...]
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --search, -s
- Only change books that match the specified search expression, for example: tags:"=Fiction"
VIRTUAL_LIBRARIES¶
calibredb virtual_libraries [options] [list|add|rename|remove]
Manage the Virtual libraries of this library. A Virtual library is a search that behaves as though the library contains only the books it matches. To list or search the books in a Virtual library, use: calibredb search 'vl:"name"'
List the Virtual libraries, with their searches and number of books. This is the default action:
calibredb virtual_libraries list
Create a Virtual library from a search:
calibredb virtual_libraries add name search_expression
Rename a Virtual library:
calibredb virtual_libraries rename name new_name
Remove Virtual libraries, the books in them are not changed:
calibredb virtual_libraries remove name ...
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --for-machine
- Generate output in JSON format, which is more suitable for machine parsing
- --replace
- Replace the search of an existing Virtual library with the same name when adding
ANNOTATIONS¶
calibredb annotations [options] [list|search|export|import|remove]
Manage the annotations, that is the highlights and bookmarks, of books, as created in the calibre E-book viewer or synced from other applications.
List the annotations, with their ids. This is the default action:
calibredb annotations list
Search highlighted text, annotation notes and bookmark titles using the same SQLite full text search syntax as the Browse annotations tool. Results are ordered by relevance and include annotation ids, book titles and matching excerpts. Use --search to restrict the books, --type to restrict the annotation type, --user-type and --annotation-user to restrict the user, --no-stemming to match exact word forms, or --format json for a JSON array of results including the annotation data and excerpts:
calibredb annotations search "search expression"
Export the annotations as plain text, Markdown or JSON, grouped by book. The JSON is the same calibre annotation collection as created by the Export button in the Browse annotations tool:
calibredb annotations export
Import a calibre annotation collection exported as JSON by this command or the Browse annotations tool. The collection must contain annotations from only one book. BOOK_ID is the destination book id, not the id stored in the file. Only the annotations of the format FORMAT are imported, annotations of other formats are skipped. FORMAT must exist in the destination book. Use the same edition of the book so positions match:
calibredb annotations import BOOK_ID FORMAT FILE
Use - for FILE to read from standard input. The entire collection is validated before importing. Annotations are merged with existing ones using the viewer's rules: highlights are matched by UUID and bookmarks by title, and the newer timestamp wins. Repeated imports do not create duplicates. Unrelated annotations and reading positions are preserved.
By default annotations are imported into those of the calibre E-book viewer. Use --user-type web --annotation-user USER to import them into those of a Content server user instead. Exported collections record the user the annotations belong to, and if a collection contains annotations of more than one user, it is rejected. Use the --user-type and --annotation-user options when exporting, to export the annotations of a single user.
Permanently remove the annotations with the specified ids, as shown by list:
calibredb annotations remove ID ...
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --annotation-user
- Only list, search or export the annotations of the specified user. For import, the Content server user to import the annotations for, required with --user-type web. Note that this can be any user, not just the one used to connect to a remote library.
- --format, -f
- The export format, one of: text, markdown, json. For search, text or json. Default is: text
- --no-stemming
- For search, match exact word forms instead of word stems
- --search, -s
- Only list, search or export the annotations of books matching the specified book search query, for example: --search "series:Foundation"
- --type, -t
- Only list, search or export annotations of the specified type, one of: highlight, bookmark
- --user-type
- Only list, search or export the annotations of the specified type of user. For import, the type of user to import the annotations for, the calibre E-book viewer (local) or a Content server user (web). Default for import is local.
TRASH¶
calibredb trash [options] (list|restore|delete|empty) [ids]
Manage the books and formats that have been removed and placed in the trash bin. Entries in the trash bin are permanently deleted automatically after some days. ids is a comma separated list of book ids, as for the remove command, for example: 23,34,57-85 (when specifying a range, the last number in the range is not included).
List the removed books and formats, most recently removed first, with the times they were removed in local time. Removed formats of books that no longer exist are marked as not restorable, they can only be deleted. With --for-machine, the times are in UTC:
calibredb trash list
Restore removed books, or with --formats, the removed formats of books:
calibredb trash restore ids
Permanently delete entries from the trash bin:
calibredb trash delete ids
Permanently delete everything in the trash bin:
calibredb trash empty
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --for-machine
- Generate output for the list action in JSON format, which is more suitable for machine parsing
- --formats
- Act on the removed formats of the specified books, instead of on removed books
DATA_FILES¶
calibredb data_files [options] (list|add|get|rename|remove) BOOK_ID ...
Manage the extra data files associated with a book, in local or remote libraries. Names are relative to the book's data directory. Use / for subdirectories, is also accepted. Files whose names contain a are listed, but cannot otherwise be managed. E-book formats, covers and metadata.opf cannot be accessed with this command. Remote libraries require an account with write access, as for other management commands, and do not support accounts with per-library search restrictions.
List file names, sizes in bytes and modification times (seconds since the Unix epoch). Use --for-machine for JSON output:
calibredb data_files list BOOK_ID
Add a file, using its basename, or --name to specify a name or subdirectory. Existing files are not replaced unless --replace is specified. This is also available through add_format --as-extra-data-file:
calibredb data_files add BOOK_ID FILE
Save one data file to --output on the local machine. Existing output files are not replaced unless --replace is specified:
calibredb data_files get BOOK_ID NAME --output FILE
Rename a file. Existing destinations are not replaced unless --replace is set:
calibredb data_files rename BOOK_ID NAME NEW_NAME
Remove a file to the operating system's recycle bin. With --permanent, delete it permanently instead. For remote libraries this happens on the server:
calibredb data_files remove BOOK_ID NAME
Directories left empty by rename and remove are deleted. With remote libraries, each file is transferred in a single request, so very large files need enough memory on both the client and the server, and uploads are limited by the maximum request size of the server.
Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
- --for-machine
- Output the list of files as JSON
- --name
- Name to use for the added file, relative to the data directory
- --output
- Local destination for the get action
- --permanent
- Permanently delete the data file instead of using the recycle bin
- --replace
- Allow replacing existing files when adding, getting or renaming
Author¶
Kovid Goyal
Copyright¶
Kovid Goyal
| November 6, 2026 | 9.18.0 |