08-14-2012, 10:14 AM | #1 |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Reg Ex Help - Copy to Series Field
Hi:
Please forgive my ignorance, I have searched the help file and the forum but I cannot seem to find help with what I need. I have the following data in my Title field, but I would like to move the series information from the series field and into the series field, is this possible with Regex? If so, can someone help me set it up? This is what the field looks like: Dead Silence (The Body Finder, #4) |
08-14-2012, 07:35 PM | #2 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
If you go to the help file, and look under Tweaks, there's an entry for adding series information to the book title. I think this is what you're after? it gives the exact code, so you can copy from the help file and paste it into the appropriate field on the Metadata Plugboards screen.
eta: oh, wait - I think you're wanting to do the opposite than what I'm suggesting. You want to move data from the title into the series fields on the Edit Metadata screen, yes? i think this has to be done by hand for each book. If there is a better way to do it, as soon as someone with more knowledge than I have posts the solution, I'll amend the help file to add that. |
Advert | |
|
08-14-2012, 09:18 PM | #3 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
this is a bit of a pain to do (3 steps, because series and series index are 2 different fields and AFAIK the form only allows 1 field at a time) 1) capture the series NAME and put it into the Series field (This will leave this in the title) 2) capture the series Index (number and put iyt into the series_index field 3)Now capture the series, series index and just let it be removed |
|
08-14-2012, 09:32 PM | #4 |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
If I have to do it in three steps I do not mind. I just started using Kiwidude's Import List plugin and I want to import my Goodreads Listopia Lists into my database as wishlist items. However, if possible I do not want to have to fix the Titles manually. So if this could be done in the Add Books section or the Search and Replace section with regex expressions that would be great.
|
08-15-2012, 09:21 AM | #5 | |
Gadget Freak
Posts: 1,169
Karma: 1043832
Join Date: Nov 2007
Location: US
Device: EE, Note 8
|
Quote:
|
|
Advert | |
|
08-15-2012, 09:43 AM | #6 | |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Quote:
That is real close, but I do not know what to select to change it from the example to what I have. I tried reading the instructions but I am just comprehending what it is telling me to do. |
|
08-15-2012, 10:01 AM | #7 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@Nyn - the Import list plugin has the ability to strip series info from the titles, in fact I thought I had that function already setup with the predefined setting for Listopia in the plugin? Do you have an example URL where it is not working for you? Or have you turned that stripping off hoping to scrape it into the series column as a post step instead?
|
08-15-2012, 10:09 AM | #8 | |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Quote:
|
|
08-15-2012, 10:14 AM | #9 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Using your sample Code:
Dead Silence (The Body Finder, #4) second: the series_index value is DIGITS after a , # (comma space hash) so now we know where series starts and ends and where the number is We also see there are some special REGEX reserved characters that will need special treatment (I have split onto many lines to explain ONLY) Dead Silence (The Body Finder, #4) (.+) \( capture #1 the Title and eliminates the space ( (.+)\,\s\# capture #2 the series name and eliminates the comma space hash (\d+)\) capture #3 grabs the series_index and eliminates the closing ) All together: Code:
(.+) \((.+)\,\s\#(\d+)\) would put it all back together |
|
08-15-2012, 10:28 AM | #10 |
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
@theducks. What does the hash before series index do in the replacement expression?
Last edited by unboggling; 08-15-2012 at 12:24 PM. |
08-15-2012, 11:44 AM | #11 | |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Quote:
|
|
08-15-2012, 08:51 PM | #12 |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
08-15-2012, 09:28 PM | #13 |
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
|
08-17-2012, 03:34 PM | #14 | |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
I will make sure that those Goodreads settings have that as the default behaviour in a future version (that is assuming I don't make other changes to scrape that data into the actual series column for the plugin). |
|
08-17-2012, 11:29 PM | #15 | |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Quote:
And let me point out that I am loving this plugin. I have been playing with adding wishlist entries to my db since it came out. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
any way to create a tag from the series field? | booklover81 | Calibre | 0 | 12-19-2011 02:11 PM |
Reg ex to move 'by author' from title field | maartencoertjens | Library Management | 3 | 10-20-2011 04:26 PM |
Author and Series in Authors field | Azrael1018 | Library Management | 6 | 08-17-2011 11:07 AM |
series data field | er0_senn1n | Calibre | 3 | 01-12-2011 03:33 PM |
ZXreader series field - how do I set it using Calibre? | Boreads | Calibre | 3 | 12-08-2010 11:38 PM |