Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-24-2010, 11:38 AM   #1
magphil
Enthusiast
magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!
 
Posts: 44
Karma: 5090
Join Date: Jun 2009
Device: Gen3
Add book regex no longer works

Hi,

I have installed a new pc, and made a fresh calibre install.

I then configured it to use my old regexp to add books :

(?P<author>[^_]+?) - ((?P<series>.*) (?P<series_index>[0-9]*) - )?(?P<title>.+)

and I clicked "Read metadata only from file name.

But when I try and import a new book, the title is not parsed and "author - serie # - title" ends up beeing the book title :-(

any hint welcome.

Cheers,

Magphil
magphil is offline   Reply With Quote
Old 03-24-2010, 01:36 PM   #2
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 magphil View Post
Hi,

I have installed a new pc, and made a fresh calibre install.

I then configured it to use my old regexp to add books :

(?P<author>[^_]+?) - ((?P<series>.*) (?P<series_index>[0-9]*) - )?(?P<title>.+)

and I clicked "Read metadata only from file name.

But when I try and import a new book, the title is not parsed and "author - serie # - title" ends up beeing the book title :-(

any hint welcome.

Cheers,

Magphil
Make sure "Get metadata only from file name" is checked in the preferences, then test it on the regex test. If it fails, tell us exactly what the title is and we can tell you why the regex isn't working for you.
Starson17 is offline   Reply With Quote
 
Enthusiast
Old 03-24-2010, 02:46 PM   #3
magphil
Enthusiast
magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!magphil , Klaatu Barada Niktu!
 
Posts: 44
Karma: 5090
Join Date: Jun 2009
Device: Gen3
I found a regexp that works on another thread :

^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?(?P<title>[^\-_0-9]+)

It's just weird that the other one, which worked for importing a huge number of books, just stopped working.
magphil is offline   Reply With Quote
Old 03-24-2010, 03:40 PM   #4
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 magphil View Post
I found a regexp that works on another thread :

^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?(?P<title>[^\-_0-9]+)

It's just weird that the other one, which worked for importing a huge number of books, just stopped working.
It didn't stop working. It will work for the same books it worked on before. It's just not a very flexible expression and it depends on the specific characters to be in the right place in each filename. The regex quoted above is much more tolerant of variations in the filename, such as double spaces around the hyphen instead of exactly a single space, etc.
Starson17 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
K3 Web Browser No Longer Works With Facebook Mobile stefanv Amazon Kindle 8 10-23-2010 02:36 PM
Recipes no longer works in 0.7.9 or 0.7.10 StormRider Calibre 3 07-24-2010 01:07 AM
Multiple html (zip) conversion no longer works Katelyn Calibre 4 08-07-2009 11:52 AM
LED stays on, meaning the capactivie button no longer works ajoyk iRex 8 07-31-2009 01:34 AM
TOC no longer works after Mobi -> LRF conversion... rroberrto Calibre 3 07-07-2009 01:22 AM


All times are GMT -4. The time now is 04:49 AM.


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