![]() |
#376 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,033
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
What would be the best way to turn this into templates for the KoboTouch read estimates?
Code:
HoursMax = round(WordCount / 200 / 60) HoursMin = HoursMax - 1 if (HoursMax >= 10) { HoursMax += round((HoursMax + .5) / 10) - 1) } ![]() Code:
program: round(divide(divide($#wordcount, 200), 60)) |
![]() |
![]() |
![]() |
#377 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program: HoursMax = round($$#wordcount / 200 / 60); HoursMin = HoursMax - 1; if (HoursMax >= 10) then HoursMax = HoursMax + round((HoursMax + .5) / 10) - 1 fi Code:
HoursMax = round($$#wordcount / 12000); |
|
![]() |
![]() |
![]() |
#378 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,033
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thanks
![]() |
![]() |
![]() |
![]() |
#379 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,033
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I have a template to update $#kobostatus (enumerated column):
Code:
program: category = first_non_empty( if $#fanficcat then '[Fanfiction]' elif 'Loans' inlist $#vls then '[Loans]' elif '\[Kobo Store\]' in $#kobostatus then '[Kobo Store]' else '[Sideloaded]' fi ); Last edited by ownedbycats; 04-26-2022 at 05:04 PM. |
![]() |
![]() |
![]() |
#380 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#381 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,033
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
$#kobostatus is enumerated. I use the template to semi-automatically generate/update it during certain action chains.
"Better" I'm not sure of -- I'm not sure if referencing the column that you're updating is best practice. |
![]() |
![]() |
![]() |
#382 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
elif '[Kobo Store]' == $#kobostatus then '[Kobo Store]' I suggest you go with the code you understand. |
|
![]() |
![]() |
![]() |
#383 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,033
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thanks
![]() |
![]() |
![]() |
![]() |
#384 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 896
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
Hello people, help me with a regular expression that counts the letters of a title
|
![]() |
![]() |
![]() |
#385 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#386 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 896
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
|
![]() |
![]() |
![]() |
#387 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
In what context? Searching? A custom column? A plugin? Something else?
EDIT: For example, if you are talking about a template then something like this should work. Code:
program: strlen($title) Last edited by chaley; 05-03-2022 at 05:08 PM. |
![]() |
![]() |
![]() |
#388 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 896
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
|
![]() |
![]() |
![]() |
#389 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,093
Karma: 91592869
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Probably being overly pedantic here, but that gives the number of characters, not the number of letters. Of course that may be what was actually desired.
|
![]() |
![]() |
![]() |
#390 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I thought of that but the solution using the template language is nontrivial and perhaps not possible. It can be done in a custom python template function but that is more than I care to do.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Library Management: various questions not worth their own thread | ownedbycats | Library Management | 225 | 08-04-2025 06:31 PM |
[Metadata Source Plugin] Questions regarding parse select, docs and ref templates | Boilerplate4U | Development | 13 | 07-07-2020 02:35 AM |
Questions on Kobo [Interfered with another thread topic] | spdavies | Kobo Reader | 8 | 10-12-2014 11:37 AM |
[OLD Thread] Some questions before buying the fire. | darthreader13 | Kindle Fire | 7 | 05-10-2013 09:19 PM |
Thread management questions | meme | Feedback | 6 | 01-31-2011 05:07 PM |