Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-18-2011, 07:51 PM   #1
wygit
Enthusiast
wygit doesn't litterwygit doesn't litter
 
wygit's Avatar
 
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?
wygit is offline   Reply With Quote
Old 07-19-2011, 12:04 AM   #2
penguinaka
Quack! Quack!
penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.
 
penguinaka's Avatar
 
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.
penguinaka is offline   Reply With Quote
Advert
Old 07-19-2011, 01:08 AM   #3
wygit
Enthusiast
wygit doesn't litterwygit doesn't litter
 
wygit's Avatar
 
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.
wygit is offline   Reply With Quote
Old 07-19-2011, 01:29 AM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by wygit View Post
So I'm guessing unchecking the "Read metadata..." checkbox doesn't do anything.
I think you would be guessing wrong.

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.
DoctorOhh is offline   Reply With Quote
Old 07-19-2011, 10:00 AM   #5
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by dwanthny View Post
I guess calibre assumes an external opf file accompanying the ePub is correct data.
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.
Starson17 is offline   Reply With Quote
Advert
Old 07-19-2011, 10:01 AM   #6
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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That is still the case.
kovidgoyal is online now   Reply With Quote
Old 07-23-2011, 08:49 PM   #7
penguinaka
Quack! Quack!
penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.
 
penguinaka's Avatar
 
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?
penguinaka is offline   Reply With Quote
Old 07-23-2011, 09:49 PM   #8
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by penguinaka View Post
@ kovidgoyal what about if the .opf is inside a zipped html that you imported... and you have the read metadata unchecked?
As written in post 4, If you have it unchecked it will not read the metadata from the file.
DoctorOhh is offline   Reply With Quote
Old 07-24-2011, 08:30 AM   #9
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by penguinaka View Post
@ kovidgoyal what about if the .opf is inside a zipped html that you imported... and you have the read metadata unchecked?
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.
Starson17 is offline   Reply With Quote
Old 07-24-2011, 12:24 PM   #10
penguinaka
Quack! Quack!
penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.penguinaka can eat soup with a fork.
 
penguinaka's Avatar
 
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!
penguinaka is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:55 AM.


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