Quote:
Originally Posted by akmatov
I'm very new to using Calibre but so far it seems fairly straight forward, but for one small issue.
I have a large number of ebooks I'm entering into Calibre, some of which are part of a series. Looking at the Preferences/Add Book I was able to rearrange the default setting to (?P<author>[^_]+)-(?P<title>.+) so that an ebook file in the format John Smith-A Book.pdf will Add Book into Calibre as Author=John Smith and Title=A Book.
However, what would be the formula for the first book in John Smith's naval mystery series, i.e. "John Smith - A Book - Naval Mystery 1"?
Looking at the preferences that can be set it seems there are quite a few items that could be translated from the file name into Calibre. However, while I was able to figure out "author" and "title", "series" added to the same style of formula didn't work.
Advise would be appreciated.
|
The default gave the clue.
Code:
^((?P<author>([^\_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+) ([-#] ?)?(?P<series_index>[0-9.]+)?\s*-\s*)?(?P<title>.+)
BTW use the 'Test' area to validate the you pattern performs correctly on ALL the files you feed it.