Quote:
Originally Posted by chaley
When importing books, check the option preferences -> adding books -> Read metadata only from file name, then use the regular expression
Code:
./(?P<author>.*)/((?P<series>.*) - (?P<series_index>.*) - )?(?P<title>.*)
The regexp matches correctly when tested with the file names
Code:
s/john smith/Some Series - 1 - Title.epub
and
Code:
s/john smith/Title.epub
|
Charles - are you sure about this? I thought we couldn't get the path when parsing with the regex during Add. I tested, and like you, I got a success during a test of the regex, but not during an actual Add. I thought the path was being stripped off the filename before it was passed to the regex for parsing into metadata. (I had to modify the separators to double backslashes for Windows to get the test to work - I tried an actual Add with both double backslashes and single forward slashes.)
Usually, I would take a look at the code, and put in a print statement to see if the path is there before parsing with the regex, but I'm really short on time. If this is actually working for someone to get metadata from a folder name, I'd appreciate confirmation (and also what OS it is working on.)