View Single Post
Old 04-05-2010, 03:40 PM   #1
Spiffy has a complete set of Star Wars action figures.Spiffy has a complete set of Star Wars action figures.Spiffy has a complete set of Star Wars action figures.Spiffy has a complete set of Star Wars action figures.Spiffy has a complete set of Star Wars action figures.
Posts: 160
Karma: 416
Join Date: Apr 2010
Device: Astak EZ Reader Pro AND Sony PRS-505
Question Calibre book adding: Regular expression request...

Probably the five millionth since this forum was created, I suppose. :-)

Many of my files are kept in the following naming format:

L. Frank Baum - [Wizard of Oz 02] - The Marvelous Land of Oz.lit

Please note those square brackets are virtually always used in what I've got stored, and the <space><single dash><space> between an author and series/series number and between that and the book title is also pretty consistent.

Assuming the vast majority of my books follow this format, does anyone have a good expression to add them with?

Ideally the expression would recognize the square brackets as a tip off that a book series and book number are being disclosed. Is such a thing even possible? I ask, because if a book ISN'T part of a series, the existing file name is probably something more like this:

H. G. Wells - The Time Machine.epub

OPTIONALLY, its at least possible (although I bet this is even harder to resolve) that some files may look like this:

Jules Verne - Journey to the Center of the Earth (html).zip

Pie in the sky, if those ROUND brackets could be a tip off to ignore something as NOT being part of a book title, that would be ideal. Yeah, even ignorant of how to build these expressions properly, I'm skeptical.

Does anyone out there have stuff following approximately these "rules", and what have you done to best ensure proper Calibre "importing"? ANY subset of the requirements I list above, dealing with series names in square brackets, ignoring stuff in round brackets, etc. would be better than nothing, but I don't expect much.

Please note that I have zero ability at scripting, so I'm really just asking what the best canned solution is. If its "you're out of luck" I guess I'll figure something else out. If there are proper expressions to handle this already, great. If there are other third party tools outside of Calibre to accurately mass rename files FIRST in an acceptably way, I suppose that's something I'd be willing to try as well (although using a 2nd tool first seems redundant if Calibre can be made to do it).

Thanks infinitely in advance for any possible suggestions!

Last edited by Spiffy; 04-05-2010 at 03:45 PM.
Spiffy is offline   Reply With Quote