Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-30-2017, 03:59 AM   #1
m.s
Enthusiast
m.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Time
 
m.s's Avatar
 
Posts: 31
Karma: 49174
Join Date: Oct 2012
Device: Bookeens, Kindles, Kobos, PocketBooks, Tolinos
Using re-function in columns

I want to use the re-Function for use in a column for the search series on Goodreads.

Here is the source from my column:
Code:
<a href="https://www.goodreads.com/search?utf8=%E2%9C%93&query={series}">Find on Goodreads</a>
If a series has an ampersand (eg. "Alpha & Omega"), goodreads finds only the first word. So I want to replace the blanks with "+" and the ampersands with "%26". But I´ve problems to understand the re-function. I´ve tried:

Code:
{series:re(field('series'), " ", "+")}
but it doesn't work. Whats wrong here?
m.s is offline   Reply With Quote
Old 10-30-2017, 06:23 AM   #2
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Hi m.s.
this will change blanks with regex:
Code:
re(field('series'), '\s', '+')
Edit:
If you want to use it in a custom column, make it via program mode:

Code:
program:
suchtext=re(field('series'), '\s', '+');
suchtext=re(suchtext, '\&', '%26');
strcat('<a href=','https://www.goodreads.com/search?utf8=%E2%9C%93&q=',suchtext,'&search_type=books','">Find on Goodreads</a>')
Column type: "Column build from other columns"
and if you want to use it in book details as clickable value check "Show as HTML in Book details" (maybe hit visibility as column).

Last edited by Divingduck; 10-30-2017 at 07:36 AM.
Divingduck is offline   Reply With Quote
Advert
Old 10-30-2017, 09:00 AM   #3
m.s
Enthusiast
m.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Timem.s possesses cleverness exceeding the boundaries of Space and Time
 
m.s's Avatar
 
Posts: 31
Karma: 49174
Join Date: Oct 2012
Device: Bookeens, Kindles, Kobos, PocketBooks, Tolinos
Ah, great. Now I understand this. Thank you!
m.s is offline   Reply With Quote
Old 10-30-2017, 09:17 AM   #4
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Your'e wellcome
Divingduck is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML/CSS for two columns 'seems' not to function chaot Workshop 38 04-13-2022 05:17 PM
Nesting Function arguments in custom columns da_jane Calibre 1 11-21-2012 02:48 PM
Columns raiderkilo Calibre 5 01-21-2012 05:53 PM
Columns Noughty Library Management 18 08-15-2011 04:57 PM
Columns darkpoet ePub 8 09-09-2009 10:17 PM


All times are GMT -4. The time now is 08:47 PM.


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