![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2011
Device: none
|
regex for importing books with comment
In Calibre I have a custom column 'comment'.
When I import a book like 'Lewis Carroll - Alice 01 - Wonderland # illustrated' the text after # should go to this column. Until a year ago I used for this purpose the regex: (?P<author>(? ![]() ![]() But this doesn't work anymore: the text 'illustrated' is not added to the comment column but to the comments section in the Metadata screen. How can I resolve this? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cant add metadata to custom columns from filenames. Only builtin fields.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
You should be able to achieve what you want with the GetFileName plugin. It will add the file name to a separate custom column. You can then parse that to your custom columns. |
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2011
Device: none
|
It worked allright until about a year ago but since then several updates have come around.
Thanks for your answers. |
![]() |
![]() |
![]() |
#5 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Also, for future reference: Wrapping your regex in [code] tags will make it not convert into smileys:
Code:
(?P<author>(?:(?!\s-\s).)*)\s*-?\s*[0-9]*\s*(?P<series>(?:(?![0-9]?[0-9-]\.?[0-9]*\s-\s).)*)?\s?(?P<series_index>[0-9]+.?[0-9]*)?\s?-?[0-9]*\s*-\s(?P<title>[^#]+)\s?(?P<comment>[#\s].*)? |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2011
Device: none
|
![]()
Thanks, Ownedbycats, I was wondering how that came about.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex not working for importing books | kokkie20 | Library Management | 3 | 11-24-2020 06:14 AM |
Regex in importing help. | xd1986k | Library Management | 9 | 02-03-2015 10:42 AM |
Need a regex for importing books | flinkdeldinky | Calibre | 31 | 10-29-2011 08:31 AM |
Regex assistance request - importing books. | Belfaborac | Library Management | 2 | 10-24-2011 08:03 AM |
regex Issue when Importing | river | Calibre | 3 | 06-16-2009 11:03 AM |