08-26-2012, 08:34 PM | #1 |
Junior Member
Posts: 5
Karma: 1818
Join Date: Jun 2012
Location: UK
Device: RIM Playbook
|
Bulk update of Calibre from .csv file, is it possible ?
[Noobie Alert ...... please be gentle :-) ]
I have recently discovered Calibre and it is a wonderful piece of software. Many Thanks Kovid and all the people who have created plug-ins etc. My problem is I have added a very large number of mobis/epubs/pdfs/etc to my Calibre Library via 'Add Books' option from numerous directory structures on multiple computers etc. As the books were named with a mix of conventions, as suited at the time they were saved, the metadata needs to be tidied/updated manually. I can do this by editing the metadata for each book in turn which is very slow and labour intensive. I have created a book list from the Catalogue option to a .csv file, this gives one file that could be edited in a spreadsheet program easily and quickly. There does not appear to be a way to import the metadata from the .csv file back into Calibre to update the data held. The Import List plugin by Kiwidude appears to be heading in the right direction but only imports a subset of the data in the .csv file created via the Catalogue option. Is there a way to do what I am asking ? Have I missed something obvious ? Any assistance would be appreciated. Thanks in Advance Play-with-Books |
09-11-2012, 08:25 PM | #2 |
Enthusiast
Posts: 39
Karma: 4644
Join Date: Feb 2012
Location: ZH, Switzerland
Device: Kindle Paperwhite
|
Have you tried the plugin called "import list"? I'm planning on doing something similar. My audiobook database is now in csv and I'll import them into Calibre when I have lots of time.
|
Advert | |
|
09-12-2012, 03:14 AM | #3 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
I am currently working on the next version of Import List which is going to be more flexible with what columns it can import. Ultimately it will include the ability to import into custom columns (for anything - be it clipboard, CSV or scraping from a web page).
However it was never intended as a "metadata update" feature, as it is about creating (or matching) book entries, not updating existing records in the database. So unfortunately I don't see it helping you. I can't think of any way to do what you are suggesting (overwriting data from a CSV file) without writing a bespoke plugin or python script to do it. |
09-12-2012, 04:31 AM | #4 |
Handy Elephant
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
|
One way could be to save all the books to disc, and ensure that all the relevant metadata are available in the file name. Mainly title, series and authors, I would presume.
After that you can list the files and redirect the listing to a text file. Import that text file into a spreadsheet program and edit the list into a batch file containing a series of renames that normalize the metadata. Finally rename all the books and import into a new Calibre library, and use the new file names to set metadata. Once you have titles and authors correct you should be able to allow Calibre to download other metadata and covers. |
09-12-2012, 04:51 AM | #5 |
Junior Member
Posts: 5
Karma: 1818
Join Date: Jun 2012
Location: UK
Device: RIM Playbook
|
Thanks for the response/replies, I thought the question would never get an answer :-)
Also thanks for confirming that 'Import List' will not do the job. I did check the plugin and even examined the code for hints. My Python skills are zero but a plugin would be the best option. I have found a possible answer by trawling the forum and according to Kovid I should use 'calibredb'. See https://www.mobileread.com/forums/showthread.php?t=89923 I will need to play with calibredb and probably script something. 1st problem I get the following error running a basic command 'calibredb list -f uuid': c:\Downloads>calibredb list -f uuid id uuid Python function terminated unexpectedly [Errno 12] Not enough space (Error Code: 1) Traceback (most recent call last): File "site.py", line 132, in main File "site.py", line 109, in run_entry_point File "site-packages\calibre\library\cli.py", line 1363, in main File "site-packages\calibre\library\cli.py", line 198, in command_list IOError: [Errno 12] Not enough space Have no clue what to change in Python and/or Calibre at this point. |
Advert | |
|
09-12-2012, 04:55 AM | #6 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Not enough space refers to your console. Windows consoles cannot handle large outputs. Redirect to a file
calibredb list -f uuid > output.txt |
09-12-2012, 05:04 AM | #7 |
Junior Member
Posts: 5
Karma: 1818
Join Date: Jun 2012
Location: UK
Device: RIM Playbook
|
Adoby, thanks for the reply but it would be too long-winded to do as not all the Metadata is wrong and therefore I was not expecting to have to edit ALL the data.
It is something I can fall back to if other methods fail. It is such a shame that the catalog output (as csv or xml) cannot be used as input to do a bulk update. I will keep working on it and may end up learning enough Python to write something if I can get the time. |
09-12-2012, 05:08 AM | #8 |
Junior Member
Posts: 5
Karma: 1818
Join Date: Jun 2012
Location: UK
Device: RIM Playbook
|
Kovid thanks, basic ignorance of Python on my part :-)
|
Tags |
csv, metadata, update |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unable to update Calibre as original install file is missing? | El_Splendido | Calibre | 1 | 08-24-2012 04:43 PM |
Get Metadata in bulk FROM FILE? | dandichka | Calibre | 4 | 07-07-2012 02:49 PM |
how to write calibre metadata to the book file in bulk? | user105 | Calibre | 7 | 01-04-2012 05:21 AM |
Import books from a CSV file | EricBr | Library Management | 1 | 12-02-2011 11:35 AM |
calibre>csv>book crawler? | lmk | Library Management | 4 | 04-16-2011 07:20 PM |