![]() |
#16 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,893
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
Code:
(?P<isbn>.+) ? (?P<title>[^_]+) Last edited by DoctorOhh; 10-28-2011 at 08:28 AM. |
|
![]() |
![]() |
![]() |
#17 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
![]() 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 |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,893
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
![]() |
![]() |
![]() |
#19 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
![]() |
![]() |
#20 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,893
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Connoisseur
![]() 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 |
![]() |
![]() |
![]() |
#22 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Code:
(?P<isbn>[0-9X?)(?P<title>[^_]+) |
|
![]() |
![]() |
![]() |
#23 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,354
Karma: 78877538
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
|
![]() |
![]() |
![]() |
#24 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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}) 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$]) |
![]() |
![]() |
![]() |
#25 |
Connoisseur
![]() 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. |
![]() |
![]() |
![]() |
#26 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
![]() |
![]() |
![]() |
#27 |
Connoisseur
![]() 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 |
![]() |
![]() |
![]() |
#28 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
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. |
![]() |
![]() |
![]() |
#29 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
|
Code:
(?P<author>.+?)\s+-\s+(?:(?P<series>.+?)\s*(?:(?P<series_index>\d+(?:\.\d*)?))?\s+-\s+)?(?P<title>.+) Quote:
![]() |
|
![]() |
![]() |
![]() |
#30 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,893
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
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. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |