Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-26-2022, 04:54 AM   #1
Fynjisx
Connoisseur
Fynjisx began at the beginning.
 
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
Fynjisx is offline   Reply With Quote
Old 12-26-2022, 11:05 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Click image for larger version

Name:	Screenshot 2022-12-27 030135.jpg
Views:	160
Size:	52.7 KB
ID:	198602

Shows virtual libraries in which a book appears.

BR
BetterRed is offline   Reply With Quote
Advert
Old 12-26-2022, 11:27 AM   #3
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
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, ',')
This additionally sorts the entries—the above example will become Biographies, Music, Nonfiction.

Code:
program: 

split_tags = re($tags, '\.', ',');
list_sort(list_join(',', split_tags, ','), 0, ',')

Last edited by ownedbycats; 12-26-2022 at 12:00 PM.
ownedbycats is offline   Reply With Quote
Old 12-26-2022, 12:25 PM   #4
Lys
Groupie
Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 727278
Join Date: Dec 2022
Location: Not in an English speaking country
Device: (Too many) Kobo(s)
Quote:
Originally Posted by ownedbycats View Post
This template will display hierarchical tags as separate items and remove any duplicate items.
To remove duplicates, I'm using this code (#genre is my custom hierarchical column):

Code:
list_remove_duplicates(re($#genre, '\.', ','), ',')
But I'm not sure if there's any setback in using list_remove_duplicates function instead of yours


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', '')'}
Lys is offline   Reply With Quote
Old 12-26-2022, 01:00 PM   #5
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
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
ownedbycats is offline   Reply With Quote
Advert
Old 12-26-2022, 09:22 PM   #6
Fynjisx
Connoisseur
Fynjisx began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
Quote:
Originally Posted by Lys View Post
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', '')'}
can you elaborate on how it works?
Fynjisx is offline   Reply With Quote
Old 12-26-2022, 09:23 PM   #7
Fynjisx
Connoisseur
Fynjisx began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
Quote:
Originally Posted by BetterRed View Post
Attachment 198602
Shows virtual libraries in which a book appears.
BR
what else?
Fynjisx is offline   Reply With Quote
Old 12-26-2022, 10:58 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Fynjisx View Post
what else?
what else would you expect

BR
BetterRed is offline   Reply With Quote
Old 12-27-2022, 03:38 AM   #9
Lys
Groupie
Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 727278
Join Date: Dec 2022
Location: Not in an English speaking country
Device: (Too many) Kobo(s)
Quote:
Originally Posted by Fynjisx View Post
can you elaborate on how it works?
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,
If the percent read is minor to 100, compare again its value to 0 and if it's minor to 0 set the column value as "DNF", if it's equal to 0 leave it blank, if it's greater to 0 set it as "Reading".

Code:
cmp($, 0, 'DNF', '', 'Reading')
if the first comparison to 100 returns "equal", set the value of the composite column as "Finished". If it's greater than 100 leave it blank.
Lys is offline   Reply With Quote
Old 12-27-2022, 04:28 AM   #10
Fynjisx
Connoisseur
Fynjisx began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
Quote:
Originally Posted by BetterRed View Post
what else would you expect

BR
Ah only sake of virtual libraries that-whether?
Fynjisx is offline   Reply With Quote
Old 12-27-2022, 04:33 AM   #11
Fynjisx
Connoisseur
Fynjisx began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
Quote:
Originally Posted by Lys View Post
#percent_read is the column where I store the %
where do you get the percentage? Do you enter by hand?
Fynjisx is offline   Reply With Quote
Old 12-27-2022, 04:54 AM   #12
Lys
Groupie
Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.Lys ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 727278
Join Date: Dec 2022
Location: Not in an English speaking country
Device: (Too many) Kobo(s)
Quote:
Originally Posted by Fynjisx View Post
where do you get the percentage? Do you enter by hand?
As I wrote in my first post:

Quote:
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
If you have a Kobo, refer to the late davidfor's thread in the plugins forum.

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).
Lys is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 07:08 PM.


MobileRead.com is a privately owned, operated and funded community.