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 08-12-2016, 01:16 PM   #1
elizanoloo
Junior Member
elizanoloo began at the beginning.
 
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
elizanoloo is offline   Reply With Quote
Old 08-17-2016, 01:05 AM   #2
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,247
Karma: 83049305
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.
eschwartz is offline   Reply With Quote
Old 08-17-2016, 05:00 AM   #3
elizanoloo
Junior Member
elizanoloo began at the beginning.
 
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
elizanoloo is offline   Reply With Quote
Old 08-17-2016, 03:01 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,247
Karma: 83049305
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.
eschwartz is offline   Reply With Quote
Old 08-18-2016, 08:33 AM   #5
elizanoloo
Junior Member
elizanoloo began at the beginning.
 
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
elizanoloo is offline   Reply With Quote
Old 08-18-2016, 12:24 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 22,276
Karma: 22142024
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A
Quote:
Originally Posted by elizanoloo View Post
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
metadata.calibre (in each book title folder) only exists for the Calibre REPAIR Library operation
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...)
theducks is offline   Reply With Quote
Old 08-22-2016, 04:03 PM   #7
marvin_2
Member
marvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura about
 
Posts: 16
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!
marvin_2 is offline   Reply With Quote
Reply

Tags
library, regular expression

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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 07:06 AM
Name for series index in regex for add books macnab69 Library Management 0 06-15-2013 01:53 PM
Plugboard "Metadata: Show series [series index] - title as title (Kindle)" Deep Cover Library Management 6 11-30-2012 06:17 PM
RegEx for title - author - series? mattam Library Management 10 08-30-2012 12:11 AM
Series in Title Feanor Library Management 5 08-15-2012 10:25 AM


All times are GMT -4. The time now is 01:53 AM.


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