I use using filename import without read the metadata with calibre to speed up the process of adding new ebook.
I have very little knowledge about REGEX,
and i have to learn it a bit to use calibre, just the basic one, like
for example
i understand title that have () or [] will be stripped with this regex:
Code:
(?P<title>[^\]{[()]+\w)
or using
? for optional regex
but for using to build my own patttern in calibre i dont get it right,
so i just grab other people regex pre-importing pattern and modified that.
for example:
before i use the regex
it doesnt work fine when i tested with, with little modification it works.
Code:
(?P<title>[a-zA-Z1-9 ]+)(\(.*\))?$
i dont know why, i dont understand much more
The Regex i used i got from this site,
i have to test it before i used it, so this one i used.
FOR:
Catherine Asaro - Primary Inversion (v5.0) (epub).epub
Catherine Asaro - [Skolian Empire 01] - Primary Inversion (v5.0) (epub).epub
Catherine Asaro - Skolian Empire 01 - Primary Inversion (v5.0) (epub).epub
REGEX :
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>[^\]{[()]+\w)
The Problem is if there is striplines in series in will broke,
like this..
Catherine Asaro - [Skolian Empire 10 - Triad 01] - Schism (v5.0) (epub).epub
so i make one again with quick preference plugins, that points out the series to grab anything.
Before
(?P<series>[^0-9\-]+)
After
(?P<series>.+)
Code:
^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?(\[?(?P<series>.+) (- )?(?P<series_index>[0-9.]+)\]?\s*-\s*)?(?P<title>[^\]{[()]+\w)
It just works, but sometimes when i got 10 or more it will fail for some but others just success,
the most intriguing is when i added back the the failure, it just works, but it doesnt work together, i dont understand this..
For the main question..
but i think i want the
Skolian Empire 10 will grabbed as series
and
Triad 01 to #superseries (series-custom-column)
or anything like author - title
but i want it to import or add it to custom column?
how to do that?