![]() |
#16 | ||
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
Quote:
Quote:
![]() What I meant is this: when our template code is parsed and it evolves into a not-situation (no non-ASCII code, or no title present), then the remainder of the template code on the same code line is not further processed, and immediately the next line is processed. So when the IF statement is FALSE, any ELSE statement (when present) is executed. I noticed this behavior when I made a mistake in the IF part and it was not noticed until I had a title which did happened to have a non-ASCII character and only then triggered the formatter on the error. Last edited by DrChiper; 03-17-2025 at 12:10 PM. |
||
![]() |
![]() |
![]() |
#17 | |||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,592
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
Quote:
![]() Quote:
|
|||
![]() |
![]() |
![]() |
#18 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,327
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
'1' || print('foo') Code:
'1' && print('foo') Quote:
Code:
program: # These two lines depend on evaluation being left to right so the # variable is set before use. title_neq = (t = $title) != transliterate(t); authors_neq = (a = $authors) != transliterate(a); # This code works because given two booleans the "truth table" has four entries. # The order of evaluation is important. As it is we can avoid extra tests because # if the first test isn't true then one or both of title_neq and authors_neq # must be false. That is why the second and third line don't need to check the # other variable. The switch_if function does shortcutting. switch_if( title_neq && authors_neq, 'true1, true2', title_neq, 'true1', authors_neq, 'true2', 'false') Code:
program: title_neq = (t = $title) != transliterate(t); authors_neq = (a = $authors) != transliterate(a); switch_if( # True if both are false !(title_neq || authors_neq), 'false', # True if both are true title_neq && authors_neq, 'true1, true2', # Here, one but not both of title_neq and authors_neq is true. title_neq, 'true1', # title_neq was false so authors_neq must be true. 'true2') |
||
![]() |
![]() |
![]() |
#19 |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
|
![]() |
![]() |
![]() |
#20 | ||
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
Right. I knew its behavior, but can't remember whether I have heard this name before.
Quote:
Quote:
![]() Well the Template Catalog Plugin seems interesting (I had indeed asked myself how to control all those templates defined at various places) but this might help a lot. Perhaps now a description about the do's and don't's of template creation, anybody? |
||
![]() |
![]() |
![]() |
#21 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,592
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
|
![]() |
![]() |
![]() |
#22 | |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 7463599
Join Date: Sep 2020
Device: none
|
Quote:
I have also adjusted some custom icons that were not properly referenced, hope you folks like it. |
|
![]() |
![]() |
![]() |
#23 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,613
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Plugin removed, they seem to be back. Added: Manage Categories is a core calibre feature, IMO we don't need another one BR Last edited by BetterRed; 03-18-2025 at 05:00 AM. Reason: Added: |
|
![]() |
![]() |
![]() |
#24 | |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 7463599
Join Date: Sep 2020
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#25 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,592
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Is still necessary to uninstall the previous version or we can just add it now?
|
![]() |
![]() |
![]() |
#26 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 7463599
Join Date: Sep 2020
Device: none
|
On a quick test I made by installing the previous version, then installing the latest one, I saw the shortcut I had set manually for this new version take effect. So I think you may safely install over previous version without uninstalling it.
|
![]() |
![]() |
![]() |
#27 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 7463599
Join Date: Sep 2020
Device: none
|
Version 1.5 - fixes an issue where description info wouldn't refresh
Last edited by Comfy.n; 03-18-2025 at 11:18 PM. |
![]() |
![]() |
![]() |
#28 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 7463599
Join Date: Sep 2020
Device: none
|
Uploaded version 2.0!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB | lrpirlet | Plugins | 2 | 08-18-2022 03:15 PM |
[GUI Plugin] Manga plugin | mastertea | Plugins | 6 | 01-06-2022 02:43 AM |
[GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |