Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2011, 07:59 AM   #16
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,893
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by theducks View Post
No reasonable way to determine which words belong together with (spaces) and which are new fields.
There is one method, but I don't have the skills to write the simple regex required. Essentially it would be something like (this doesn't work, but I'm sure someone can correct it)
Code:
(?P<isbn>.+) ? (?P<title>[^_]+)
the important part is the isbn, don't really care what garbage is in the title field because we will write over it when fetching metadata. Once the isbn field is set, download metadata and have overwrite Author and Title and most everything checked in the metadata configuration window.

Last edited by DoctorOhh; 10-28-2011 at 08:28 AM.
DoctorOhh is offline   Reply With Quote
Old 10-28-2011, 08:24 AM   #17
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: 30,928
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by dwanthny View Post
the important part is the isbn, don't really care what garbage is in the title field because we will write over it when fetching metadata. Once the isbn field is set download metadata and have overwrite Author and Title and most everything checked in the metadata configuration window.

I did not think of that (mostly because I turned those Off because I got tired of it 'fixing' my normalized names.
I use Robert A. Heinlein, Not Robert Anson Heinlein or Robert Heinlein)
I use the (base)Book title:The Lark and the Wren
not the (?) title: Bardic Voices Book 1:The Lark and the Wren
theducks is offline   Reply With Quote
Advert
Old 10-28-2011, 08:27 AM   #18
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,893
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by theducks View Post
I did not think of that (mostly because I turned those Off because I got tired of it 'fixing' my normalized names.
I never have title or author checked when fetching metadata either. Now hopefully someone can correct the regex.
DoctorOhh is offline   Reply With Quote
Old 10-28-2011, 08:37 AM   #19
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: 30,928
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by dwanthny View Post
I never have title or author checked when fetching metadata either. Now hopefully someone can correct the regex.
won't a escaped Period work between those fields?
Code:
(?P<isbn>.+)\.(?P<title>[^_]+)
theducks is offline   Reply With Quote
Old 10-28-2011, 08:42 AM   #20
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,893
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by theducks View Post
won't a escaped Period work between those fields?
Code:
(?P<isbn>.+)\.(?P<title>[^_]+)
When I tested it with this
01505798756X.Silly Press.The.Strange.Professional.Title.Jul.1985.epub

It put 1985 in the title and the rest as isbn. Sort of want it to break on the first period, not the last. You can test it under adding books preferences.
DoctorOhh is offline   Reply With Quote
Advert
Old 10-28-2011, 09:00 AM   #21
sdspieg
Connoisseur
sdspieg began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Jun 2009
Device: Nook, Kindle 3
Yes, but all I want is the isbn number - the rest I can get through a bulk download of covers and metadata. And the isbn always is prior to the first dot. Is there no way to just extract that and then copy it to the isbn-field?

Thanks,

-Stephan
sdspieg is offline   Reply With Quote
Old 10-28-2011, 09:13 AM   #22
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: 30,928
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by dwanthny View Post
When I tested it with this
01505798756X.Silly Press.The.Strange.Professional.Title.Jul.1985.epub

It put 1985 in the title and the rest as isbn. Sort of want it to break on the first period, not the last. You can test it under adding books preferences.
Code:
(?P<isbn>[0-9X?)(?P<title>[^_]+)
works for the ISBN part
theducks is offline   Reply With Quote
Old 10-28-2011, 10:42 AM   #23
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,354
Karma: 78877538
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Did you mean

Quote:
Originally Posted by theducks View Post
Code:
(?P<isbn>[0-9X]?)(?P<title>[^_]+)
PeterT is offline   Reply With Quote
Old 10-28-2011, 04:38 PM   #24
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
Surely something simple like :
Code:
(?mi)^(?P<isbn>[\d\-x]{9,17})
Would work better? It includes some leeway for -'s which are often used to space isbn's.

And for fun, here's an over-complex regex to pull out the potentially useful stuff from that formatting :
Code:
(?P<isbn>[\d\-xX]{9,17})\.(?:(?P<publisher>(?:[\w]+\s[\w]*)+)\.)?(?P<title>.+?)(?P<datefudge>(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\w*\.\d{2,4})?(?:\.[^\.]+[\n\r$])
Serpentine is offline   Reply With Quote
Old 10-28-2011, 07:37 PM   #25
sdspieg
Connoisseur
sdspieg began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Jun 2009
Device: Nook, Kindle 3
I appreciate all of your assistance, but can somebody please give me some more info on where exactly I have to enter what (see my original posting?)

Because when I enter the regex from theducks in the 'search' field it turns
0313306419.Greenwood.Press.Rudolfo.A.Anaya.A.Criti cal.Companion.Oct.1999
into .Grnwood.rss.Rudofo.A.Anaya.A.Crca.Companon.Oc. (and then puts that in the isbn)...

The simple one from Serpentine does just get rid of the isbn
.Greenwood.Press.Rudolfo.A.Anaya.A.Critical.Compan ion.Oct.1999
but then again puts that in the isbn field, instead of the isbn itself

I'm sure I'm doing sthg wrong here, but would really appreciate your help.

Thanks!

-Stephan

Last edited by sdspieg; 10-28-2011 at 07:40 PM.
sdspieg is offline   Reply With Quote
Old 10-28-2011, 09:09 PM   #26
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
I was assuming you were using the ISBN import option on a list of files, and were structuring the text yourself using the regex. It's most likely the easiest way to fetch the metadata and such automatically.

Would you like a step by step of doing that + regex?
Serpentine is offline   Reply With Quote
Old 10-28-2011, 09:13 PM   #27
sdspieg
Connoisseur
sdspieg began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Jun 2009
Device: Nook, Kindle 3
Isbn-import? You mean the extract-isbn plugin (which is still very much hit-'n-miss)?

So I guess my answer is - yes please, a step-by-step sounds great!

-Stephan
sdspieg is offline   Reply With Quote
Old 10-28-2011, 10:50 PM   #28
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
Nah, there's a nice easy way to do it without the plugin - I've never use the plugin.
I was going to do it manually, but using a script is far easier.

Anyway, assuming you have Python installed here's the script:
Right click me -> save as
  1. Save that to the folder which contains all your books - Don't worry if your books are in subfolders, it will crawl all the subfolders too.
  2. If your python is using the default settings, and you have .py files associated: Just double click it, this should run it, a file called "bookisbnlist.txt" will be created in the folder.
  3. Open the text file.
  4. Swap to Calibre. Add Books (in the top menu bar) -> Add from ISBN
  5. Copy and paste in the content of that text file.
  6. Add them.

If you don't have Python, or don't have the files associated - figure it out
The python is written in a rather readable manner - so if you want to try other patterns, you should be able to edit it easily enough.
Serpentine is offline   Reply With Quote
Old 10-28-2011, 11:24 PM   #29
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
Quote:
Originally Posted by salines View Post
"Fielding, Joy-ebbes - Tanz, Püppchen, tanz.pdf"
Code:
(?P<author>.+?)\s+-\s+(?:(?P<series>.+?)\s*(?:(?P<series_index>\d+(?:\.\d*)?))?\s+-\s+)?(?P<title>.+)
Try that, it's a bit more robust and seems to fit your other cases.
Quote:
Originally Posted by salines View Post
Should I switch the used regex if I add book for series and none series?
It should deal with books no series now, I had placed something in the wrong conditional
Serpentine is offline   Reply With Quote
Old 10-28-2011, 11:46 PM   #30
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,893
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by sdspieg View Post
Isbn-import? You mean the extract-isbn plugin (which is still very much hit-'n-miss)?

So I guess my answer is - yes please, a step-by-step sounds great!

-Stephan
Go to Preferences - Adding Books and try any of the REGEXs above that people say will work in the Regular Expression box. Apply the settings then add the book. You can test the expression first by placing the name of a test file (including the extension of .epub or .mobi or whatever) name area and click the test button.

If all goes well just add books like normal and the isbn field will be filled in, then download the metadata and have it fill in the fields.
DoctorOhh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex: File Renaming Pre-Import & Importing penguinaka Library Management 20 08-14-2012 06:11 PM
Importing RegEx Line TheEldest Calibre 1 07-05-2011 10:18 PM
understandng the sample add books regex cybmole Library Management 11 03-02-2011 06:08 AM
A little help adding books and using regex. Dragonator Calibre 7 12-17-2010 06:57 PM
regex Issue when Importing river Calibre 3 06-16-2009 11:03 AM


All times are GMT -4. The time now is 05:06 AM.


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