08-12-2016, 12:16 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Aug 2016
Device: kindle touch 4
|
RegEx for Series - Series No - Title
Hello all,
So due to an amazing catastrophe I lost all my Calibre library and books. I had though at one point saved all the books I had in my Kindle to an external drive when I first got it. So I had those, but all the titles were in the below format Series - Series Index - Title.mobi with no author When I start to add them to Calibre again they would import with all the above info under the title and the authors name does appear, so I am assuming it's their metadata that does the trick. What I would like to achieve is to get all the info on the file name under the right columns and also get the author. I've tried several RegEx and although most of them test perfectly fine, when I do try to import the books the RegEx seem to have no effect. (I have unchecked the Read metadata from file contents rather than file name) This is the latest one I have been using (?P<series>[^_0-9-]*) - (?P<series_index>[0-9]*)\s* - \s*(?P<title>[^_].+) ? and works fine when testing it with Game of Thrones - 01 - A Game Of Thrones.mobi Title: A game of Thrones Authors: Unknown Series: Game of Thrones Series Index: 1.0 But when I actually try to add the book I get Title: Game of Thrones - 01 - A Game Of Thrones.mobi Authors: George R. R. Martin Series: Unknown Series Index: Unknown Not sure what is wrong but I hope someone can help. I could do it manually but they are about 1200 books. Is it perhaps the fact that they were exported from the Kindle? Does their metadata somehow overide everything else regardless? Thanks E |
08-17-2016, 12:05 AM | #2 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
It sounds like you are actually getting the metadata from the file contents somehow.
Because the authors info must have come from somewhere. Also, I am unaware of any other time the filename test box has failed to create the same results as an actual book import. |
08-17-2016, 04:00 AM | #3 |
Junior Member
Posts: 3
Karma: 10
Join Date: Aug 2016
Device: kindle touch 4
|
Yeah I know, weird right? Anyway I spend a delightful day yesterday going through the whole lot and adjusted everything. I think that when I was importing the books, the folder where I was adding then from also had the opf files. So maybe that what it?
Thanks anyways E |
08-17-2016, 02:01 PM | #4 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Depends how you import it and what the filenames are, but the reason the OPF backups exist is in order to preserve the metadata so you don't have to rely on embedded or filename metadata.
|
08-18-2016, 07:33 AM | #5 |
Junior Member
Posts: 3
Karma: 10
Join Date: Aug 2016
Device: kindle touch 4
|
Yeah, that's what I thought... but shouldn't the metadata match what was on my library. When I first imported the books into Calibre I had gone through them one by one and changed some of the metadata, especially series info (I am very particular) so I would have thought that the opf files now had the changes metadata.
Anyway thanks for your reply! I will be backing up everything on my Dropbox this time ;-) E |
08-18-2016, 11:24 AM | #6 | |
Well trained by Cats
Posts: 29,785
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
In addition, Bulk changes (lots of books affected) take a bit of time to refresh this file Library: Library Maintenance: Backup Status shows 'ToDo' count metadata_db_prefs_backup exist to help RESTORE a metadata.db's Custom Structure (formulas...) |
|
08-22-2016, 03:03 PM | #7 |
Member
Posts: 24
Karma: 4472
Join Date: Jan 2011
Device: Kindle
|
A few things you can try:
- Import the books again into a separate library, reading metadata from books rather than file names. This may solve the puzzle of the author names mysteriously appearing, and will give you a second set of metadata to complement the first: If you copy the books from one library to the other, Metadata will be merged, i.e., Calibre will keep the author names from one libray and fill the empty series data from the copied books. - 'Search and replace' in the Edit metadata-dialogue lets you pick apart the merged title data you got (Title: Game of Thrones - 01 - A Game Of Thrones.mobi). A powerful function, might take some trial and error if you haven't used the function before. You'll need multiple runs: Copy the series name to the series field, then # to #field, then title to tile field. If you haven't used it, you'll want to copy your books into an empty library first - there is no undo-option! - Calibre can update the metadata online using isbn-numbers, which you can auto-extract from many books: Install the plugin 'extract isbn', run it on all books with no isbn (search for 'isbn:false'), then do an online metadata search (select all books with incomplete metadata, ctrl+d, download only metadata. I use goodreads, amazon and b&n as sources, and rarely see problems with incorrect isbns or downloaded metadata. You can verify against the book covers to be sure. - (once your library is restored: Use the 'polish books' function (or plugin?) to update the metadata in your books. If you have to ever re-import them again, Calibre will read back the metadata from the books) Good luck! |
Tags |
library, regular expression |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Title bulk edit match - to remove series info from title | Rob557 | Library Management | 30 | 12-09-2014 06:06 AM |
Name for series index in regex for add books | macnab69 | Library Management | 0 | 06-15-2013 12:53 PM |
Plugboard "Metadata: Show series [series index] - title as title (Kindle)" | Deep Cover | Library Management | 6 | 11-30-2012 05:17 PM |
RegEx for title - author - series? | mattam | Library Management | 10 | 08-29-2012 11:11 PM |
Series in Title | Feanor | Library Management | 5 | 08-15-2012 09:25 AM |