09-13-2009, 07:31 AM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Sep 2009
Device: DR1000S
|
[Old Thread] Extract ISBN from file name
I've got hundreds of e-books name as ISBN.pdf
How do I get set the "Regular expression" in the "Adding books" page of Preferences? Thank you. |
11-04-2010, 09:55 AM | #2 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
|
Hi,
Did you ever figure out a good regex for this? I have a ton of filenames that begins with the ISBN, followed by publisher and title. I doubt I'll be able to parse the publisher out of the title, but I figure if I can at least grab the ISBN metadata, I can pull down all the rest. Thanks, G |
Advert | |
|
11-04-2010, 10:04 AM | #3 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
11-04-2010, 10:16 AM | #4 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
|
Thanks, Starson.
I figured that the good ISBN would allow me to recupe the relevant title, author, and publisher data, whether or not it was already in the filename. I'm willing to try for that brute force method before going so far as to parse the other elements by a regex. Here's a couple of filenames: 0262083558.The.MIT.Press.Ham.Radios.Technical.Cult ure.Dec.2006.pdf 0520233085.University.of.California.Press.The.Hors e.and.Jockey.from.Artemision.A.Bronze.Equestrian.M onument.of.the.Hellenistic.Period.Jul.2004.pdf 041530329X.Routledge.Politics.The.Basics.Jul.2004. pdf Mostly academic titles, all from the same source. Many thanks to whoever can lend a hand. |
11-04-2010, 10:38 AM | #5 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Code:
(?P<isbn>.+?)\.(?P<title>.+) |
|
Advert | |
|
11-08-2010, 08:40 AM | #6 |
Member
Posts: 18
Karma: 10
Join Date: Oct 2010
Device: none
|
I suggest using another software called "ISBN renamer" to change file name to be ISBN.pdf. After that, just proceed with Calibre. "ISBN renamer" reads xx first page of the book to find ISBN (xx depends on you) and then seeks info from Amazon to rename the book.
|
11-08-2010, 09:44 AM | #7 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
There's no need to use any other software. He's already got the ISBN in the filename, so he doesn't need to read any pages to find it. Using the regex I posted, it will bring the ISBN number into Calibre, and he can then automatically find author/title/publisher/ratings/etc. from Amazon and other sites with a bulk metadata fetch.
|
11-08-2010, 10:38 AM | #8 | |
Member
Posts: 18
Karma: 10
Join Date: Oct 2010
Device: none
|
Quote:
I'm wondering how to fetch metadata from Amazon, it seems that only googlebooks and isbndb are available. |
|
11-08-2010, 10:42 AM | #9 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Whatever is available from Amazon is already being picked up via the Amazon plugin (unless you've turned it off). I did read that one of the sources (possibly Amazon?) has set strict limits recently on the number of fetches allowed.
|
11-08-2010, 10:53 AM | #10 |
Member
Posts: 18
Karma: 10
Join Date: Oct 2010
Device: none
|
I remember reading somewhere that Calibre doesn't read metadata from Amazon because there is a policy of Amazon that it is prohibited to copy metadata from this site without increasing its traffic (though I know at least two softwares still doing this one, the free one is ISBN renamer, the commercial one is Book collector).
|
11-08-2010, 11:23 AM | #11 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
"Amazon metadata download plugin: Make it more robust and add option to auto convert HTML to text" There's been an Amazon plugin forever. The interaction between the various metadata source plugins, and what comes from where, is not always obvious. |
|
11-09-2010, 09:04 PM | #12 | |
Member
Posts: 18
Karma: 10
Join Date: Oct 2010
Device: none
|
Quote:
Up to now, calibre can find the following parameters: title, author, tag, publisher, rating, series, published date. I think if calibre reads metadata from Amazon, then some more parameters will also be available, e.g. Number of pages, edition. Last edited by vne; 11-09-2010 at 09:07 PM. |
|
11-12-2010, 09:38 AM | #13 |
Junior Member
Posts: 2
Karma: 10
Join Date: Nov 2010
Device: none
|
I'm having similar problems as Grandin above, I have a lot of books in this format (only ISBN):
041530329X.pdf 9780521874878.pdf but I can't get Calibre (0.7.27) to pick up ISBN from filename. I tried the already mentioned suggestions (?P<isbn>.+?)\.(?P<title>.+), removing the check from "Read metadata..." but still no luck... Any other ideas? tnx... |
11-12-2010, 10:11 AM | #14 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
(?P<isbn>.+) However, IIRC, Calibre is not happy if you don't give it a title or author in the regex. One solution is to just add the books, then select all, use Edit Metadata (bulk) and the Search and Replace Feature to copy the ISBN from title into the ISBN field. |
|
11-12-2010, 10:32 AM | #15 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
|
Thanks!
Starson17 - Thanks for the regex! Worked perfectly.
Frulex - Starson17's suggestion should work just fine, but one suggestion: make sure than under "adding books" the option to check file metadata is not ticked - this way the info be pulled directly from the filename with no margin of error. After that, download the metadata in a batch and you'll be right as rain. vne - I appreciate the ISBN renamer tip. That will come in very handy with another pack I have, where the books are in .txt file, filename=title, but author is the folder name! Thus far has been impossible to fix, and as I don't know any scripting languages this tool might be the best way. Cheers all around! |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Extract ISBN | kiwidude | Plugins | 545 | 09-25-2024 03:02 AM |
Extract ISBN from PDF? | mdroberts | Calibre | 14 | 12-16-2016 07:32 AM |
[Old Thread] Bulk ISBN Removal | brewjono | Calibre | 8 | 05-04-2011 06:15 PM |
[Old Thread] Auto Extract ISBN-Feature request | UnraisedArc | Calibre | 60 | 03-23-2011 09:31 AM |
[Old Thread] ISBN in List view | muppetgeoff | Library Management | 6 | 02-15-2011 08:35 PM |