05-29-2011, 09:17 AM | #16 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Actually, I think you want
Code:
{tags:'test($, "black", "red")'} The test function returns the first string (the second argument) if the value (the first argument) is not empty, otherwise it returns the second string. In this case, the value being tested is tags. My understanding is that you want to return 'black' if tags is not empty, otherwise 'red'. |
05-29-2011, 11:00 AM | #17 | |
Groupie
Posts: 156
Karma: 354
Join Date: Mar 2009
Location: US
Device: iPad mini, iPad 2, Kindle 3
|
Quote:
And to continue answering nyn's question: I might, for example, decide to put in red all titles that are on my device but not yet read, or not yet on my device but I might want to read soon because they have a certain tag, or whatever. I do have columns for these things, but sometimes I have to sift through a number of entries because sorting doesn't get me exactly what I want; I have a few different "views" (using the plugin) that help, but making the title stand out with a color enables quick and easy identification. It's just another tool for organization - and that's one of the greatest things about Calibre, how many alternate ways it gives us to organize in order to best suit our particular way of doing things and of mentally categorizing. They're not all useful to all of us (some things I still find baffling, like User Categories, that I know others use all the time), but every one is useful to some of us, allowing for an amazing level of customization... |
|
Advert | |
|
05-29-2011, 11:20 AM | #18 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
However, as soon as my wife noticed what I was doing, she asked that the ratings in our library be colored by who read the book. She wanted 4 colors: her, me, both, and neither. The coloring combines two fields into one visual queue, where the two fields are often off-screen. I had to pick colors I could see, but that wasn't hard. I am waiting to see what else she comes up with. |
|
05-29-2011, 12:27 PM | #19 |
Nameless Being
|
I have a column called reading if it is read I want the make the title to be green.
Cannot see who to do it. Any help would be great. |
05-29-2011, 12:33 PM | #20 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
Advert | |
|
05-29-2011, 12:35 PM | #21 |
Nameless Being
|
That was quick
Its a text but with a fixed set of permitted values Read,Reading,ToRead,ReadPaper |
05-29-2011, 12:59 PM | #22 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Assuming you want green only if the value is Read, try
Code:
{#reading:switch(^Read$,green,black)} |
05-29-2011, 02:05 PM | #23 | |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Quote:
Thanks, that makes good sense and a good reason to use the coloring. |
|
05-29-2011, 02:12 PM | #24 |
Nameless Being
|
Leo
Have just tried and it works Thanks very much |
05-29-2011, 03:46 PM | #25 | |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2011
Device: ipad
|
Quote:
Thanks again! Ken |
|
05-29-2011, 04:17 PM | #26 |
creator of calibre
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I tested it and it works for me, so I dont really have any more suggestions.
|
05-29-2011, 04:31 PM | #27 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
When you say it doesn't work, what happens? |
|
05-29-2011, 04:50 PM | #28 | |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2011
Device: ipad
|
Quote:
By not working, nothing is changing color. If I use the tag wizard and say change the tag News title to Green, it works fine, but this isn't working in any combination. I tried Green and Red to see if at least something would function, but all the title tags stayed black. Ken |
|
05-29-2011, 04:57 PM | #29 |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2011
Device: ipad
|
Ok.. I have no idea what I did different, except that I removed all the tag color options, restarted calibre and tried again... this time it worked perfectly! And, alas, highlights how much work I have left to do .
Thank you all for your help, and a great program!!! Ken |
05-29-2011, 09:42 PM | #30 |
ZCD BombShel
Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
|
Thank you, Kovid. There was a time when I would have sat and read this thread with the examples over and over until I figured it out. But I'm afraid that until I'm done with this thrice cursed degree, that both time and motivation for much of anything that isn't school related is at an all time low. Only a year and two months to go.... *sigh*.
|
Tags |
calibre, template |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can custom book data be displayed in a custom column? | kiwidude | Development | 9 | 03-02-2011 05:35 AM |
Custom charge? | daoshi | iRex | 3 | 10-06-2008 06:47 PM |