05-30-2011, 12:51 AM | #31 |
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
I love the color function. Thanks for adding it. So far I'm using it to highlight wishlist books, and formats that need fixing.
|
05-30-2011, 04:45 PM | #32 |
Nameless Being
|
Using column to color can I use Title more than once
Eg First if tag is MissingBook then Title red Second if Column is Read then title green Last edited by onedot3; 05-30-2011 at 04:51 PM. Reason: Add attachemnt |
Advert | |
|
05-30-2011, 05:19 PM | #33 | |
Grand Sorcerer
Posts: 11,713
Karma: 6690879
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
This dialog is changing quite radically. The new implementation will do something reasonable, either saying 'no' or using the first one that returns a value. |
|
05-31-2011, 02:38 PM | #34 |
Connoisseur
Posts: 58
Karma: 10
Join Date: Dec 2009
Device: PRS700
|
I'm feeling a bit "clueless" right now... I'm sure there is a simple solution but I can't seem to get the coding right.
I'm wanting to test using two fields format and rating. I know to test rating the correct code (or at least the code that works) is: {rating:switch(1,green,2,red,3,green,4,black,5,bla ck,green)} How can I add code that would test the format field? What I want it to do is: If format is false then be red else test rating. Suggestions? Last edited by mezme; 05-31-2011 at 04:23 PM. |
05-31-2011, 04:53 PM | #35 | |
Grand Sorcerer
Posts: 11,713
Karma: 6690879
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program: first_non_empty( test(field('formats'), '', 'red'), switch(field('rating'), '1', 'green', '2', 'red', '3', 'green', '4', 'black' ,'5', 'black', 'green') ) |
|
Advert | |
|
05-31-2011, 05:03 PM | #36 |
Connoisseur
Posts: 58
Karma: 10
Join Date: Dec 2009
Device: PRS700
|
Absolutely perfect! That also let me add the coding for covers/comments... thank you!
|
06-03-2011, 03:54 PM | #37 |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Hi All:
With the latest version I was able to create a colored column, but I guess my expectations must be different than what the actual coloring does. So can I explain what is happening and someone explain whether this is supposed to happen. I created a colored column to change one of my tags to blue if "Read Next" is a value in the field. Now the column heading of that field is the blue color, however if I segment my library using the tag browser or a saved search the heading of the column stays blue whether there are books in that sub-set with the value or not. My expectations are that the column for the book(s) which meet the criteria would turn blue not the heading of the column. Is my assumption correct or incorrect. What is supposed to happen? Here is my condition: <p>Set the color of <b>#sectag</b> to <b>aliceblue</b> if the following conditions are met:</p> <ul><li>If the <b>#sectag</b> column <b>has</b> value: <b>Read Next</b></ul> Nyn |
06-03-2011, 04:40 PM | #38 |
creator of calibre
Posts: 43,796
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
coloring changes the color of the text in the columns. The blue heading you are seeing is probably how windows highlights the currently sorted column.
EDIT: What kind of column is #sectag? Last edited by kovidgoyal; 06-03-2011 at 04:52 PM. |
06-03-2011, 05:04 PM | #39 |
Well trained by Cats
Posts: 29,703
Karma: 54369092
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The new interface is neat.
Question: is the (tag) Value: supposed to show the tagname I set? I have a Tag <In Paper Library> that sets the Title to Blue (it works), but nothing shows for Value in the existing 'color the columns' display. |
06-03-2011, 05:08 PM | #40 |
creator of calibre
Posts: 43,796
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Not sure what you mean, you mean the value <In Paper Library> is not shown in the list of rules?
|
06-03-2011, 05:21 PM | #41 |
Well trained by Cats
Posts: 29,703
Karma: 54369092
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Correct. the value is shown is blank
|
06-03-2011, 05:23 PM | #42 |
Grand Sorcerer
Posts: 11,713
Karma: 6690879
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The renderer must think it is an html tag.
|
06-03-2011, 05:25 PM | #43 |
Well trained by Cats
Posts: 29,703
Karma: 54369092
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
06-03-2011, 05:34 PM | #44 |
creator of calibre
Posts: 43,796
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Ah, HTML escaping will be added in the next release.
|
06-03-2011, 05:45 PM | #45 |
creator of calibre
Posts: 43,796
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@nyn: there was a bug when using "has" with a tags like column. I've uploaded a fixed build, so if you re-download and re-install and then re-create your rule which should then work as expected.
More generally, the fixed build also fixes a bug with "is set" and "is not set" rules and enables the use of composite columns in the rules. Apologies, there were too many combinations for me to test them all before the release. Last edited by kovidgoyal; 06-03-2011 at 05:55 PM. |
Tags |
calibre, template |
Thread Tools | Search this Thread |
|
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 |