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-04-2022, 09:18 AM   #331
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Those both work.

Also, would I be imagining things, or can splitting up a stored template (before, icons_cleanup was all one big template) be a bit more efficient? I split it mostly for ease of editing.
ownedbycats is offline   Reply With Quote
Old 02-04-2022, 09:25 AM   #332
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: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Also, would I be imagining things, or can splitting up a stored template (before, icons_cleanup was all one big template) be a bit more efficient? I split it mostly for ease of editing.
There is almost no performance gain or loss from splitting stored templates. Do it for the reason you gave, ease of editing and understanding what they do.
chaley is offline   Reply With Quote
Advert
Old 02-05-2022, 11:45 AM   #333
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thanks.

Is it intended that a single-column colour rule always overrides an all-column rule, regardless of position in the rules list? I think I opened a ticket about this a few days ago but I can't find it now.
ownedbycats is offline   Reply With Quote
Old 02-05-2022, 12:49 PM   #334
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: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Is it intended that a single-column colour rule always overrides an all-column rule, regardless of position in the rules list? I think I opened a ticket about this a few days ago but I can't find it now.
I hadn't answered the ticket.

The behavior is intended. "Single column" rules are applied first, possibly coloring a column. Next "all column" rules color any remaining uncolored columns. For any given column a "single column" rule always overrides the "all column" rules.
chaley is offline   Reply With Quote
Old 02-06-2022, 08:35 AM   #335
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
That makes sense. I just modified my single-column rule then. Now it shows the same colour for the whole row.

Last edited by ownedbycats; 02-06-2022 at 08:41 AM.
ownedbycats is offline   Reply With Quote
Advert
Old 02-06-2022, 09:10 PM   #336
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
On the topic of that single-column rule:

Code:
program:

	if readstatus()=='currentlyreading' then
		read = $$#lastread;
		updated = $$#fanficupdated;

		if fanfic_unreadchaps()==#1 && $$#percentread==#99 then '#00aaff' 
		elif fanfic_unreadchaps()==#1 && days_between (read, updated) <#0 then '#00d400'
		elif fanfic_unreadchaps()>=#1 && days_between (read, updated) <#0 then '#ffff7f' 
		fi
	
	else colours_daysbetween($#lastread, '#00aaff', '#69cfff', '#9bdeff')
	
	fi
If the colours_daybetween on line 12 is outside the inner fi (line 10), it doesn't colour currentlyreadings that don't match the other rules. But if I put it inside the fi it only colours currentlyreadings. Do I need to duplicate that line?

Last edited by ownedbycats; 02-06-2022 at 09:21 PM.
ownedbycats is offline   Reply With Quote
Old 02-07-2022, 05:17 AM   #337
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: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
On the topic of that single-column rule:

Code:
program:

	if readstatus()=='currentlyreading' then
		read = $$#lastread;
		updated = $$#fanficupdated;

		if fanfic_unreadchaps()==#1 && $$#percentread==#99 then '#00aaff' 
		elif fanfic_unreadchaps()==#1 && days_between (read, updated) <#0 then '#00d400'
		elif fanfic_unreadchaps()>=#1 && days_between (read, updated) <#0 then '#ffff7f' 
		fi
	
	else colours_daysbetween($#lastread, '#00aaff', '#69cfff', '#9bdeff')
	
	fi
If the colours_daybetween on line 12 is outside the inner fi (line 10), it doesn't colour currentlyreadings that don't match the other rules. But if I put it inside the fi it only colours currentlyreadings. Do I need to duplicate that line?
It isn't clear to me what you want to do. If you want the color in the else clause to be used if no other color is selected then this would do it.
Code:
program:

	colour = if readstatus()=='currentlyreading' then
		read = $$#lastread;
		updated = $$#fanficupdated;

		if fanfic_unreadchaps()==#1 && $$#percentread==#99 then '#00aaff' 
		elif fanfic_unreadchaps()==#1 && days_between (read, updated) <#0 then '#00d400'
		elif fanfic_unreadchaps()>=#1 && days_between (read, updated) <#0 then '#ffff7f' 
		fi
	fi;
	if !colour then colour = colours_daysbetween($#lastread, '#00aaff', '#69cfff', '#9bdeff')
	fi;
	colour
chaley is offline   Reply With Quote
Old 02-07-2022, 08:01 AM   #338
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Yes, that works. Thank you.

As for what I'm doing -- the rule's for Last Read column.
books 2 - 10 all match the checks.

The others are using colours_daysbetween().

Before, either book 1 (currentlyreading) or books 11-17 (not currentlyreading) would be uncoloured, depending on where I had colours_daysbetween()

Click image for larger version

Name:	2022-02-07 08_42_46-Window.png
Views:	608
Size:	22.9 KB
ID:	192186

Last edited by ownedbycats; 02-07-2022 at 09:47 AM.
ownedbycats is offline   Reply With Quote
Old 02-10-2022, 08:02 AM   #339
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Mostly out of curiosity:

Click image for larger version

Name:	2022-02-10 09_01_11-Window.png
Views:	601
Size:	56.3 KB
ID:	192245

The 'Title' placeholder is presumably because I didn't have any books selected when I opened the dialog. In this case, it shows the firstmost available result, but sometimes I've seen it show the last one instead, or sometimes an empty one. What is it based on?

Last edited by ownedbycats; 02-10-2022 at 08:05 AM.
ownedbycats is offline   Reply With Quote
Old 02-10-2022, 08:38 AM   #340
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: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
The 'Title' placeholder is presumably because I didn't have any books selected when I opened the dialog. In this case, it shows the firstmost available result, but sometimes I've seen it show the last one instead, or sometimes an empty one. What is it based on?
It shows the first book selected. If you select from row 5 then row 4 it will show row 5.

That said, there is no reason not to show all the books selected. I will change that. I will also make the dialog remember whether "help" is showing or not.
chaley is offline   Reply With Quote
Old 02-10-2022, 09:55 AM   #341
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: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by chaley View Post
That said, there is no reason not to show all the books selected. I will change that. I will also make the dialog remember whether "help" is showing or not.
Changes are now in source.
chaley is offline   Reply With Quote
Old 02-10-2022, 10:16 AM   #342
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thanks. That'll make it easier to make quick changes without copying to the template tester to make sure it works as intended.
ownedbycats is offline   Reply With Quote
Old 02-13-2022, 11:38 AM   #343
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question: What does
Duplicate user function name icons_fanfic. Change the name or ensure that the functions are identical
mean?

It showed up in another templateafter modifying the icons_fanfic() to add some new items, but went away when I restarted Calibre.

EDIT: It hasn't recurred since, so I think it might've been a one-time glitch.

Last edited by ownedbycats; 02-14-2022 at 07:11 PM.
ownedbycats is offline   Reply With Quote
Old 02-15-2022, 11:16 AM   #344
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: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Question: What does
Duplicate user function name icons_fanfic. Change the name or ensure that the functions are identical
mean?

It showed up in another template after modifying the icons_fanfic() to add some new items, but went away when I restarted Calibre.

EDIT: It hasn't recurred since, so I think it might've been a one-time glitch.
For completeness, the message means that you created a user-defined template function (in python) with a name that matches an existing function but with different code. The problem is detected when the function is registered -- made available to the template language. The change could happen any time before that. I don't know how to make the error happen.
chaley is offline   Reply With Quote
Old 02-15-2022, 12:47 PM   #345
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Could it have been possible there were, via some glitch, two versions of the stored template temporarily in memory? I checked and saw there was only one icons_fanfic(), but restarting Calibre fixed the error.
ownedbycats is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Library Management: various questions not worth their own thread ownedbycats Library Management 225 08-04-2025 06:31 PM
[Metadata Source Plugin] Questions regarding parse select, docs and ref templates Boilerplate4U Development 13 07-07-2020 02:35 AM
Questions on Kobo [Interfered with another thread topic] spdavies Kobo Reader 8 10-12-2014 11:37 AM
[OLD Thread] Some questions before buying the fire. darthreader13 Kindle Fire 7 05-10-2013 09:19 PM
Thread management questions meme Feedback 6 01-31-2011 05:07 PM


All times are GMT -4. The time now is 06:56 AM.


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