07-18-2022, 11:18 PM | #1 |
Guru
Posts: 705
Karma: 2153490
Join Date: Aug 2021
Location: Stupid Philippines
Device: Kobo Libra 2, Boyue Likebook P78
|
Question on Subtitle display on Kobo
I am using subtitle on Kobotouch plugin and using
this config in the subtitle: Code:
program: int_words = raw_field('#words'); # return wordcount in terms of million, e.g. 1m, 1.2m etc if int_words ># 995000 then int_words2 = divide(int_words,1000000); str_words = strcat(format_number(int_words2, '{0: 2.1f}'), ''); if '0' in str_words then sf_words = format_number(int_words2, '{0: 2.0f}') else sf_words = format_number(int_words2, '{0: 2.1f}') fi; word_count = strcat(sf_words, 'm') # wordcount in terms of thousands, e.g. 120k, 230k etc elif int_words ># 10000 then int_words2 = divide(int_words,10000); sf_words = format_number(int_words2, '{0: 2.0f}'); word_count = strcat(sf_words, '0k') elif int_words ># 1 then int_words2 = divide(int_words,1000); sf_words = format_number(int_words2, '{0: 2.0f}'); word_count = strcat(sf_words, 'k') fi; subtitle = strcat(field('#pages'), ' |', word_count, ' words') |
07-19-2022, 12:14 AM | #2 |
Grand Sorcerer
Posts: 24,906
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
You add it in exactly the same way as the word "words" was added.
The last line of the template is concatenating strings together into a longer one. Changing this to the following should work: Code:
subtitle = strcat(field('#pages'), ' pages', ' |', word_count, ' words') |
Advert | |
|
07-19-2022, 12:19 AM | #3 | |
Guru
Posts: 705
Karma: 2153490
Join Date: Aug 2021
Location: Stupid Philippines
Device: Kobo Libra 2, Boyue Likebook P78
|
Quote:
Since we are on the topic of subtitle? is there a way to use the estimated reading hours that kobo added to the two recent fw updates to show instead of the number of words/ word count? |
|
07-19-2022, 12:31 AM | #4 | |
Grand Sorcerer
Posts: 24,906
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
07-19-2022, 11:19 AM | #5 |
Guru
Posts: 705
Karma: 2153490
Join Date: Aug 2021
Location: Stupid Philippines
Device: Kobo Libra 2, Boyue Likebook P78
|
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Kobo Libra] How to fill subtitle automatically? | Mister L | Library Management | 4 | 04-15-2022 06:26 AM |
Sorting books in Kobo by series AND subtitle | MashaT | Library Management | 1 | 01-06-2022 04:14 PM |
How to add subtitle field in KOBO | MashaT | Library Management | 15 | 01-04-2022 12:51 PM |
From Kobo to Kindle: sleep & display question | z000ao8q | Kindle Developer's Corner | 1 | 02-13-2015 10:30 AM |
Question on display | desertgrandma | Feedback | 1 | 07-05-2008 05:06 PM |