Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 11-07-2012, 03:56 AM   #1
odinokij
Enthusiast
odinokij began at the beginning.
 
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
odinokij is offline   Reply With Quote
Old 11-07-2012, 10:13 AM   #2
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: 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:
Originally Posted by odinokij View Post
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
I don't think #2 can be done at this time, {link} is not exposed to the template editor
theducks is offline   Reply With Quote
Advert
Old 11-07-2012, 01:00 PM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,951
Karma: 7225107
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by odinokij View Post
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')}")
Use an advanced coloring rule with one of the two following general program mode templates.
Code:
program:
	strcmp(format_date(today(), 'yyyy-MM-dd'), format_date(raw_field('timestamp'), 'yyyy-MM-dd'),'', 'blue', '')
or
Code:
program:
	cmp(days_between(today(), raw_field('timestamp')), 1, 'blue', '', '')
I prefer the second one because you can change the "1" to be any number of days.

In both cases change the color name ('blue' above)to the one you want.
Quote:
2) the "author_link" to mark those authors who have a custom link added through manage authors (something like: "author_link:true")
Not possible for the reason theducks gave.
chaley is offline   Reply With Quote
Old 11-08-2012, 04:15 AM   #4
odinokij
Enthusiast
odinokij began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Jul 2012
Device: Kindle 3
Thank you very much. You are great.
odinokij is offline   Reply With Quote
Old 11-09-2012, 08:18 PM   #5
jersysman
Wizard
jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.jersysman ought to be getting tired of karma fortunes by now.
 
jersysman's Avatar
 
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.
jersysman is offline   Reply With Quote
Advert
Reply


Forum Jump

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


All times are GMT -4. The time now is 06:25 AM.


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