View Single Post
Old 06-24-2021, 10:14 PM   #5
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,110
Karma: 77213681
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I think I'm supposed to use a template() here. Though I syntaxed something wrong because it's dividing the numbers (e.g. in the screenshot, it should be '21/22'). Oops.

Code:
program:
	if 
			$#fanficcat 
		&& 
			$#currentlyreading 
		&& 
			$#kobobookmark
	then
		
		template(format_number(re_group($#kobobookmark, '.*\/file(\d+).*'),'{0:,d}')/$$#chaptercount)

	fi
Also, I noticed the current template gave an error if the #kobobookmark value is OEBPS/Cover.xhtml#kobo.1.1. Is there a way to change the $#kobobookmark test to account for that?
Attached Thumbnails
Click image for larger version

Name:	2021-06-25 00_59_04-calibre — __ My Books __ Fanfiction __.png
Views:	114
Size:	1.4 KB
ID:	187862  

Last edited by ownedbycats; 06-25-2021 at 12:34 AM.
ownedbycats is offline   Reply With Quote