06-01-2020, 11:02 PM | #871 |
She/Her
Posts: 86
Karma: 142774
Join Date: Aug 2009
Location: Perth, Australia
Device: Kindle PW5 (G001PX) PW3 PW1
|
Hello, I'm looking for some help creating a composite column combined with an advanced icon rule, to give me a column that has icons for the online libraries I can borrow that book from. I currently have columns for each of theses online libraries but I'm hoping to combine the columns into one.
The Calibre Library is my Wish-list/To Read Library so its full of empty books with full metadata. The ID field might have ids for "borrowbox", "wheelers" and "odid" which is a combined ID that might have Overdrive ID and/or a Kindle Unlimited ID. It might also not have any of those IDs in which case I'd like nothing to show in that column. The IDs look like this: borrowbox:AAU_779614 Three uppercase letters then an underscore then six numbers ^[A-Z]{3}_\d{6}$ is the regex I am using for the single column wheelers:9781760873752 Yes this is the ISBN 13 of the book ^(?=(?:\D*\d){10}(?:(?:\D*\d){3})?$)[\d-]+$ ISBN regex. and the odid can look like one of these: odid:5426939@wapldmc.overdrive.com odid:B088PB8T42@ak/unlimited odid:2077018@wapldmc.overdrive.com&B00PY6CSNM@ak/unlimited and my icons are named kunlimited.png, wheelers.png, borrowbox.png and overdrive.png Thanks for any help! I've created the column listing the IDs by using the template: program: strcat(select(field('identifiers'),'odid'),' ', select(field('identifiers'),'borrowbox'),' ', select(field('identifiers'),'wheelers')); but getting the icons to work using an advanced rule is just confusing me. Last edited by Penny_Dreadful; 06-02-2020 at 03:52 AM. |
06-02-2020, 04:46 AM | #872 | |
Grand Sorcerer
Posts: 24,906
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
The following advanced rule should work to give the icon for Overdrive: Code:
program: id = select(field('identifiers'),'odid'); contains(id, 'overdrive', 'overdrive.png','') Code:
program: id = select(field('identifiers'),'odid'); contains(id, 'unlimited', 'kunlimited.png','') For "Borrowbox" and "Wheelers", the value of the identifier shouldn't matter, just that the identifier exists. And you can use simple icon rules. The first field needs to be set to either "composed icons w/text" or "composed icons w/no text". The condition is "If the Identifiers column has id value: wheelers". And then do a similar rule for "Borrowbox". |
|
Advert | |
|
06-02-2020, 05:58 AM | #873 |
She/Her
Posts: 86
Karma: 142774
Join Date: Aug 2009
Location: Perth, Australia
Device: Kindle PW5 (G001PX) PW3 PW1
|
@davidfor Thank you so much, the big thing I was missing was "composed icons" now I know why my rules kept on overwriting each other!
The advanced rule code helped heaps too, my Wishlist library is now so much more useful now I can see all the libraries I can borrow a book from in a single column instead of having them spread across three columns. The amount of help you give out on these forums is amazing, thank you! |
06-02-2020, 06:08 AM | #874 |
Grand Sorcerer
Posts: 11,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
06-02-2020, 06:19 AM | #875 |
Grand Sorcerer
Posts: 24,906
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
|
Advert | |
|
06-20-2020, 07:12 AM | #876 |
Connoisseur
Posts: 93
Karma: 12
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
|
Hi,
Is it possible to add the value of a custom column to the book description?, and then add the result to the epub file? Thanks |
06-20-2020, 08:12 AM | #877 |
Grand Sorcerer
Posts: 24,906
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
A metadata plugboard can update the comments field when the book is sent to the device or a save to disk is done. This can include data from any column.
|
06-20-2020, 09:50 AM | #878 | |
Connoisseur
Posts: 93
Karma: 12
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
|
Quote:
epub:save_to_disk = ([{#words} - {comments}] -> comments) But I don't see what happens. Where will the new 'comments' be? I have created custom columns but I have never used templates. Any help will help me. This is what I want (I have modified this one by hand): And then, polish epub. Last edited by Carmelocotonto; 06-20-2020 at 10:09 AM. |
|
06-20-2020, 10:37 AM | #879 | ||
Grand Sorcerer
Posts: 24,906
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Code:
{comments}{:'raw_field("tags")'|<p><b>Tags:</b> |</p>}{rating:rating_as_stars()|<p><b>Rating:</b> |</p>}{#kobo_last_read:|<p><b>Last Read:</b> |</p>}{:'test(field('#words'),'<p>',test(field('#pages'),'<p>',''))'}{#words:|<b>Word count:</b> |}{:'test(field('#words'),test(field('#pages'),' ',''),'')'}{#pages:|<b>Page count:</b> |}{:'test(field('#words'),'</p>',test(field('#pages'),'</p>',''))'} Quote:
Another was posted in the Kobo forum in the last couple of days. That one puts the details first. And the post has some screenshots of what it looks like on a Kobo device. |
||
06-20-2020, 11:01 AM | #880 |
Well trained by Cats
Posts: 29,949
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Not all devices support (can display) Comments.
Where they choose to gather what they display, might be another. And if you use a wireless delivery, who knows what they filter/insert/replace |
07-10-2020, 06:57 PM | #881 |
Junior Member
Posts: 1
Karma: 10
Join Date: Jul 2020
Device: Paperwhite 2015
|
Superscript in a title on kindle?
I have a kindle paperwhite 2015 and do all my ebook management via calibre. I want to use the plugboard to put the rating (star amount) in either the title as a superscript to make it less conspicuous or in the author field. Is there a way to make it a superscript? I've searched and can't find anything on it and my programming skills were tasked to the max just to be able to write my plugboard in the first place, lol.
Code:
Also, I have {author_sort} going to the author field. I'd assumed that if I added another value, the output would place it after the author's name. So, {author_sort}{rating:| *|} would become 'First Last *3'. Instead it's 'First *3 Last' and I'm not sure why. Sorry if I've used the code tags wrong, I didn't want the bit of code to make a mess... Thanks for any help! |
07-15-2020, 02:44 PM | #882 |
Custom User Title
Posts: 8,813
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Is there any specific template function for marked books? For visibility reasons I'd like to apply column colouring to them.
|
07-15-2020, 03:23 PM | #883 |
Grand Sorcerer
Posts: 11,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
07-26-2020, 04:12 AM | #884 |
Member
Posts: 13
Karma: 10
Join Date: Oct 2019
Device: paperwhite; android
|
Hello, can anyone help with a template I'm trying to make for cover generation? I want it to take a text field that's a series of 2+ names separated by slashes, and return just the first word of each name, retaining the slashes.
i.e., so that "John Doe/Jim Smith" would show as "John/Jim" on the generated cover. |
07-26-2020, 05:33 AM | #885 | |
Grand Sorcerer
Posts: 11,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program: list_re(field('#text'), '/', '^(..*?)\b.*$', '\1') Code:
{#text:'list_re($, '/', '^(..*?)\b.*$', '\1')'} The above also handles single names. For example "John Doe/Fred/Jim Smith" produces "/John/Fred/Jim". If you don't want that then change the \b to a space character. Last edited by chaley; 07-26-2020 at 12:06 PM. Reason: Fix the regexes |
|
Tags |
custom column, tag, tags |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
custom column i need a little help | shinken | Calibre | 3 | 09-15-2010 03:41 AM |
Using Custom Metadata in Save Template | EJvdH | Calibre | 1 | 07-02-2010 06:06 AM |
Accessories Decalgirl Kindle 2 custom skin template | srmalloy | Amazon Kindle | 6 | 04-09-2010 09:55 PM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |