Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-23-2026, 01:40 PM   #1
ARR8
Enthusiast
ARR8 began at the beginning.
 
Posts: 30
Karma: 20
Join Date: Aug 2025
Device: PocketBook Verse Pro
Changing serialization type for composite column?

I am trying to replace my old precalculated #pages column with the new automatically-calculated pages column. My main use for this is writing to OPF to populate progress bars in my reader software (Project Title for KOReader). However, the composite column seems to JSONify the values as a string, with surrounding quotes, even if the template is just a straightforward {pages} (and the source column is, of course, an integer column). Is there a template function or other option I can set to serialize this as an integer? Thanks.
ARR8 is offline   Reply With Quote
Old 08-23-2026, 07:01 PM   #2
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: 46,453
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
All composite column values in calibre are strings, the entire template machinery works with strings.
kovidgoyal is offline   Reply With Quote
Advert
Old 08-23-2026, 07:33 PM   #3
ARR8
Enthusiast
ARR8 began at the beginning.
 
Posts: 30
Karma: 20
Join Date: Aug 2025
Device: PocketBook Verse Pro
I see. Any plans for an option to write the new pages column to OPF?
ARR8 is offline   Reply With Quote
Old 08-24-2026, 09:21 AM   #4
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: 46,453
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No not really, its a generated value.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature?/Help request: Sorting composite column by a different column's value isarl Library Management 15 04-26-2023 05:58 AM
changing column type igorius Development 5 04-02-2023 07:27 PM
Composite Column BetterRed Calibre 12 09-01-2013 04:58 AM
Composite column problem combining two tag type columns At_Libitum Recipes 1 08-29-2013 12:31 PM
Changing column type for reading queue paulfiera Calibre 7 05-31-2011 01:10 PM


All times are GMT -4. The time now is 08:22 PM.


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