![]() |
#766 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,561
Karma: 74000001
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
For numerical columns, is there a better way to equal 0 while excluding nulls?
Code:
elif (percent >=#1 && percent <=#99||$$#lastread !='None' && percent ==#0 && percent !='None') then 'currentlyreading' Last edited by ownedbycats; 12-25-2024 at 04:55 PM. |
![]() |
![]() |
![]() |
#767 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,309
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
raw_field('#something', -1) |
|
![]() |
![]() |
![]() |
#768 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,561
Karma: 74000001
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Yup, that did it. I did have to change my 'undefined' check to make sure it worked:
Code:
program: percent = raw_field('#percentread', -1); if 'dnf' inlist_field '#admintags' then 'didnotfinish' elif (percent >=#1 && percent <=#99||$$#lastread != 'None' && percent ==#0) then 'currentlyreading' elif $#readinglist=='To Be Read' && percent ==#0 then 'toberead' elif readgoal() inlist $#admintags && percent ==#0 then 'backlog' elif percent >=#100 then 'read' elif percent >=#0 then 'unread' elif $$#percentread == 'None' then 'undefined' fi |
![]() |
![]() |
![]() |
#769 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,309
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Code:
elif $$#percentread == 'None' then 'undefined' Code:
elif percent ==# -1 then 'undefined' |
![]() |
![]() |
![]() |
#770 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,561
Karma: 74000001
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
That did it.
I also just realized I could change line 14 to also use inlist_field and it still works. |
![]() |
![]() |
![]() |
#771 |
Connoisseur
![]() Posts: 62
Karma: 10
Join Date: Nov 2023
Device: Kindle Oasis
|
![]() ![]() ![]() Hi, is it possible to change icons individually in a template that is displayed in the tag browser? like in format |
![]() |
![]() |
![]() |
#772 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,561
Karma: 74000001
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Not by default. Job Spy can do it. GUI tool Tag browser icons.
|
![]() |
![]() |
![]() |
#773 |
Connoisseur
![]() Posts: 62
Karma: 10
Join Date: Nov 2023
Device: Kindle Oasis
|
|
![]() |
![]() |
![]() |
#774 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,590
Karma: 29709834
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Format icon overrides can be placed in <calibre config>\resources\images\mimetypes.
Try to find 128x128 pngs. BR |
![]() |
![]() |
![]() |
#775 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,579
Karma: 7463599
Join Date: Sep 2020
Device: none
|
PHP Code:
I'm using the above composite to display human readable format sizes and this looks fine on Book Details but I wanted to prevent the trailing pipe showing when there's only one format available, so instead of... 💾 EPUB: 1.2 MB | the ideal output would be: 💾 EPUB: 1.2 MB Ideas? Last edited by Comfy.n; 01-22-2025 at 11:43 AM. |
![]() |
![]() |
![]() |
#776 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,309
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
if substr(out, -2, 0) == '| ' then out = substr(out, 0, -3) fi; Code:
program: out = ' 💾 '; fmts = list_sort(formats_sizes(), 0, ',') ; for fmt_data in fmts: fmt = sublist(fmt_data, 0, 1, ':'); size = sublist(fmt_data, 1, 2, ':'); str = if size ># 0 then strcat(fmt, ': ', human_readable(size), ' | ') else '' fi; out=strcat(out, str) rof; if substr(out, -2, 0) == '| ' then out = substr(out, 0, -3) fi; out Last edited by chaley; 01-22-2025 at 01:06 PM. |
|
![]() |
![]() |
![]() |
#777 | |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,579
Karma: 7463599
Join Date: Sep 2020
Device: none
|
Quote:
![]() Much better indeed: ![]() |
|
![]() |
![]() |
![]() |
#778 | |
Connoisseur
![]() Posts: 62
Karma: 10
Join Date: Nov 2023
Device: Kindle Oasis
|
Quote:
|
|
![]() |
![]() |
![]() |
#779 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,579
Karma: 7463599
Join Date: Sep 2020
Device: none
|
If I recall correctly, I had to create this composite column Identifiers2... {identifiers}
..then it's just a column icon rule set at Preferences -> Look&feel: |
![]() |
![]() |
![]() |
#780 | |
Connoisseur
![]() Posts: 62
Karma: 10
Join Date: Nov 2023
Device: Kindle Oasis
|
Quote:
![]() ![]() another question, is it posible to do the same in Book Details? |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Library Management: various questions not worth their own thread | ownedbycats | Library Management | 197 | 03-22-2025 10:29 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 |