Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-14-2012, 10:14 AM   #1
nynaevelan
eBook Junkie
nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.
 
nynaevelan's Avatar
 
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
Question 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)
nynaevelan is offline   Reply With Quote
Old 08-14-2012, 07:35 PM   #2
BeccaPrice
Wizard
BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.
 
BeccaPrice's Avatar
 
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.
BeccaPrice is offline   Reply With Quote
Advert
Old 08-14-2012, 09:18 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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:
Originally Posted by nynaevelan View Post
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)
Nyna
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
theducks is offline   Reply With Quote
Old 08-14-2012, 09:32 PM   #4
nynaevelan
eBook Junkie
nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.
 
nynaevelan's Avatar
 
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.
nynaevelan is offline   Reply With Quote
Old 08-15-2012, 09:21 AM   #5
Gunnerp245
Gadget Freak
Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.
 
Gunnerp245's Avatar
 
Posts: 1,169
Karma: 1043832
Join Date: Nov 2007
Location: US
Device: EE, Note 8
Quote:
Originally Posted by nynaevelan View Post
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.
Woould this thread be of help: https://www.mobileread.com/forums/sho...d.php?t=187951
Gunnerp245 is offline   Reply With Quote
Advert
Old 08-15-2012, 09:43 AM   #6
nynaevelan
eBook Junkie
nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.
 
nynaevelan's Avatar
 
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
Quote:
Originally Posted by Gunnerp245 View Post

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.
nynaevelan is offline   Reply With Quote
Old 08-15-2012, 10:01 AM   #7
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
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?
kiwidude is offline   Reply With Quote
Old 08-15-2012, 10:09 AM   #8
nynaevelan
eBook Junkie
nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.
 
nynaevelan's Avatar
 
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
Quote:
Originally Posted by kiwidude View Post
@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?
No I didn't turn anything off that I am aware of. I just changed the url on the predefined setting that was included on the installation. Though looking on the webpage section of the predefined one doesn't have any info in the series field. I am using the Goodreads:Listopia:Best Books Ever predefined setting.
nynaevelan is offline   Reply With Quote
Old 08-15-2012, 10:14 AM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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:
Originally Posted by nynaevelan View Post
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.
It is all about identifying patterns you can latch onto as triggers.
Using your sample
Code:
Dead Silence (The Body Finder, #4)
first: series info is delineated by the ( and )
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+)\)
A replace of: \1 (\2, #\3)
would put it all back together
theducks is offline   Reply With Quote
Old 08-15-2012, 10:28 AM   #10
unboggling
Wizard
unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.
 
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.
unboggling is offline   Reply With Quote
Old 08-15-2012, 11:44 AM   #11
nynaevelan
eBook Junkie
nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.
 
nynaevelan's Avatar
 
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
Quote:
Originally Posted by theducks View Post
It is all about identifying patterns you can latch onto as triggers.
Using your sample
Code:
Dead Silence (The Body Finder, #4)
first: series info is delineated by the ( and )
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+)\)
A replace of: \1 (\2, #\3)
would put it all back together
Thank you for the REGEX and for the explanation. And yes that made sense to me. I appreciate the help of everyone.
nynaevelan is offline   Reply With Quote
Old 08-15-2012, 08:51 PM   #12
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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:
Originally Posted by unboggling View Post
@theducks. What does the hash before series index do in the replacement expression?
The hash was a un-captured trigger (in the original)
My example just put it back,appending the series index
theducks is offline   Reply With Quote
Old 08-15-2012, 09:28 PM   #13
unboggling
Wizard
unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.
 
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
Quote:
Originally Posted by theducks View Post
The hash was a un-captured trigger (in the original)
My example just put it back,appending the series index
Thanks. When I asked earlier, I'd misunderstood the last part of your explanation, missed the "would put it back together".
unboggling is offline   Reply With Quote
Old 08-17-2012, 03:34 PM   #14
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by nynaevelan View Post
No I didn't turn anything off that I am aware of. I just changed the url on the predefined setting that was included on the installation. Though looking on the webpage section of the predefined one doesn't have any info in the series field. I am using the Goodreads:Listopia:Best Books Ever predefined setting.
Hmmm... looks like I "forgot" something in my predefined Goodreads settings (it was there but got lost in some refactoring). If you want to avoid any mucking around yourself later in your library, do this. Choose that Goodreads:Listopia:Best Books Ever setting, but click on "Edit" instead of "Preview", which will take you to the "Web Page" tab of the plugin. Then at the bottom left, change "Strip:" by clicking on the little script button to the right of the dropdown, and choose the "(...)" option, this will strip everything in brackets off the titles. Or if you want to be more precise you can use a regex from this thread. You can then save that as a personal user setting on the last page of the wizard for future re-use.

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).
kiwidude is offline   Reply With Quote
Old 08-17-2012, 11:29 PM   #15
nynaevelan
eBook Junkie
nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.
 
nynaevelan's Avatar
 
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
Quote:
Originally Posted by kiwidude View Post
Hmmm... looks like I "forgot" something in my predefined Goodreads settings (it was there but got lost in some refactoring). If you want to avoid any mucking around yourself later in your library, do this. Choose that Goodreads:Listopia:Best Books Ever setting, but click on "Edit" instead of "Preview", which will take you to the "Web Page" tab of the plugin. Then at the bottom left, change "Strip:" by clicking on the little script button to the right of the dropdown, and choose the "(...)" option, this will strip everything in brackets off the titles. Or if you want to be more precise you can use a regex from this thread. You can then save that as a personal user setting on the last page of the wizard for future re-use.

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).
Ok, just so I understand, by changing this setting it just removes that extra data from the title field. Does it put the series info in the series and index fields?? If not, I will stick with the regex expressions, because those will move the series info to the appropriate fields.

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.
nynaevelan is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 10:35 PM.


MobileRead.com is a privately owned, operated and funded community.