|
|
#1 |
|
Enthusiast
![]() 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.
|
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Enthusiast
![]() 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?
|
|
|
|
|
|
#4 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,453
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No not really, its a generated value.
|
|
|
|
![]() |
|
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 |