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 02-05-2023, 12:50 PM   #16
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,650
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Did you remember the semicologne semicolon at the end? That's my most common error.

EDIT: And obviously remove program. Another common mistake.

Last edited by ownedbycats; 02-05-2023 at 12:52 PM. Reason: What's a semicologne?
ownedbycats is online now   Reply With Quote
Old 02-06-2023, 02:16 PM   #17
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: 400
Karma: 1121267
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Yes I did, but it doesn't work

neither this

Spoiler:
Code:
program:
	def add_icon(icon, val):
		if icon == '' then icon = val else icon = icon & ':' & val fi;
		return icon
	fed;

	icon = '';
	if $languages == 'eng' then icon = add_icon(icon, 'uk.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 $$#redl == 'true' then icon = add_icon(icon, 'redl.png') fi;
	if $$#read == 'true' then icon = add_icon(icon, 'ok.png') fi;
	if $$#annots then 'annotations.png' fi;
	if $$#readinglist != '' then icon = add_icon(icon, 'reading_list.png') fi;
	return icon

nor that

Spoiler:
Code:
program:
	def add_icon(icon, val):
		if icon == '' then icon = val else icon = icon & ':' & val fi;
		return icon
	fed;

	icon = '';
	if $languages == 'eng' then icon = add_icon(icon, 'uk.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 $$#redl == 'true' then icon = add_icon(icon, 'redl.png') fi;
	if $$#read == 'true' then icon = add_icon(icon, 'ok.png') fi;
	if $$#annots then icon = add_icon(icon, 'annotations.png') fi;
	if $$#readinglist != '' then icon = add_icon(icon, 'reading_list.png') fi;
	return icon



Last edited by Wiggo; 02-06-2023 at 02:27 PM.
Wiggo is offline   Reply With Quote
Advert
Old 02-06-2023, 02:44 PM   #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 Wiggo View Post
Code:
program:
[...]
	if $$#annots then icon = add_icon(icon, 'annotations.png') fi;
[...]
Don't use raw_field() when testing for an empty string. With raw_field(), if the value isn't defined you get 'NONE' instead of ''.

Use either:
Code:
#normal field()
	if $#annots then icon = add_icon(icon, 'annotations.png') fi;
or
Code:
# raw_field()
	if $$#annots != 'NONE' then icon = add_icon(icon, 'annotations.png') fi;
chaley is offline   Reply With Quote
Old 02-06-2023, 03:10 PM   #19
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: 400
Karma: 1121267
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
It works!
Wiggo is offline   Reply With Quote
Old 04-15-2023, 09:53 AM   #20
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: 400
Karma: 1121267
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
I can't get it to work again.


I discovered this all the authors for a series and want to show an icon when there is more than one author in my #series_authors column.

Help please
Wiggo is offline   Reply With Quote
Advert
Old 04-15-2023, 11:29 AM   #21
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,817
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
{fieldname}:#>1

the # on the right side of the : means count

(that is in the manual (searching) online
theducks is online now   Reply With Quote
Old 04-15-2023, 11:48 AM   #22
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: 400
Karma: 1121267
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Does not work in program
Wiggo is offline   Reply With Quote
Old 04-15-2023, 12:05 PM   #23
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,817
Karma: 54830978
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 Wiggo View Post
Does not work in program
Have no clue what needs to be changed.
I only use it in saved searches.
theducks is online now   Reply With Quote
Old 04-15-2023, 12:36 PM   #24
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
Use an advanced rule, changed to use the icon you like, the right column (#series_authors), and the column where you want to put the icon.

The template is:
Code:
program:
	if list_count($#people, '&') > 1 then
		'cry-icon.png'
	fi
The dialog is:
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	81
Size:	98.3 KB
ID:	201057  
chaley is offline   Reply With Quote
Old 04-15-2023, 01:44 PM   #25
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: 400
Karma: 1121267
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
hmmm...

It neither works for a single symbol in #series (here strangely the series name for all series moves nevertheless a bit to the right)
Code:
program:
	if list_count($#series_authors, '&') > 1 then
		'series_authors.png'
	fi
nor in my #symbol column
Code:
program:
	def add_icon(icon, val):
		if icon == '' then icon = val else icon = icon & ':' & val fi;
		return icon
	fed;

	icon = '';
	if $languages == 'eng' then icon = add_icon(icon, 'uk.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($#series_authors, '&') > 1 then icon = add_icon(icon, 'series_authors.png') fi;
	return icon
Wiggo is offline   Reply With Quote
Old 04-15-2023, 01:49 PM   #26
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 Wiggo View Post
hmmm...

It neither works for a single symbol in #series (here strangely the series name for all series moves nevertheless a bit to the right)
Code:
program:
	if list_count($#series_authors, '&') > 1 then
		'series_authors.png'
	fi
It works for me.

Post a screen capture of the advanced rule. Also be sure that the icon "series_authors.png" has been added to the set of possible icons using the "Add icon" button. If you don't see that file in the dropdown list of possibilities then it cannot work. To be precise, the file "series_authors.png" must be located in the cc_icons folder in your calibre configuration folder. It should be 128x128. Larger might work. Smaller won't.
chaley is offline   Reply With Quote
Old 04-15-2023, 02:11 PM   #27
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: 400
Karma: 1121267
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
The icon works, because I was able to show it on my #symbols column for all series

The book shown in the setting is part of a multi-author series.
Attached Thumbnails
Click image for larger version

Name:	calibre_2tIWzDJE1Y.jpg
Views:	83
Size:	143.1 KB
ID:	201060  
Wiggo is offline   Reply With Quote
Old 04-15-2023, 02:29 PM   #28
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 Wiggo View Post
The icon works, because I was able to show it on my #symbols column for all series

The book shown in the setting is part of a multi-author series.
What kind of column is #series_authors? In particular, is it like this, including "contains names" being checked?
Click image for larger version

Name:	Clipboard01.jpg
Views:	71
Size:	42.1 KB
ID:	201063

If "Contains names" is not checked then the template must use ',' as a separator instead of '&'
chaley is offline   Reply With Quote
Old 04-15-2023, 02:44 PM   #29
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: 400
Karma: 1121267
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
',' for the world!


btw., it's a column from your post here https://www.mobileread.com/forums/sh...3&postcount=95
Attached Thumbnails
Click image for larger version

Name:	calibre_ji3pas7tku.jpg
Views:	80
Size:	53.4 KB
ID:	201064  
Wiggo is offline   Reply With Quote
Old 07-29-2023, 09:06 AM   #30
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: 400
Karma: 1121267
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Once again I can't get it right.

I bought the ePub for a old paperbook and now I want to have both symbols for #format and #quelle (=source) displayed in the column.
Instead, unfortunately, none is displayed at all.
Generally asked, how are multiple entries of a column displayed?

Code:
program:
		def add_icon(icon, val):
		if icon == '' then icon = val else icon = icon & ':' & val fi;
		return icon
	fed;

	icon = '';
	if $languages == 'eng' then icon = add_icon(icon, 'uk.png') fi;
	icon = add_icon(
		icon, 
		switch(
			$$#toread,
			'true', 'toread.png',
			'false', 'false.png',
			''));
# $$ ist raw_field()
	
	if $$#formats == 'paper' then icon = add_icon(icon, 'paper.png') fi;
	if $$#formats == 'epub' then icon = add_icon(icon, 'epub.png') fi;
	if $$#formats == 'pdf' then icon = add_icon(icon, 'pdf.png') fi;
	if $$#read == 'true' then icon = add_icon(icon, 'ok.png') fi;
	if $$#quelle == 'geniallokal' then icon = add_icon(icon, 'geniallokal.png') fi;
	if $$#quelle == 'wbg' then icon = add_icon(icon, 'wbg.png') fi;
	if $$#quelle == 'RKH' then icon = add_icon(icon, 'rkh.png') fi;
	if $$#readinglist != '' then icon = add_icon(icon, 'reading_list.png') fi;
	if $$#annots != 'NONE' then icon = add_icon(icon, 'annotations.png') fi;
	return icon
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 04:33 PM.


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