Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-30-2011, 12:51 AM   #31
unboggling
Wizard
unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.
 
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.
unboggling is offline   Reply With Quote
Old 05-30-2011, 04:45 PM   #32
onedot3
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
Attached Thumbnails
Click image for larger version

Name:	Untitled 2.jpg
Views:	262
Size:	42.7 KB
ID:	72104  

Last edited by onedot3; 05-30-2011 at 04:51 PM. Reason: Add attachemnt
  Reply With Quote
Advert
Old 05-30-2011, 05:19 PM   #33
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,713
Karma: 6690879
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by onedot3 View Post
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
Are you reporting a bug or making a comment? That aside, yes you can do this, and no you shouldn't be allowed to.

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.
chaley is offline   Reply With Quote
Old 05-31-2011, 02:38 PM   #34
mezme
Connoisseur
mezme began at the beginning.
 
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.
mezme is offline   Reply With Quote
Old 05-31-2011, 04:53 PM   #35
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,713
Karma: 6690879
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by mezme View Post
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.
Code:
program:
first_non_empty(
    test(field('formats'), '', 'red'),
    switch(field('rating'), '1', 'green', '2', 'red', '3', 'green', '4', 'black' ,'5', 'black', 'green')
)
chaley is offline   Reply With Quote
Advert
Old 05-31-2011, 05:03 PM   #36
mezme
Connoisseur
mezme began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Dec 2009
Device: PRS700
Absolutely perfect! That also let me add the coding for covers/comments... thank you!
mezme is offline   Reply With Quote
Old 06-03-2011, 03:54 PM   #37
nynaevelan
eBook Junkie
nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.
 
nynaevelan's Avatar
 
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
nynaevelan is offline   Reply With Quote
Old 06-03-2011, 04:40 PM   #38
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is online now   Reply With Quote
Old 06-03-2011, 05:04 PM   #39
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: 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.
theducks is offline   Reply With Quote
Old 06-03-2011, 05:08 PM   #40
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,796
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by theducks View Post
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.
Not sure what you mean, you mean the value <In Paper Library> is not shown in the list of rules?
kovidgoyal is online now   Reply With Quote
Old 06-03-2011, 05:21 PM   #41
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: 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
Quote:
Originally Posted by kovidgoyal View Post
Not sure what you mean, you mean the value <In Paper Library> is not shown in the list of rules?
Correct. the value is shown is blank
Attached Thumbnails
Click image for larger version

Name:	colorcolumn1.jpg
Views:	273
Size:	72.0 KB
ID:	72260  
theducks is offline   Reply With Quote
Old 06-03-2011, 05:23 PM   #42
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,713
Karma: 6690879
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The renderer must think it is an html tag.
chaley is offline   Reply With Quote
Old 06-03-2011, 05:25 PM   #43
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: 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
Quote:
Originally Posted by chaley View Post
The renderer must think it is an html tag.
I was thinking it might be something like that.
I think I chose that style of Tag so the "Catalog" would ignore it.
theducks is offline   Reply With Quote
Old 06-03-2011, 05:34 PM   #44
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,796
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah, HTML escaping will be added in the next release.
kovidgoyal is online now   Reply With Quote
Old 06-03-2011, 05:45 PM   #45
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is online now   Reply With Quote
Reply

Tags
calibre, template

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 09:02 AM.


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