![]() |
#886 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,717
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I have a date column, #fanficupdated. Is it possible for a template rule to compare that to the date of a matched book currently on the device and return a bool?
I'd like to display a column icon if the version of a fanfic in my library is newer than the one on the device (to remind me to re-upload it). Making a hidden composite column to tie the icon to seems best idea. Last edited by ownedbycats; 09-23-2020 at 08:05 PM. |
![]() |
![]() |
![]() |
#887 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,717
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
For a format_date, how would I make it return the first three numbers of the year?
![]() Code:
{pubdate:'test($, strcat(format_date($,'yyyy')), 'Unknown')'} |
![]() |
![]() |
Advert | |
|
![]() |
#888 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,342
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
It seems that adding substr to the template functions might be a good idea. |
|
![]() |
![]() |
![]() |
#889 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,717
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Is there a template function that can test for "does this book have an annotation/bookmark"?
|
![]() |
![]() |
![]() |
#890 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,342
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
Advert | |
|
![]() |
#891 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,717
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thank you.
![]() Last edited by ownedbycats; 10-30-2020 at 04:19 AM. |
![]() |
![]() |
![]() |
#892 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,342
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#893 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,717
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Understandable. I might make an enhancement request for some option to mark all the books with annotations.
|
![]() |
![]() |
![]() |
#894 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,342
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
I also added a template function annotation_count() that returns the count if it is > 0 else the empty string. This will work with template functions like "isempty()", "test()", "first_non_empty", etc. It will also work with numeric relationals such as "if annotation_count() ># 0 then 'foo' else 'bar' fi" |
||
![]() |
![]() |
![]() |
#895 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,717
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thank you
![]() |
![]() |
![]() |
![]() |
#896 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,717
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Code:
program: p = identifier_in_field(id:isbn) g = identifier_in_field(id:goodreads) if p then strcat(p) else if g then strcat(g) fi I'm still trying to figure these out. ![]() |
![]() |
![]() |
![]() |
#897 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,597
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
Code:
program: p = identifier_in_field(id:isbn) g = identifier_in_field(id:goodreads) if p then strcat(p) else if g then strcat(g) fi fi |
|
![]() |
![]() |
![]() |
#898 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,342
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program: i = field('identifiers'); ifempty(select(i, 'isbn'), select(i, 'goodreads')) Code:
program: i = field('identifiers'); p = select(i, 'isbn'); if p then p else select(i, 'goodreads') fi |
|
![]() |
![]() |
![]() |
#899 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,717
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
That works.
![]() |
![]() |
![]() |
![]() |
#900 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,342
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program: i = field('identifiers'); first_non_empty( select(i, 'isbn'), select(i, 'goodreads') # more as desired ) |
|
![]() |
![]() |
![]() |
Tags |
custom column, tag, tags |
|
![]() |
||||
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 |