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 07-29-2023, 09:10 AM   #31
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,807
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I'm not sure for all of then, but try using 'paper' in $$#formats if it's a list-type column.
ownedbycats is offline   Reply With Quote
Old 07-30-2023, 05:19 AM   #32
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 406
Karma: 1153449
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
I've managed it by splitting my symbols column into symbols - source - formats, and by help from you @obc - thank you so much.

It was your post here https://www.mobileread.com/forums/sh...62&post4316762
Wiggo is offline   Reply With Quote
Old 07-30-2023, 11:05 AM   #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,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Same questions as in post 26: do all of those icons exist in the cc_icons folder? Said another way, do you see those icons if you make a basic rule?

Is there another rule higher up the list for the same column? If so, it must be a "composed" icon rule so it doesn't take priority.

Edit: sorry, didn't see the other answers before I posted.

Last edited by chaley; 07-30-2023 at 11:08 AM.
chaley is offline   Reply With Quote
Old 07-30-2023, 11:20 AM   #34
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,807
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Minor note, but also note that the custom has_data() isn't needed anymore as has_extra_files() exists now.
ownedbycats is offline   Reply With Quote
Old 08-01-2023, 02:16 PM   #35
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 406
Karma: 1153449
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
thx obc, already implemented.

@chaley: I see an icon if I have only one format or source. But as soon as I have two entries, no icon for format/source appears at all anymore.
Wiggo is offline   Reply With Quote
Old 08-01-2023, 03:42 PM   #36
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,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Wiggo View Post
thx obc, already implemented.

@chaley: I see an icon if I have only one format or source. But as soon as I have two entries, no icon for format/source appears at all anymore.
It works for me. I did make a change to the add_icon() function to avoid empty icon names, but it works without that change.

Here is the booklist:
Click image for larger version

Name:	Clipboard01.jpg
Views:	55
Size:	35.4 KB
ID:	202928
The icons are on the author column.

Here is the cc_icons folder:
Click image for larger version

Name:	Clipboard02.jpg
Views:	47
Size:	47.7 KB
ID:	202929

Here is the icon rule screen:
Click image for larger version

Name:	Clipboard03.jpg
Views:	49
Size:	145.8 KB
ID:	202930

And here is the template, which is the same as yours except the one change mentioned above and changing the 'uk.png' icon name to 'beautify.png':
Code:
program:
	def add_icon(icon, val):
		if ! val then return icon fi;
		if icon == '' then icon = val else icon = icon & ':' & val fi;
		return icon
	fed;

	icon = '';
	if $languages == 'eng' then icon = add_icon(icon, 'beautify.png') fi;
	icon = add_icon(
		icon, 
		switch(
			$$#toread,
			'true', 'toread.png',
			'false', 'false.png',
			''));
	if $$#formats == 'paper' then icon = add_icon(icon, 'paper.png') fi;
	if $$#read == 'true' then icon = add_icon(icon, 'ok.png') fi;
	if $$#source == 'geniallokal' then icon = add_icon(icon, 'geniallokal.png') fi;
	if $$#source == 'wbg' then icon = add_icon(icon, 'wbg.png') fi;
	if $$#readinglist != '' then icon = add_icon(icon, 'reading_list.png') fi;
	if $$#annots != 'NONE' then icon = add_icon(icon, 'annotations.png') fi;
	if list_count($authors, '&') > 1 then icon = add_icon(icon, 'series_authors.png') fi;
	return icon
One possibility: you can't use == for multi-value columns. If #formats or #source is tags-like then you must use 'inlist'. as this:
Code:
if 'paper' inlist $#formats then icon = add_icon(icon, 'paper.png') fi;
chaley is offline   Reply With Quote
Old 08-02-2023, 01:27 PM   #37
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 406
Karma: 1153449
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Quote:
Originally Posted by chaley View Post

One possibility: you can't use == for multi-value columns. If #formats or #source is tags-like then you must use 'inlist'. as this:
Code:
if 'paper' inlist $#formats then icon = add_icon(icon, 'paper.png') fi;
Wiggo is offline   Reply With Quote
Old 11-17-2023, 12:26 PM   #38
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 406
Karma: 1153449
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
I've tried to add an icon to a column for has_notes similar to extra_files

Code:
if has_extra_files() then icon = add_icon(icon, 'extra_files.png') fi;
but this doen't work. Is it possible to show an icon for has_notes regardless the type of notes (author,tag, series...)?
Wiggo is offline   Reply With Quote
Old 11-17-2023, 02:51 PM   #39
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,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Wiggo View Post
I've tried to add an icon to a column for has_notes similar to extra_files

Code:
if has_extra_files() then icon = add_icon(icon, 'extra_files.png') fi;
but this doen't work. Is it possible to show an icon for has_notes regardless the type of notes (author,tag, series...)?
It is possible but will require a new function/template. Reason: notes are not attached to books, instead to metadata items. The new function must check every metadata item attached to a book to see if it has notes.

Are you sure you want to do this? Check for a note on any item in any column?

Edit: I won't be able to provide an example for a while.

Last edited by chaley; 11-17-2023 at 02:53 PM.
chaley is offline   Reply With Quote
Old 11-17-2023, 03:50 PM   #40
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,655
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@chaley - it would be a hint to look in Book Details to see which category items have Notes. Would I make use of it? Probably not.

Decorating a category cell that that has notes attached to the applied items with a colour or icon might be useful - more so for single item categories such as Publisher and Series than multi-item categories such as Tags. This is not a request that it be implemented.

BR
BetterRed is online now   Reply With Quote
Old 11-17-2023, 09:54 PM   #41
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,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Wiggo View Post
I've tried to add an icon to a column for has_notes similar to extra_files

Code:
if has_extra_files() then icon = add_icon(icon, 'extra_files.png') fi;
but this doen't work. Is it possible to show an icon for has_notes regardless the type of notes (author,tag, series...)?
This template returns the list of lookup names with items on the book that have notes. If none do, return the empty string. If you want to use it, make it a stored template and call it in the icon template.

I don't know if the performance will be acceptable, especially if lots of items in lots of columns have notes.
Code:
python:
def evaluate(book, context):
	db = context.db.new_api
	notes_on_book = db.items_with_notes_in_book(book.id)
	return '' if not notes_on_book else ', '.join(notes_on_book.keys())
chaley is offline   Reply With Quote
Old 11-17-2023, 10:01 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,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
Decorating a category cell that that has notes attached to the applied items with a colour or icon might be useful - more so for single item categories such as Publisher and Series than multi-item categories such as Tags. This is not a request that it be implemented.

BR
The above template can be used for this by checking if the lookup column in question is in the list. Something like this, where the above template is stored as notes_in_book.
Code:
program:
  keys = notes_in_book()
  if '^publisher$' inlist keys then icon='whatever.jpg' else icon='' fi;
  icon
Alternatively, and faster, would be to modify the python template to take an argument (a lookup name) and check if it is in the list.
chaley is offline   Reply With Quote
Old 11-18-2023, 05:22 AM   #43
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,655
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
The Ctrl+Shift+N keyboard shortcut will pop the Notes browser, if pressed it shows all the notes for all category items that have a note.

It would be nice to have radio buttons similar to those we now have in Manage Categories:- Show all category item notes and Only show notes for category items applied to the selected books.

I did try putting an icon on the Publisher column if it had a note, but for me it's clutter. I'd rather glance at the relevant item in BD, which I do already for Links, if the Notes icon is present I would press Ctrl+Shift+N to see the note.

BR

Last edited by BetterRed; 11-19-2023 at 02:16 AM.
BetterRed is online now   Reply With Quote
Old 11-18-2023, 12:33 PM   #44
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 406
Karma: 1153449
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Quote:
Originally Posted by chaley View Post
Are you sure you want to do this? Check for a note on any item in any column?
Now I've got scared.

As I'm about to replace some composite columns with saved searches to improve performance, I'd rather not want to do that.

Thx chaley
Wiggo is offline   Reply With Quote
Reply

Tags
column icons, customize, icons, preferences


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
added custom column icons render larger than original icons masp Library Management 12 01-22-2019 04:07 PM
customized column icons now Micro-icons Gary_M_Mugford Calibre 10 09-05-2016 04:05 AM
View list of custom column settings? BookJunkieLI Calibre 8 07-25-2014 09:36 AM
Multiple icons in a column? RenoA Library Management 2 09-09-2013 03:20 AM
REMOVE multiple files in Book view wizard2b Sigil 1 05-09-2011 09:14 PM


All times are GMT -4. The time now is 10:13 PM.


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