View Single Post
Old 01-16-2014, 07:10 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You can set individual fields using
Code:
calibredb set_metadata --field=field:value
and using
Code:
calibredb set_metadata --list-fields
I am told cover is one of the supported fields.

dump from
Code:
calibredb set_metadata --help
(Look at the underlined part):

Spoiler:
Code:
Usage: 
calibredb set_metadata [options] id [/path/to/metadata.opf]

Set the metadata stored in the calibre database for the book identified by id
from the OPF file metadata.opf. id is an id number from the list 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.

Options:
  --version             show program's version number and exit

  -h, --help            show this help message and exit

  -f FIELD, --field=FIELD
                        The field to set. Format is field_name:value, for
                        example: --field tags:tag1,tag2. Use --list-fields to
                        get a list of all field names. You can specify this
                        option multiple times to set multiple fields. Note:
                        For languages you must use the ISO639 language codes
                        (e.g. en for English, fr for French and so on). For
                        identifiers, the syntax is --field
                        identifiers:isbn:XXXX,doi:YYYYY. For boolean (yes/no)
                        fields use true and false or yes and no.

  -l, --list-fields     List the metadata field names that can be used with
                        the --field option


  GLOBAL OPTIONS:
    --library-path=LIBRARY_PATH, --with-library=LIBRARY_PATH
                        Path to the calibre library. Default is to use the
                        path stored in the settings.

    --dont-notify-gui   Do not notify the running calibre GUI (if any) that
                        the database has changed. Use with care, as it can
                        lead to database corruption!


Created by Kovid Goyal <kovid@kovidgoyal.net>


So I'd guess something like
Code:
calibredb set_metadata --field=cover:/path/to/cover.jpg
would update the cover -- but this is totally a guess. I'm sure kovid will correct me if I'm wrong.
eschwartz is offline   Reply With Quote