Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2010, 12:31 PM   #1
smarties86
Junior Member
smarties86 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2010
Device: Calibre
Adding Books, regular expression

First of all, I am very happy I found Calibre; it made my ebook collection organization so much better~

I am trying to figure out how to edit the regular expression for adding metadata using the filename. I know there are a lot of post regarding this but none of them works for me (either I'm not pasting it right or I'm just stupid and need someone to walk me through the steps~)

I currently have this:

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

which works GREAT when I have series in between the author and title.
ie Name_Name-Series_##-Title_title_tile.ext
(works with or without "_")

What I would like is for it to recognize files without the series
ie Name_Name-Title_title_tile.ext
and at the same time recognize those with series if present...

any possibilities?

Thanks in advance!!
smarties86 is offline   Reply With Quote
Old 12-18-2010, 03:49 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 smarties86 View Post
What I would like is for it to recognize files without the series
ie Name_Name-Title_title_tile.ext
and at the same time recognize those with series if present...

any possibilities?
Yes. Make the series optional. If you want someone to write the regex for you, post one sample of each type filename it needs to parse. Without sample filenames, it's very hard to match what you need.
Starson17 is offline   Reply With Quote
Advert
Old 12-18-2010, 05:32 PM   #3
smarties86
Junior Member
smarties86 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2010
Device: Calibre
Quote:
Originally Posted by Starson17 View Post
Yes. Make the series optional. If you want someone to write the regex for you, post one sample of each type filename it needs to parse. Without sample filenames, it's very hard to match what you need.
sample filename:

Suzanne Brockmann - Troubleshooters 13 - Into the Fire.rtf
Suzanne Brockmann - Into the Fire.rtf

It would be cool if Calibre can recognize the title ("into the fire") and author ("Suzanne brockmann), with option of detecting series ("Troubleshooters", series index "13") only if it's there

Thanks again!!
smarties86 is offline   Reply With Quote
Old 12-18-2010, 06:22 PM   #4
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Read this thread, the regex matches exactly what you want.
kiwidude is offline   Reply With Quote
Old 12-19-2010, 08:18 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 smarties86 View Post
It would be cool if Calibre can recognize the title ("into the fire") and author ("Suzanne brockmann), with option of detecting series ("Troubleshooters", series index "13") only if it's there
Kiwidude sent you to a regex that will do that. There are many around that will not only do those, but will also do variations, such as where the series number has a '#' symbol in front, etc. searches on "regex" here will find them.
Starson17 is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre book adding: Regular expression request... Spiffy Calibre 34 01-19-2016 01:03 PM
Regular Expression Help iKarampa Calibre 13 12-15-2010 07:17 AM
Regular Expression on adding books. Lokro Calibre 4 11-06-2010 11:05 AM
Regular Expression For Adding Books jhart711 Calibre 3 09-27-2010 06:51 AM
Helping importing books using regular expression askyn Calibre 4 05-08-2010 01:06 AM


All times are GMT -4. The time now is 04:21 PM.


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