![]() |
#1 |
Connoisseur
![]() Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
|
explain one of the column types
in the list of allowed column types is "a column composed of others and acting as tags". In what cases can it be applied? Example please
|
![]() |
![]() |
![]() |
#2 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
This template will display hierarchical tags as separate items and remove any duplicate items. Nonfiction.Biographies, Nonfiction.Music will become Nonfiction, Biographies, Music.
Code:
program: split_tags = re($tags, '\.', ','); list_join(',', split_tags, ',') Code:
program: split_tags = re($tags, '\.', ','); list_sort(list_join(',', split_tags, ','), 0, ',') Last edited by ownedbycats; 12-26-2022 at 12:00 PM. |
![]() |
![]() |
![]() |
#4 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 727278
Join Date: Dec 2022
Location: Not in an English speaking country
Device: (Too many) Kobo(s)
|
Quote:
Code:
list_remove_duplicates(re($#genre, '\.', ','), ',') ![]() Back to OP question, I'm also using a composite column to set the reading status (Reading, DNF, Finished) from the reading % returned from KoboUtilities plugin: Code:
{#percent_read:'cmp($, 100, cmp($, 0, 'DNF', '', 'Reading'), 'Finished', '')'} |
|
![]() |
![]() |
![]() |
#5 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Oops, I forgot about list_remove_duplicates
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
|
can you elaborate on how it works?
|
![]() |
![]() |
![]() |
#7 | |
Connoisseur
![]() Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
![]() |
#9 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 727278
Join Date: Dec 2022
Location: Not in an English speaking country
Device: (Too many) Kobo(s)
|
With the usual caveat that I'm in no way a template language expert and I got the basis of that template thanks to other members here on MR:
#percent_read is the column where I store the % and it's referred inside the formula as $ cmp(x, y, lt, eq, gt) is a the function that compares x to y (after converting them to number) and returns lt value if x<y, eq value if x=y, and gt value if x>y My formula basically means: compare the percent read column value ($) to 100. Code:
#percent_read:'cmp($, 100, Code:
cmp($, 0, 'DNF', '', 'Reading') |
![]() |
![]() |
![]() |
#10 |
Connoisseur
![]() Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
|
|
![]() |
![]() |
![]() |
#11 |
Connoisseur
![]() Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
|
|
![]() |
![]() |
![]() |
#12 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 727278
Join Date: Dec 2022
Location: Not in an English speaking country
Device: (Too many) Kobo(s)
|
As I wrote in my first post:
Quote:
If you don't have a Kobo, either enter the % manually or check if there are similar plugins for other devices (I've no idea if they exist). |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why are all text columns shown in tag browser? (And changing column types?) | ownedbycats | Library Management | 0 | 12-29-2020 09:16 PM |
A Question About Column Types | TheArtfulDodger | Calibre | 2 | 09-19-2018 05:27 PM |
Can someone explain... | Rellwood | Calibre | 2 | 02-10-2017 09:22 AM |
Can someone please explain... | Calenorn | General Discussions | 10 | 08-19-2013 11:37 AM |
Using "Build column from other column" custom-column type | HFC3 | Library Management | 3 | 07-07-2013 03:11 AM |