Scroll to navigation

CALIBREDB(1) calibre CALIBREDB(1)

NAME

calibredb - calibredb

calibredb ordre [opcions] [arguments]


calibredb és la interfície de línia d'ordres per a la base de dades del calibre. Té diverses subordres, documentades més avall.

calibredb es pot utilitzar per a manipular tant una base de dades del calibre especificada per una ruta com un Servidor de contingut del calibre que s'estigui executant a la màquina local o a través d'internet. Podeu iniciar un Servidor de contingut del calibre utilitzant el programa calibre-server o, des del programa principal del calibre, fent clic a Connecta/comparteix  →  Inicia el servidor de contingut. Com que calibredb pot fer canvis a les vostres biblioteques del calibre, primer heu de configurar l'autenticació al servidor. Hi ha dues maneres de fer-ho:

  • Si teniu previst connectar-vos només a un servidor que s'executi al mateix ordinador, simplement podeu utilitzar l'opció --enable-local-write del Servidor de contingut per a permetre que qualsevol programa, inclòs calibredb, que s'executi a l'ordinador local pugui fer canvis a les dades del vostre calibre. Quan executeu el servidor des del programa principal del calibre, aquesta opció es troba a Preferències → Compartir a la xarxa → Avançat. Aneu amb compte, però, perquè alguns navegadors, principalment el Firefox, permeten que llocs web arbitraris també accedeixin als servidors locals. Si utilitzeu el Firefox, és millor configurar un nom d'usuari i una contrasenya, tal com es descriu més avall. La restricció d'accés a la xarxa local encara no s'havia implementat a la versió v149 del Firefox.
  • Si voleu permetre l'accés a través d'internet, hauríeu de configurar comptes d'usuari al servidor i utilitzar les opciones --username i --password a calibredb per a donar-hi accés. Podeu configurar l'autenticació d'usuaris per a calibre-server utilitzant l'opció --enable-auth i utilitzant --manage-users per a crear els comptes d'usuari. Si esteu executant el servidor des del programa principal del calibre, utilitzeu Preferències → Compartir a la xarxa → Requereix nom d'usuari/contrasenya.



Per a connectar-vos a un Servidor de contingut en execució, passeu l'URL del servidor a l'opció --with-library; vegeu la documentació d'aquesta opció per a obtenir detalls i exemples.

  • OPCIONS GLOBALS
  • list
  • add
•
AFEGIR DES DE CARPETES

  • remove
  • add_format
  • remove_format
  • show_metadata
  • set_metadata
  • export
  • catalog
•
EPUB OPCIONS

  • 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

OPCIONS GLOBALS

mostra aquest missatge d'ajuda i surt

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>.

Contrasenya per connectar a un servidor de continguts de calibre. Per llegir la contrasenya des d'una entrada estàndard, utilitzeu el valor especial: <stdin>. Per a llegir la contrasenya des d'un fitxer, utilitzeu: <f:/path/to/file> (és a dir <f: followed by the full path to the file and a trailing >). Els angles de dalt són obligatòries, recordeu tancar-los o utilitzar cometes per a la closca.

The timeout, in seconds, when connecting to a calibre library over the network. The default is two minutes.

Nom d'usuari per connectar a un servidor de continguts de calibre

mostra el número de versió del programa i surt

LIST

calibredb list [opcions]


Llista dels llibres disponibles a la base de dades de calibre.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Ordena els resultats en ordre ascendent

Els camps que es mostraran quan es llistin els llibres a la base de dades. Hauria de ser una llista de camps separada per comes. Camps disponibles: author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, template, timestamp, title, uuid Per defecte: %per defecte. El camp especial "tots" es pot utilitzar per seleccionar tots els camps. A més dels camps predefinits abans, hi ha camps personalitzats disponibles amb *nom_del_camp, per exemple, per a un camp personalitzat #valoració, utilitzaríeu el nom: *valoració

Genera la sortida en format JSON, que és més adequada per a l'anàlisi amb autòmats. Provoca que s'ignorin les opcions de l'ample de línia i del separador.

El nombre màxim de resultats a mostrar. Per defecte: tots

Amplada màxima d'una línia a la sortida. Per defecte es detecta la mida de la pantalla.

Prefix per a tots els camins dels fitxers. Per defecte és el camí d'accés a la carpeta de la biblioteca.

Filtra els resultats amb la consulta de cerca. Per al format de la consulta de cerca vegeu la documentació relacionada al Manual de l'usuari. Per defecte no es filtra.

Cadena que s'utilitzarà per separar els camps. Per defecte és un espai.

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

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

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

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

ADD

calibredb add [opcions] fitxer1 fitxer2 fitxer3 ...


Afegeix els fitxers especificats com a llibres a la base de dades. Podeu indicar també directoris, vegeu les opcions relacionades amb els directoris més avall.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Estableix els autors del(s) llibre(s) afegit(s)

Si es troben llibres amb títols i autors similars, fusiona els formats (fitxers) entrants automàticament amb els registres de llibres existents. El valor "ignore" significa que es descarten els formats duplicats. El valor "sobreescriure" significa que els formats duplicats de la biblioteca se sobreescriuen amb els fitxers afegits recentment. Un valor de "new_record" significa que els formats duplicats es col·loquen en un registre de llibre nou.

Camí a la portada que s'utilitzarà per al llibre afegit

Afegeix els llibres a la base de dades encara que ja existeixin. La comparació es fa a partir dels títols dels llibres i els autors. Tingues en compte que l'opció --automerge té precedència.

Afegeix un llibre en blanc (un llibre sense format)

Estableix els identificadors per a aquest llibre, p. ex. -I asin:XXX -I isbn:YYY

Estableix l'ISBN del(s) llibre(s) afegit(s)

Una llista de llengües separades per comes (millor si s'utilitzen els codis de llengües ISO639, tot i que pot ser que també es reconegui els noms d'algunes llengües)

Estableix la sèrie del(s) llibre(s) afegit(s)

Estableix el nombre de sèrie del(s) llibre(s) afegit(s)

Estableix les etiquetes del(s) llibre(s) afegit(s)

Estableix el títol del(s) llibre(s) afegit(s)

AFEGIR DES DE CARPETES

Options to control the adding of books from folders. By default only files that have extensions of known e-book file types are added.

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

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

Assume that each folder has only a single logical book and that all files in it are different e-book formats of that book

Procesa les carpetes recursivament

REMOVE

calibredb remove IDs


Suprimeix els llibres identificats amb els identificadors de la base de dades. Els «IDs» han d'indicar-se en una llista separada per comes amb els nombres dels identificadors (es poden obtenir els nombres dels identificadors mitjançant l'ordre «search»). Per exemple, 23,34,57-85 (quan s'especifica un interval, no s'inclou l'últim nombre de l'interval).

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Do not use the trash bin

ADD_FORMAT

calibredb add_format [opcions] id fitxer_llibre


Afegeix el llibre electrònic «fitxer_llibre» als formats disponibles per al llibre lògic identificat per l'«id». Podeu obtenir l'«id» mitjançant l'ordre «search». Si ja existeix el format, se substituirà, a no ser que s'especifiqui l'opció de no substitució.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Afegeix el fitxer com un fitxer de dades extra al llibre, no en format ebook

No reemplacis el format si ja existeix

REMOVE_FORMAT

calibredb remove_format [opcions] ID fmt


Suprimeix el format «fmt» del llibre lògic identificat per l'ID. Podeu obtenir l'ID mitjançant l'ordre «search». «fmt» ha de ser una extensió de fitxer com ara LRF, TXT o EPUB. Si el llibre lògic no té el disponible el «fmt», no fa res.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

SHOW_METADATA

calibredb show_metadata [opcions] ID


Mostra les metadades emmagatzemades a la base de dades de calibre per al llibre identificat amb l'ID. L'ID és un nombre d'identificador de l'ordre «search».

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Imprimeix les metadades en format 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.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

El camp a establir. El format és nom_del_camp:valor, per exemple: --field etiquetes:etiqueta1,etiqueta2. Utilitzeu --list-fields per obtenir una llista de tots els noms de camps. Es pot especificar aquesta opció diverses vegades per establir diversos camps. Nota: Per llengües cal utilitzar els codis de llengua ISO639 (per exemple, "en" per l'anglès, "ca" per al català...). Per identificadors, la sintaxi és --field identifiers:isbn:XXXX,doi:YYYYY. Per als camps boolean (sí/no) utilitzeu "true" i "false" o "yes" i "no".

Mostra una llista dels noms dels camps de metadades que es poden utilitzar amb l'opció --field opció

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.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Exporta tots els llibres de la base de dades, ignorant la llista dels id.

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. Si s'especifica aquesta opció, es desactiva aquest comportament.

Normally, calibre will save the cover in a separate file along with the actual e-book files. Si s'especifica aquesta opció, es desactiva aquest comportament.

Save any data files associated with the book when saving the book Si s'especifica aquesta opció, es desactiva aquest comportament.

Normalment calibre actualitza les metadades als fitxers que es desen a partir del que hi ha a la biblioteca de calibre. Fa que es desi més lentament. Si s'especifica aquesta opció, es desactiva aquest comportament.

Normalment calibre escriurà les metadades a un fitxer OPF separat, junt amb els fitxers reals del llibre electrònic. Si s'especifica aquesta opció, es desactiva aquest comportament.

Llista separada per comes de la llista de formats que es desaran de cada llibre. Per defecte es desen tots els formats disponibles.

Informe de progrés

--replace-whitespace
Reemplaça els espais en blanc amb guions baixos.

Exporta tots els llibres en una sola carpeta

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}

El format en què es visualitzaran les dates. %d: dia, %b: mes, %m: nombre del mes, %Y: any. Per defecte: %b, %Y

Exporta els llibres a la carpeta especificada. Per defecte és .

Converteix els camins a minúscules.

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.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Llista d'IDs de la base de dades separada per comes per catalogar. Si es declara, s'ignora --search. Per defecte: totes

Filtra els resultats segons la consulta de cerca. Per al format de la cerca vegeu la documentació del tema al manual d'usuari. Per defecte: sense filtrar

Mostra informació detallada de sortida. Útil per depurar

EPUB OPCIONS

Títol del catàleg generat, que s'utilitzarà com a títol a les metadades. Per defecte: «My Books» S'aplica als formats de sortida AZW3, EPUB i MOBI

Crea referències creuades a la secció dels autors per als llibres amb diversos autors. Per defecte: «False» S'aplica als formats de sortida AZW3, EPUB i MOBI

Desa a la carpeta especificada la sortida des de diferents etapes del procés de conversió. És útil si no esteu segur de en quina etapa del procés de conversió s'està produint un error. Defecte: '%defecte' S'aplica als formats de sortida AZW3, EPUB i MOBI

Expressió regular que descriu les etiquetes que s'exclouran com a gèneres. Per defecte: «[.+]|^+$» exclou les etiquetes entre claudàtors, per exemple «[Projecte Gutemberg]», i «+», l'etiqueta per defecte per als llibres llegits. S'aplica als formats de sortida: AZW3, EPUB i MOBI

Especifica les regles que s'utilitzaran per excloure llibres del catàleg generat. El model per a una regla d'exclusió pot ser ('<nom de la regla>','Tags','<llista d'etiquetes separades per comes>') o bé ('<nom de la regla>','<columna personalitzada>','<patró>'). Per exemple: (('Llibres emmagatzemats','#estat','Emmagatzemat'),) exclourà un llibre amb un valor d'«Emmagatzemat» a la columna personalitzada «estat». Si es defineixen diverses regles, s'apliquen totes les regles. Per defecte: «(('Catalogs','Tags','Catalog'),)» S'aplica als formats de sortida AZW3, EPUB i MOBI

Inclou la secció «Autors» al catàleg. Per defecte: «False» S'aplica als formats de sortida AZW3, EPUB i MOBI

Inclou la secció «Descripcions» al catàleg. Per defecte: «False» S'aplica als formats de sortida AZW3, EPUB i MOBI

Inclou la secció «Gèneres» al catàleg. Per defecte: «False» S'aplica als formats de sortida AZW3, EPUB i MOBI

Inclou una secció «Afegits recentment» al catàleg. Per defecte: «False» S'aplica als formats de sortida AZW3, EPUB i MOBI

Inclou la secció «Sèries» al catàleg. Per defecte: «False» S'aplica als formats de sortida AZW3, EPUB i MOBI

Inclou la secció «Títols» al catàleg. Per defecte: «False» S'aplica als formats de sortida AZW3, EPUB i MOBI

Camp origen de la secció «Gèneres». Per defecte «Etiquetes» S'aplica als formats de sortida AZW3, EPUB i MOBI

Camp personalitzat que conté una nota de text per inserir a l'encapçalament «Descripció». Per defecte: «» S'aplica als formats de sortida AZW3, EPUB i MOBI

#<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
Especifica el perfil de sortida. En alguns casos, cal un perfil de sortida per optimitzar el catàleg per al dispositiu. Per exemple, 'kindle' o 'kindle_dx' crea una taula del contingut estructurada en seccions i articles. Per defecte: 'None' S'aplica als formats de sortida AZW3, EPUB i MOBI.

--prefix-rules
Especifica les regles que s'utilitzen per incloure prefixos que indiquin els llibres llegits, els ítems de la llista de desitjos i altres prefixos especificats per l'usuari. El model per a una regla de prefix és ('<nom de la regla>','<camp d'origen>','<patró>','<prefix>'). Si es defineixen diverses regles, s'utilitza la primera que coincideixi. Per defecte: «(('Read books','tags','+','✓'),('Wishlist item','tags','Wishlist','×'))» S'aplica als formats de sortida AZW3, EPUB i MOBI

Utilitza una predefinició creada amb la interfície gràfica del constructor de catàlegs. Una predefinició especifica tots els ajusts per a la construcció d'un catàleg. Per defecte: «None» S'aplica als formats de sortida AZW3, EPUB i MOBI

Mida recomanada (en polzades) per a les portades dels llibres del catàleg. Interval: 1,0 - 2,0 Per defecte: «1.0» S'aplica als formats de sortida AZW3, EPUB i MOBI

Reemplaça la portada existent quan es genera el catàleg. Per defecte: «False» S'aplica als formats de sortida AZW3, EPUB i 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

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

ADD_CUSTOM_COLUMN

calibredb add_custom_column [opcions] etiqueta nom tipus_de_dades


Crea una columna personalitzada. L'etiqueta és el nom intern de la columna. No hauria de contenir espais o dos punts. El nom és el nom visible de la columna. El tipus de dades és un de: bool, comments, composite, datetime, enumeration, float, int, rating, series, text

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Un diccionari d'opcions per personalitzar com s'interpretaran les dades en aquesta columna. Això és una cadena JSON. Per columnes d'enumeració, utilitzeu --display"{\ "enum_values\ ":[\ "val1\ ", \ "val2\ "]}" Hi ha moltes opcions per a la variable "display". Les opcions per tipus de columna són: 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 La millor manera de trobar combinacions legals és creant una columna personalitzada del tipus adient a la interfície gràfica i després cercar un llibre al fitxer OPF (comproveu que s'ha creat un OPF nou des de l'addició de la columna). Veureu el JSON per a la "display" de la columna nova a l'OPF.

Aquesta columna emmagatzema les etiquetes com a dades (amb valors separats per comes). Només s'aplica si les dades són de tipus text.

CUSTOM_COLUMNS

calibredb custom_columns [opcions]


Llista les columnes personalitzades disponibles. Mostra les etiquetes ies id. de les columnes.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Mostra els detalls per a cada columna.

REMOVE_CUSTOM_COLUMN

calibredb remove_custom_column [opcions] etiqueta


Suprimeix la columna personalitzada identificada per l'etiqueta. Podeu veure les columnes disponibles amb l'ordre «custom_columns».

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

No demanis confirmació

SET_CUSTOM

calibredb set_custom [opcions] columna ID valor


Estableix el valor d'una columna personalitzada per al llibre identificat per l'ID. Podeu obtenir una llista dels ID mitjançant l'ordre «search». Podeu obtenir una llista dels noms de les columnes personalitzades mitjançant l'ordre «custom_columns».

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Si la columna emmagatzema diversos valors, annexa els valors especificats als ja existents, en lloc de substituir-los.

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.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Fes la recuperació. L'ordre no s'executa llevat que no s'especifiqui aquesta opció.

CHECK_LIBRARY

calibredb check_library [opcions]


Realitza algunes comprovacions al sistema de fitxers que representa una biblioteca. Els informes són invalid_titles, extra_titles, invalid_authors, extra_authors, missing_formats, extra_formats, extra_files, missing_covers, extra_covers, malformed_formats, malformed_paths, failed_folders

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Sortida CSV

Llista de les extensions que s'ignoraran separada per comes. Per defecte: totes

Llista de noms a ignorar separada per comes. Per defecte: tot

Llista d'informes separats per comes. Per defecte: tots

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 [opcions]


Genera un informe de la informació de les categories de la base de dades. La informació equival al que es mostra al navegador d'etiquetes.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Llista separada per comes dels noms de consulta de la categoria. Per defecte: tot

Sortida CSV

El tipus de fitxer CSV a produir. Opcions: excel, excel-tab, unix

Genera només la sortida del nombre d'ítems en una categoria en lloc del recompte per ítem a cada categoria

Amplada màxima d'una línia a la sortida. Per defecte es detecta la mida de la pantalla.

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.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Normalment aquesta ordre només actua en llibres que tenen fitxers OPF obsolets. Aquesta opció fa que actuï en tots els llibres.

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.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

EMBED_METADATA

calibredb embed_metadata [options] book_id


Actualitza les metadades als fitxers del llibre real que estan emmagatzemats a la biblioteca de calibre a partir de les metadades de la base de dades de calibre. Normalment, les metadades només s'actualitzen quan s'exporten els fitxers de calibre; per tant, aquesta ordre és útil si voleu que s'actualitzin a la vostra base de dades. Tingueu en compte que cada tipus de fitxer admet quantitats diferents de metadades. Es pot utilitzar el valor especial «all» perquè l'identificador de llibre actualitzi les metadades en tots els llibres. També es poden especificar diversos identificadors de llibre separats per espais o conjunts d'identificadors separats per guions. Per exemple: calibredb embed_metadata 1 2 10-15 23

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Només actualitza les metadades als fitxers del format especificat. Especifiqueu-ho diverses vegades per diversos formats. Per defecte, tots els formats s'actualitzen.

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"'

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

El nombre màxim de resultats que retornarà. Per defecte es mostren tots els resultats.

FTS_INDEX

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


Control the Full text search indexing process.

Turns on FTS indexing for this library
Turns off FTS indexing for this library
Shows the current indexing status
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.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

The speed of indexing. Use fast for fast indexing using all your computers resources and slow for less resource intensive indexing. Note that the speed is reset to slow after every invocation.

Wait till all books are indexed, showing indexing progress periodically

FTS_SEARCH

calibredb fts_search [options] search expression


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

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

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

Include snippets of the text surrounding each match. Note that this makes searching much slower.

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

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

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 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

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

When showing a note, output it as HTML instead of Markdown formatted text

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 ...]

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

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 ...

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Generate output in JSON format, which is more suitable for machine parsing

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 ...

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

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.

The export format, one of: text, markdown, json. For search, text or json. Default is: text

For search, match exact word forms instead of word stems

Only list, search or export the annotations of books matching the specified book search query, for example: --search "series:Foundation"

Only list, search or export annotations of the specified type, one of: highlight, bookmark

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

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Generate output for the list action in JSON format, which is more suitable for machine parsing

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.

Sempre que passeu arguments a calibredb i aquests tinguin espais en blanc, delimiteu els arguments amb cometes. Per exemple: "/some path/with spaces"

Output the list of files as JSON

Name to use for the added file, relative to the data directory

Local destination for the get action

Permanently delete the data file instead of using the recycle bin

Allow replacing existing files when adding, getting or renaming

Author

Kovid Goyal

Copyright

Kovid Goyal

de novembre 06, 2026 9.18.0