Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-11-2025, 03:50 PM   #871
retro
Addict
retro doesn't litterretro doesn't litterretro doesn't litter
 
Posts: 202
Karma: 245
Join Date: Aug 2009
Location: USA
Device: Kobo Libra 2
Quote:
Originally Posted by un_pogaz View Post

also forgot to close parenthis, here:
Code:
{#star:finish_formatting(,, | )}{#pages:finish_formatting(,Pages: , | )}{tags:| | }
YES!!! It works just like it should! Thank you sooooo much!
retro is offline   Reply With Quote
Old 01-17-2026, 11:04 PM   #872
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,578
Karma: 81412473
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
When I view composite column with this template in list view, the first entry preceded by a comma. (Doesn't appear in book details or template tester.) Any idea why?

Code:
program:	

subjects = $#subjects;
admintags = $#admintags;

	new_colls = strcat(	
		if $#booktype=='Fanfiction' then 'Fanfiction, ' fi,
		if '^Mystery|Cozy Mystery$' inlist subjects then 'Mysteries, ' fi,
		if '(Juvenile|Young Adult)' inlist subjects then 'Juvenile & Young Adults, ' fi,
		if '^(Fantasy|Paranormal|Science Fiction)$' inlist subjects && !'Star Trek' inlist subjects then 'Fantasy & Sci-Fi, ' fi,
		if '^Star Trek$' inlist subjects then 'Star Trek, ' fi,
		if 'Omnibus' in admintags then 'Omnibuses, ' fi,
	);
ownedbycats is offline   Reply With Quote
Old 01-18-2026, 07:36 PM   #873
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,578
Karma: 81412473
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by ownedbycats View Post
When I view composite column with this template in list view, the first entry preceded by a comma. (Doesn't appear in book details or template tester.) Any idea why?

Code:
program:	

subjects = $#subjects;
admintags = $#admintags;

	new_colls = strcat(	
		if $#booktype=='Fanfiction' then 'Fanfiction, ' fi,
		if '^Mystery|Cozy Mystery$' inlist subjects then 'Mysteries, ' fi,
		if '(Juvenile|Young Adult)' inlist subjects then 'Juvenile & Young Adults, ' fi,
		if '^(Fantasy|Paranormal|Science Fiction)$' inlist subjects && !'Star Trek' inlist subjects then 'Fantasy & Sci-Fi, ' fi,
		if '^Star Trek$' inlist subjects then 'Star Trek, ' fi,
		if 'Omnibus' in admintags then 'Omnibuses, ' fi,
	);
Same template in KoboTouch driver collection management also messes up the colllections, "Fantasy & Sci-Fi,Omnibuses"
ownedbycats is offline   Reply With Quote
Old 01-18-2026, 07:49 PM   #874
dunhill
Wizard
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 1,017
Karma: 1084520
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
Let's see try this:


Code:
program:
subjects = $#subjects;
admintags = $#admintags;

new_colls = list_join(', ',
    if $#booktype=='Fanfiction' then 'Fanfiction' fi,
    if '^Mystery|Cozy Mystery$' inlist subjects then 'Mysteries' fi,
    if '(Juvenile|Young Adult)' inlist subjects then 'Juvenile & Young Adults' fi,
    if '^(Fantasy|Paranormal|Science Fiction)$' inlist subjects && !'Star Trek' inlist subjects then 'Fantasy & Sci-Fi' fi,
    if '^Star Trek$' inlist subjects then 'Star Trek' fi,
    if 'Omnibus' in admintags then 'Omnibuses' fi
);
dunhill is offline   Reply With Quote
Old 01-18-2026, 08:15 PM   #875
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,578
Karma: 81412473
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I had to add a ',' to the end of each line but it worked! thank you
ownedbycats is offline   Reply With Quote
Old 02-09-2026, 03:55 PM   #876
Subtext
Junior Member
Subtext began at the beginning.
 
Subtext's Avatar
 
Posts: 8
Karma: 10
Join Date: Nov 2014
Device: Onyx boox Nova 2, Kindle Paperwhite 2, Kindle Voyage
I have a Cover generator template question, I hope it's okay to ask here.

I have a custom column called #chapters, it shows up as #/#. I have books that are multiple books merged into one and those have multiple #chapter entries (so it shows as #/#, #/# etc.). I would like to have a line to show the chapters number but only if there is only one entry there, and blank if there is more than one. Is that possible? I tried to find out but I haven't managed to make heads or tails of it.

Thank you in advance either way!
Subtext is offline   Reply With Quote
Old 02-09-2026, 05:24 PM   #877
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,543
Karma: 62543878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Assumes these are tag type (comma separated, not just text with commas
Code:
#chapters:#=1
theducks is offline   Reply With Quote
Old 02-10-2026, 03:29 PM   #878
Subtext
Junior Member
Subtext began at the beginning.
 
Subtext's Avatar
 
Posts: 8
Karma: 10
Join Date: Nov 2014
Device: Onyx boox Nova 2, Kindle Paperwhite 2, Kindle Voyage
Quote:
Originally Posted by theducks View Post
Assumes these are tag type (comma separated, not just text with commas
Code:
#chapters:#=1
Thank you for taking a look at this.
Yes, they are tag type but when I try {#chapters:#=1} I get the message "Template error '=' alignment not allowed in string format specifier.

Any idea?

Last edited by Subtext; 02-10-2026 at 03:29 PM. Reason: typo
Subtext is offline   Reply With Quote
Old 02-10-2026, 04:04 PM   #879
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,543
Karma: 62543878
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 Subtext View Post
Thank you for taking a look at this.
Yes, they are tag type but when I try {#chapters:#=1} I get the message "Template error '=' alignment not allowed in string format specifier.

Any idea?
No { } when searching
theducks is offline   Reply With Quote
Old 02-10-2026, 06:56 PM   #880
Subtext
Junior Member
Subtext began at the beginning.
 
Subtext's Avatar
 
Posts: 8
Karma: 10
Join Date: Nov 2014
Device: Onyx boox Nova 2, Kindle Paperwhite 2, Kindle Voyage
Quote:
Originally Posted by theducks View Post
No { } when searching
Thank you for helping!!
That was not quite what I meant but I did explain it kinda badly, sorry.
Ended up having a discord buddy write the code for me for what I wanted to do in the cover generator, so it worked out in the end!
Subtext is offline   Reply With Quote
Old 02-19-2026, 02:38 PM   #881
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,578
Karma: 81412473
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Is a way to get round() to always round up or down??
ownedbycats is offline   Reply With Quote
Old 02-19-2026, 03:02 PM   #882
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 50,573
Karma: 178402706
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
You may want to look at the math.ceil and math.floor functions.
DNSB is offline   Reply With Quote
Old 02-19-2026, 03:07 PM   #883
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,578
Karma: 81412473
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thank you
ownedbycats is offline   Reply With Quote
Old 02-24-2026, 01:28 PM   #884
Katja_hbg
Addict
Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.
 
Posts: 200
Karma: 197760
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
Is there any change to first_matching_cmp?
I used this since ...long time without any issue.

But Kobo Utilities do not accept it anymore with "could not convert string to float".
Reading the reference it should never work - but it did and still work perfect in the GUI in a column.

Or is this a Kobo Utilities issue?
I am also open for help in template language to get the same result.

{#author_book_count:'first_matching_cmp(1,$,'books ','book')'}

Last edited by Katja_hbg; 02-24-2026 at 01:38 PM.
Katja_hbg is offline   Reply With Quote
Old 02-24-2026, 01:49 PM   #885
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,578
Karma: 81412473
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Template changes here: https://www.mobileread.com/forums/sh...d.php?t=337573

I'd ask in the Kobo Utilities thread as well: https://www.mobileread.com/forums/sh...d.php?t=366110
ownedbycats is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


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


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