11-07-2012, 03:56 AM | #1 |
Enthusiast
Posts: 29
Karma: 10
Join Date: Jul 2012
Device: Kindle 3
|
How to colour columns based on timestamp or on author_link
I'm trying (without success) to colour columns based on:
1) timestamp in order to mark those books added today (something like: "format_date(now(), 'yyyy-MM-dd') == {timestamp:format_date( 'yyyy-MM-dd')}") 2) the "author_link" to mark those authors who have a custom link added through manage authors (something like: "author_link:true") Could anyone help me with the appropriate templates. Thank you all. Version info: Calibre 0.9.5 Language: Spanish OS: Windows XP |
11-07-2012, 10:13 AM | #2 | |
Well trained by Cats
Posts: 30,407
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
Advert | |
|
11-07-2012, 01:00 PM | #3 | ||
Grand Sorcerer
Posts: 11,951
Karma: 7225107
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program: strcmp(format_date(today(), 'yyyy-MM-dd'), format_date(raw_field('timestamp'), 'yyyy-MM-dd'),'', 'blue', '') Code:
program: cmp(days_between(today(), raw_field('timestamp')), 1, 'blue', '', '') In both cases change the color name ('blue' above)to the one you want. Quote:
|
||
11-08-2012, 04:15 AM | #4 |
Enthusiast
Posts: 29
Karma: 10
Join Date: Jul 2012
Device: Kindle 3
|
Thank you very much. You are great.
|
11-09-2012, 08:18 PM | #5 |
Wizard
Posts: 1,747
Karma: 3761220
Join Date: Mar 2011
Location: Pennsylvania
Device: T1 Red, Kindle Fire, Kindle PW, PW2, Nook HD+, Kobo Mini, Aura HD
|
Thanks for this! I was looking for something just the same.
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Modified date timestamp incorrect? | lgladen | Calibre | 12 | 08-19-2014 09:49 AM |
Modified timestamp changed | theducks | Library Management | 2 | 03-12-2012 11:52 PM |
Job download timestamp column | vivdev | Calibre | 1 | 01-17-2012 07:38 AM |
PRS-T1 Timestamp issues | luvduchovny | Sony Reader | 8 | 11-05-2011 04:39 PM |
mi.timestamp set from imported book | KariK | Development | 4 | 09-18-2011 11:58 AM |