Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-29-2023, 02:50 PM   #961
strolego
Junior Member
strolego began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2023
Device: kindle PW signature edition
Hi
I'd like transfer my book on my new kindle with the following structure
Library/Author/Title
but I'm not able to obtain "Library" automatically
I'm trying to create a column with the name of the library, maybe using the function current_library_name(), but I always obtain an empty field.
Any suggestion
Thank you in advance
strolego is offline   Reply With Quote
Old 10-29-2023, 03:30 PM   #962
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,416
Karma: 6083323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by strolego View Post
Hi
I'd like transfer my book on my new kindle with the following structure
Library/Author/Title
but I'm not able to obtain "Library" automatically
I'm trying to create a column with the name of the library, maybe using the function current_library_name(), but I always obtain an empty field.
Any suggestion
Thank you in advance
What templates have you tried?
chaley is offline   Reply With Quote
Old 10-29-2023, 07:01 PM   #963
strolego
Junior Member
strolego began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2023
Device: kindle PW signature edition
Quote:
Originally Posted by chaley View Post
What templates have you tried?
I've tried
New Column -> Biblioteca (i.e. Library in italian)
Default Value -> {program:current_library_name()}

I've also tried with {program:'current_library_name()'}
but without success
strolego is offline   Reply With Quote
Old 10-29-2023, 07:17 PM   #964
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,416
Karma: 6083323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by strolego View Post
I've tried
New Column -> Biblioteca (i.e. Library in italian)
Default Value -> {program:current_library_name()}

I've also tried with {program:'current_library_name()'}
but without success
I see two problems:
  1. Default values can't be templates. Templates are used only in "Columns built from other columns" and not as default values.
  2. General Program Mode templates don't use {} characters. Use
    Code:
    program:current_library_name()
    Alternatively use Template Program Mode (TPM). Something like this:
    Code:
    {:'current_library_name()'}
    If you wish you could use this TPM template in the save template:
    Code:
    {:'current_library_name()'}/{authors}/{title}
chaley is offline   Reply With Quote
Old 10-29-2023, 07:33 PM   #965
strolego
Junior Member
strolego began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2023
Device: kindle PW signature edition
Quote:
Originally Posted by chaley View Post
I see two problems:
  1. Default values can't be templates. Templates are used only in "Columns built from other columns" and not as default values.
  2. General Program Mode templates don't use {} characters. Use
    Code:
    program:current_library_name()
    Alternatively use Template Program Mode (TPM). Something like this:
    Code:
    {:'current_library_name()'}
    If you wish you could use this TPM template in the save template:
    Code:
    {:'current_library_name()'}/{authors}/{title}
Thank you! It works perfectly
strolego is offline   Reply With Quote
Old 11-05-2023, 03:52 PM   #966
dunhill
Guru
dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.
 
dunhill's Avatar
 
Posts: 662
Karma: 197668
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by chaley View Post
Assuming you are running calibre 6.12 or later:
Code:
{#kobo_percent_read:'switch_if($ >= 100, 'finished', $ <= 0, 'unread', 'reading')'}
And what would it be like if I used the status column and in the percentage column I put 100 if the status said Read?

Example:
I have my status column to rate the status of the book (read, to be read, reading)
And since I do not synchronize the reader process, I would like if the status of the book is Read, in the process column it would put 100
dunhill is offline   Reply With Quote
Old 11-05-2023, 06:13 PM   #967
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,416
Karma: 6083323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dunhill View Post
And what would it be like if I used the status column and in the percentage column I put 100 if the status said Read?

Example:
I have my status column to rate the status of the book (read, to be read, reading)
And since I do not synchronize the reader process, I would like if the status of the book is Read, in the process column it would put 100
I don't understand. What is the process column type? What is the status column type? Where does the result of the template go? What are the exact computation rules?
chaley is offline   Reply With Quote
Old 11-05-2023, 10:07 PM   #968
dunhill
Guru
dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.
 
dunhill's Avatar
 
Posts: 662
Karma: 197668
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by chaley View Post
I don't understand. What is the process column type? What is the status column type? Where does the result of the template go? What are the exact computation rules?
My status column is linked to goodreads and is updated with the goodreads sync plugin
What I am looking for is that if in that custom column that I have called #goodreadstags it says "Read" in another column where the reading process should appear, it tells me 100
The template should be in the custom column that depends on the result of #goodreadstags

I have tried
{#goodreadstags:'switch_if($ = 'Read', '100')'}
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	24
Size:	56.8 KB
ID:	204591  
dunhill is offline   Reply With Quote
Old 11-06-2023, 12:31 PM   #969
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,416
Karma: 6083323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dunhill View Post
I have tried
{#goodreadstags:'switch_if($ = 'Read', '100')'}
Try this:
Code:
{#goodreadstags:'switch_if($ == 'Read', '100', '')'}
The comparison operator is ==, not =. The switch_if function requires a default that is used if there isn't a match. I added the empty string.
chaley is offline   Reply With Quote
Old 11-11-2023, 12:47 PM   #970
dunhill
Guru
dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.
 
dunhill's Avatar
 
Posts: 662
Karma: 197668
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by chaley View Post
Try this:
Code:
{#goodreadstags:'switch_if($ == 'Read', '100', '')'}
The comparison operator is ==, not =. The switch_if function requires a default that is used if there isn't a match. I added the empty string.
That worked, thanks Chaley!
dunhill is offline   Reply With Quote
Reply

Tags
custom column, tag, tags

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom column i need a little help shinken Calibre 3 09-15-2010 04:41 AM
Using Custom Metadata in Save Template EJvdH Calibre 1 07-02-2010 07:06 AM
Accessories Decalgirl Kindle 2 custom skin template srmalloy Amazon Kindle 6 04-09-2010 10:55 PM
Donations for Custom Recipes ddavtian Calibre 5 01-23-2010 05:54 PM
Help understanding custom recipes andersent Calibre 0 12-17-2009 03:37 PM


All times are GMT -4. The time now is 11:15 PM.


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