07-18-2011, 07:51 PM | #1 |
Enthusiast
Posts: 33
Karma: 112
Join Date: Jul 2009
Device: Sony PRS-505
|
Problem with "Add Books" regex
Having a problem and would appreciate suggestions...
I've been using this in the regex field for a while, and it's been doing ok... (?P<author>[a-zA-Z&' \.]+?) - \[?((?P<series>[a-zA-Z' ]+) (?P<series_index>[0-9\.]+)\]? - )?(?P<title>[a-zA-Z,'\.\- ]+).* If I add "Kelly McCullough - Ravirn 03 - Codespell.epub" it correctly parses to author, Kelly McCullough series, Ravirn 03 title, Codespell BUT... if I add the file: "Piers Anthony - Xanth 01 - Spell for Chameleon.epub" it imports as author, Piers Anthony title, Xanth 01 - Spell for Chameleon I'm having the same problem with the rest of the series, which made me guess at a metadata problem, so I checked, and yes, this is also how the metadata is in the file, but after unchecking "use metadata" in the "Add Books" setup, it's still not working. I'm wondering if it's still using the metadata even though it's unchecked One more thing... It works correctly in the test field in preferences, just not when dragging the files in. Any suggestions? |
07-19-2011, 12:04 AM | #2 |
Quack! Quack!
Posts: 92
Karma: 9176
Join Date: Apr 2011
Location: Florida
Device: kindle 3 & sony daily prs950sc
|
is the file in an archive zip'd or rar'd? If so go inside and delete the .opf file ..if its a stand alone file make sure there isn't a .opf file in the same folder with it.
|
Advert | |
|
07-19-2011, 01:08 AM | #3 |
Enthusiast
Posts: 33
Karma: 112
Join Date: Jul 2009
Device: Sony PRS-505
|
There were OPF files in the same directory.
I got rid of them and all was well. Thank you. So I'm guessing unchecking the "Read metadata..." checkbox doesn't do anything. Last edited by wygit; 07-19-2011 at 01:14 AM. |
07-19-2011, 01:29 AM | #4 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Unchecking "Read metadata from file contents" prevents the add books from looking inside the ePub and using the metadata inside the book. I guess calibre assumes an external opf file accompanying the ePub is correct data. Glad you got it sorted out. |
|
07-19-2011, 10:00 AM | #5 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I looked at the Adding Books code very closely when working on the AutoMerge code. At that time, you are right, if Calibre found an adjacent opf file with the ebook's name it assumed the metadata in that file was right and Calibre used that data, instead of filename or internal metadata. Calibre code changes quickly, so I'm not sure that's still the case, but I've seen no sign it has changed.
|
Advert | |
|
07-19-2011, 10:01 AM | #6 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That is still the case.
|
07-23-2011, 08:49 PM | #7 |
Quack! Quack!
Posts: 92
Karma: 9176
Join Date: Apr 2011
Location: Florida
Device: kindle 3 & sony daily prs950sc
|
@ kovidgoyal what about if the .opf is inside a zipped html that you imported... and you have the read metadata unchecked?
|
07-23-2011, 09:49 PM | #8 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
|
|
07-24-2011, 08:30 AM | #9 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
The opf override of that option only applies to an external opf file, not an internal EPUB opf file. If that option is unchecked, it will read the data from the filename, not the EPUB opf file.
|
07-24-2011, 12:24 PM | #10 |
Quack! Quack!
Posts: 92
Karma: 9176
Join Date: Apr 2011
Location: Florida
Device: kindle 3 & sony daily prs950sc
|
that's what i thought but i haven't tested it so i thought i might throw in the question to someone that has. cheers!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"The add books process seems to have hung" | joleta | Calibre | 6 | 06-16-2012 02:26 AM |
Add books to "Empty Book" | SmiLynnLady | Library Management | 8 | 02-10-2011 09:32 AM |
Yep. It's official. Sony Reader has "ruined" books for me. A final "review." | WilliamG | Sony Reader | 48 | 01-14-2011 03:49 AM |
What exactly does "Add Books" ? | lalebarde | Calibre | 21 | 10-07-2010 04:57 PM |
[Enhancement suggestion] Folders when save books in "Add Books" function | simonbcn | Calibre | 1 | 08-30-2009 12:59 PM |