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 05-29-2011, 09:17 AM   #16
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
{tags:'test($, "red", "black")'}
Actually, I think you want
Code:
{tags:'test($, "black", "red")'}
if you want the field to be red when there are no tags.

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'.
chaley is offline   Reply With Quote
Old 05-29-2011, 11:00 AM   #17
jesscat
Groupie
jesscat has a complete set of Star Wars action figures.jesscat has a complete set of Star Wars action figures.jesscat has a complete set of Star Wars action figures.jesscat has a complete set of Star Wars action figures.
 
Posts: 156
Karma: 354
Join Date: Mar 2009
Location: US
Device: iPad mini, iPad 2, Kindle 3
Quote:
Originally Posted by chaley View Post
You can use the ondevice function where you would use field('ondevice') if only ondevice were a real field. You can also use it in template function mode as {:'ondevice()'} (the field name is omitted).
Oh, that's perfect, I can't wait...

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...
jesscat is offline   Reply With Quote
Advert
Old 05-29-2011, 11:20 AM   #18
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by nynaevelan View Post
If you all do not mind me asking, what reasons would you want to use the coloring, what benefit are you expecting??
As I mentioned in a different thread, when I built this feature for calibre I never expected to use it myself. I am slightly color blind, so I avoid using color cues. I did it for the challenge.

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.
chaley is offline   Reply With Quote
Old 05-29-2011, 12:27 PM   #19
onedot3
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.
  Reply With Quote
Old 05-29-2011, 12:33 PM   #20
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by onedot3 View Post
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.
What kind of field is "reading"? What is in the field when a book is considered read?
chaley is offline   Reply With Quote
Advert
Old 05-29-2011, 12:35 PM   #21
onedot3
Nameless Being
 
That was quick
Its a text but with a fixed set of permitted values
Read,Reading,ToRead,ReadPaper
  Reply With Quote
Old 05-29-2011, 12:59 PM   #22
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,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)}
chaley is offline   Reply With Quote
Old 05-29-2011, 02:05 PM   #23
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
Quote:
Originally Posted by Loeffel View Post
@nynaevelan
I use the coloring for marking 2 types of books in my bibliothek.
  • I mark english books as I am german and most of the books are in german, I would like to know while scanning the whole bibliothek which book is in english. It is right, when you say, you can see it in the tag, but while searching/scanning I switch of the tag or it isn't in the visible range of screen.
  • New books "just" added are in a somehow raw form. They get marked by 2 tags, one for showing the entry is raw and the second one for marking that the cover isn't added by now. These entries I mark red and darkred, so I can easily see whats the matter.

Thanks, that makes good sense and a good reason to use the coloring.
nynaevelan is offline   Reply With Quote
Old 05-29-2011, 02:12 PM   #24
onedot3
Nameless Being
 
Leo
Have just tried and it works
Thanks very much
  Reply With Quote
Old 05-29-2011, 03:46 PM   #25
kenreiss
Junior Member
kenreiss began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2011
Device: ipad
Quote:
Originally Posted by kovidgoyal View Post
Put it into one of the white boxes and change the combobox next to it to read title. You cant use the Tag Wizard for this template.
Well, I had thought of that, and tried it, but it's not working... any ideas or is something weird with my system? This certainly isn't all that important, but it would be nice if I could get it to work.

Thanks again!

Ken
kenreiss is offline   Reply With Quote
Old 05-29-2011, 04:17 PM   #26
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,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.
kovidgoyal is offline   Reply With Quote
Old 05-29-2011, 04:31 PM   #27
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kenreiss View Post
Well, I had thought of that, and tried it, but it's not working... any ideas or is something weird with my system? This certainly isn't all that important, but it would be nice if I could get it to work.
Did you notice post #16?

When you say it doesn't work, what happens?
chaley is offline   Reply With Quote
Old 05-29-2011, 04:50 PM   #28
kenreiss
Junior Member
kenreiss began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2011
Device: ipad
Quote:
Originally Posted by chaley View Post
Did you notice post #16?

When you say it doesn't work, what happens?
I had not noticed post 16... you are correct about what I want to happen.

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
kenreiss is offline   Reply With Quote
Old 05-29-2011, 04:57 PM   #29
kenreiss
Junior Member
kenreiss began at the beginning.
 
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
kenreiss is offline   Reply With Quote
Old 05-29-2011, 09:42 PM   #30
phenomshel
ZCD BombShel
phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.
 
phenomshel's Avatar
 
Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
Quote:
Originally Posted by kovidgoyal View Post
phenomshel: The next calibre release should have two modes for specifying coloring a "Basic" mode and an advanced mode (you should find the basic mode usable).
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*.
phenomshel is offline   Reply With Quote
Reply

Tags
calibre, template


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 01:47 AM.


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