Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-15-2014, 05:52 PM   #1
ZioNemo
Enthusiast
ZioNemo began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
BookCAT + subdirs importing

Hi,
I have a huge library split in data/metadata.
Data (actual content) is in a series of subdirectories (possibly compressed).
Metadata is handled in BookCAT (long deceased, R.I.P.).

Importing Data is not a problem (I already did that for about one half of my library), Calibre also did a very decent job in extracting metadata from Data; I had to hand-modify some of the entries.

Unfortunately the bulk of Metadata is *not* contained in Data and that is, of course, lost.

Can I extract part of Metadata to CSV and use Import List to take that into Calibre, but that is suboptimal for at least two reasons:
  • metadata is split into several tables and not completely "flat" (e.g.: Author and Publisher can have more info than just a name).
  • several fields (e.g.: Cover image) are not compatible with CSV.

What is the recommended way to do this?
Can Import List access .mdb databases (or other databases)?
I can program (I never used python, but i know more programming languages than I care to mention ) and thus I could "extend" the plugin, if necessary and useful, but I would need guidance because my time is very limited.

TiA
ZioNemo is offline   Reply With Quote
Old 01-15-2014, 11:11 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,350
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Since you say you can program, if I were you, I'd just write a script that reads the metadata from whatever database you have it in and uses teh calibredb command to create the book records with that metadata.
kovidgoyal is offline   Reply With Quote
 
Advertisement
Old 01-16-2014, 07:04 PM   #3
ZioNemo
Enthusiast
ZioNemo began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
Thanks Kovid.

Quote:
Originally Posted by kovidgoyal View Post
Since you say you can program, if I were you, I'd just write a script that reads the metadata from whatever database you have it in and uses teh calibredb command to create the book records with that metadata.
I can do that.
I am a bit confused, however:
I had a look to the structure of metadata.db (SQLite, apparently) and I found no support for cover page; it seems it's stored in the book subdir, together with the .opf file, is this correct?
If I get You correctly I should prepare a .opf file to use it with "calibredb set_metadata ...", right?
or should I use "calibredb add ..."?
In any case, could You please point me to definition of .opf tags supported by Calibre? I was unable to find docs (aside from the very general stuff at www.idpf.org and dublincore.org).

If I update the .opf file in subdirs, can I then "rebuild db" from that?
Thanks for the quick answer!
ZioNemo is offline   Reply With Quote
Old 01-16-2014, 08:10 PM   #4
eschwartz
Irrational Optimist
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: 7,592
Karma: 13307783
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
Old 01-16-2014, 08:19 PM   #5
ZioNemo
Enthusiast
ZioNemo began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
Quote:
Originally Posted by eschwartz View Post
...
dump from
Code:
calibredb set_metadata --help
(Look at the underlined part):
...
That serves me

I was trusting calibre manual.

Thanks for the pointer!
ZioNemo is offline   Reply With Quote
Old 01-16-2014, 08:28 PM   #6
eschwartz
Irrational Optimist
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: 7,592
Karma: 13307783
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by ZioNemo View Post
That serves me

I was trusting calibre manual.

Thanks for the pointer!
Hey, this was faster. Otherwise I'd probably make the same mistake.
eschwartz is offline   Reply With Quote
Old 01-17-2014, 11:35 AM   #7
MSWallack
Right, Except When Wrong
MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.
 
MSWallack's Avatar
 
Posts: 204
Karma: 1001504
Join Date: Aug 2007
Location: Indianapolis
Device: iPad Mini (but I have numerous other devices buried here & there...)
ZioNemo: You might be interested in the Fans of FNProgamvare page on Facebook. The company has ceased doing business, but the internet.dll files are still being updated and their is an ongoing discussion about the possibility of sometime reviving the programs or at least rebuilding the old user forum.

Last edited by MSWallack; 01-17-2014 at 11:35 AM. Reason: Forgot to add link
MSWallack is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Companion - created wrong subdirs on device? testrider Calibre Companion 7 10-07-2013 01:56 AM
Convert subdirs to categories while importing automatically geruser Calibre 2 09-15-2013 02:56 PM
Importing one library into another one chemi Library Management 4 01-02-2013 11:24 AM
Importing EPUBs jimyboyle Sony Reader 5 01-17-2010 08:54 AM
Importing Importing121 Lounge 2 05-20-2008 12:24 PM


All times are GMT -4. The time now is 09:19 PM.


MobileRead.com is a privately owned, operated and funded community.