12-25-2015, 09:09 AM | #1 |
Cultivator
Posts: 94
Karma: 216
Join Date: Feb 2015
Device: PRST2
|
Pre-Import ebook with Filenames to custom column?
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) 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 ]+)(\(.*\))?$ 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) 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) 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? |
12-25-2015, 03:37 PM | #2 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Reading metadata from filenames doesn't support custom columns.
|
Advert | |
|
12-26-2015, 06:42 PM | #3 |
Cultivator
Posts: 94
Karma: 216
Join Date: Feb 2015
Device: PRST2
|
|
Tags |
custom column, regex |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column returns value based on value of another custom column? | calvin-c | Calibre | 3 | 09-14-2013 02:24 PM |
Custom yes/no column built from long text column | Philantrop | Library Management | 7 | 03-23-2013 07:44 PM |
how to move value(s) of tag column to a custom made column | zoorakhan | Library Management | 0 | 12-08-2012 03:53 AM |
Kindle: Show ebook reading status in custom column | AndyW1691 | Library Management | 0 | 01-22-2012 04:40 PM |
Lastname, Firstname filenames - Any way to import correct author name? | Starson17 | Calibre | 5 | 12-23-2009 11:03 PM |