Quote:
Originally Posted by chaley
It is possible but it would be very slow requiring fetching all annotations from the database. I am not going to add it until/if/when that changes.
|
Quote:
Originally Posted by ownedbycats
Understandable. I might make an enhancement request for some option to mark all the books with annotations.
|
After discussions with Kovid I will add a new database method to calibre that returns the number of annotations of all kinds and on all formats attached to the book. This method runs without needing to read the database tables so it is as fast as we can make it, one hopes fast enough.
I also added a template function annotation_count() that returns the count if it is > 0 else the empty string. This will work with template functions like "isempty()", "test()", "first_non_empty", etc. It will also work with numeric relationals such as "if annotation_count() ># 0 then 'foo' else 'bar' fi"