Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 06-13-2025, 09:23 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: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
I have "omnibus" in the admintags column.
Then this should work, again assuming that the fractional part is always 2 digits.
Code:
program:
	if '^omnibus$' inlist_field '#admintags' then
		series_start = floor($series_index);
		fraction = fractional_part($series_index);
		if fraction ==# 0 then
			result = series_start
		else
			series_end = floor(fraction*100);
			if series_end >=# 0 then
				result = series_start & '-' & series_end
			fi
		fi
	else
		result = $series_index
	fi;
	result
chaley is offline   Reply With Quote
Old 06-13-2025, 11:41 AM   #17
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: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I did some editing to remove 0s from both omnibuses and non-omnibuses. Worked as expected.

Code:
program:
	if '^omnibus$' inlist_field '#admintags' 	
		&& $series_index !=#0 
		then
		series_start = floor($series_index);
		fraction = fractional_part($series_index);
		if fraction ==# 0 then
			result = series_start
		else
			series_end = floor(fraction*100);
			if series_end >=# 0 then
				result = series_start & '-' & series_end
			fi
		fi
		elif 
			$series_index ==#0 
		then 
			result = ''
	else
		result = $series_index
	fi;
	result
Note the icons on the last column - signifies omnibus.

Click image for larger version

Name:	2025-06-13 12_44_14-calibre — __ My Books __ Series __ Series __.png
Views:	29
Size:	25.9 KB
ID:	216203

Click image for larger version

Name:	2025-06-13 12_40_06-Template tester dialog number 1 (multiple template dialogs allowed).png
Views:	24
Size:	11.0 KB
ID:	216202

I have just one book that uses 6.1 for 6-10 (Calibre removes the trailing 0.) Suggestions? I was thinking of splitting it as I have a few books from the series in physical format anyways.

Last edited by ownedbycats; 06-13-2025 at 11:49 AM.
ownedbycats is offline   Reply With Quote
Old 06-13-2025, 01:04 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: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
I have just one book that uses 6.1 for 6-10 (Calibre removes the trailing 0.) Suggestions? I was thinking of splitting it as I have a few books from the series in physical format anyways.
The template should produce "10" for "6.1". The fractional part (.1) is multipled by 100, producing "10".

Ahhh, I see. The fractional part of 6.1 can come out as ".099999999999" instead of ".1". To fix it, change line 10 to be
Code:
			series_end = round(fraction * 100);
chaley is offline   Reply With Quote
Old 06-16-2025, 03:03 PM   #19
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: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
btw, when expected to come out of source? (preview or release.) Building from source is slow, and when I use stable I occasionally forget to change back to preview before connecting.
ownedbycats is offline   Reply With Quote
Old 06-16-2025, 03:07 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: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
btw, when expected to come out of source? (preview or release.) Building from source is slow, and when I use stable I occasionally forget to change back to preview before connecting.
I submitted the changes to Kovid today. Whether he accepts them and if so, when they are released, is up to him.

Interesting what you say about running from source. I see almost no difference.
chaley is offline   Reply With Quote
Old 06-16-2025, 04:10 PM   #21
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: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
It's mostly opening viewer and editor. Takes sometimes 30 seconds or a minute.
ownedbycats is offline   Reply With Quote
Old 06-16-2025, 04:13 PM   #22
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,629
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by ownedbycats View Post
btw, when expected to come out of source? (preview or release.) Building from source is slow, and when I use stable I occasionally forget to change back to preview before connecting.
You can do a different thing. If you know which are the files which have changed, compile them and replace the original ones in a standard installation. And yes, it works.
Terisa de morgan is offline   Reply With Quote
Old 06-16-2025, 10:20 PM   #23
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: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I have been travelling for my annual vacation so there will be some time before there is a release of any kind.
kovidgoyal is offline   Reply With Quote
Old 06-17-2025, 07:17 AM   #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: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The changes are now in calibre source and will be in the next release/preview.
chaley is offline   Reply With Quote
Old 06-17-2025, 08:23 AM   #25
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kovidgoyal View Post
I have been travelling for my annual vacation so there will be some time before there is a release of any kind.
Enjoy your vacation. You deserve it.
JSWolf is offline   Reply With Quote
Old 06-17-2025, 08:37 AM   #26
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: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JSWolf View Post
Enjoy your vacation. You deserve it.
ownedbycats is offline   Reply With Quote
Old 06-17-2025, 09:47 AM   #27
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: 31,056
Karma: 60358908
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 JSWolf View Post
Enjoy your vacation. You deserve it.
theducks is online now   Reply With Quote
Old 06-20-2025, 11:13 AM   #28
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I think this update broke the KoboTouch driver. I have no problem in 8.4.0 but do in 8.5.0. Now I'm getting told that my template for deciding if an ePub should be KePub or not is invalid. The template is working as I've send an ePub and KePub no problem. I'm thinking the error is due to the change for series numbering.

This is what I get when I make any changes to the options or just click OK.

Code:
calibre, version 8.5.0
ERROR: Invalid template for Use Kobo viewer for EPUB books: <p>The template "program:
	check_yes_no("#kepub", 0, 0, 1)" is invalid:<br>Interpreter: Internal error evaluating an expression: ''str' object has no attribute 'get'' - line number 2
Click image for larger version

Name:	KoboTouch.jpg
Views:	20
Size:	142.0 KB
ID:	216371

Last edited by JSWolf; 06-20-2025 at 11:22 AM.
JSWolf is offline   Reply With Quote
Old 06-20-2025, 11:38 AM   #29
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
I think this update broke the KoboTouch driver. I have no problem in 8.4.0 but do in 8.5.0. Now I'm getting told that my template for deciding if an ePub should be KePub or not is invalid. The template is working as I've send an ePub and KePub no problem. I'm thinking the error is due to the change for series numbering.

This is what I get when I make any changes to the options or just click OK.

Code:
calibre, version 8.5.0
ERROR: Invalid template for Use Kobo viewer for EPUB books: <p>The template "program:
	check_yes_no("#kepub", 0, 0, 1)" is invalid:<br>Interpreter: Internal error evaluating an expression: ''str' object has no attribute 'get'' - line number 2
Attachment 216371
This problem has nothing to do with the series template. It was introduced on 10 May (by me) when the driver was changed to validate all templates instead of some of them.

I'm looking at how to fix it now.
chaley is offline   Reply With Quote
Old 06-20-2025, 12:18 PM   #30
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Turns out that the changes in May are (mostly) correct. It is illegal to use check_yes_no() outside the GUI, for example in the kobo device driver. It worked by accident.

Replace the template with
Code:
program: $#kepub == 'yes'
EDIT: by "mostly" I mean that it detects a real error but gives the wrong message.

Last edited by chaley; 06-20-2025 at 12:23 PM.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sage Add series / series index to Kobo baursak Kobo Reader 31 06-02-2024 09:37 PM
Searching on the highest series_index od series rolgiati Library Management 2 04-24-2023 02:24 PM
[Kobo] Series and series_index issue codychan Devices 11 04-06-2021 09:15 PM
Series Index displayed as separate column from Series Vortex Library Management 3 03-15-2015 08:39 PM
Need text box to float left beside image eggheadbooks1 ePub 35 06-06-2013 07:18 AM


All times are GMT -4. The time now is 06:14 PM.


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