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 12-29-2020, 06:23 PM   #1
Clem2605
Member
Clem2605 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2020
Device: Kobo H2O
A few questions... (template language, mainly)

Hello!


I have a few questions about Calibre interface and I thought that it would be better to ask everything at the same time...


So first, I've already looked for it in the parameters, and I'm pretty sure that it doesn't exist, but is it possible to disable the author_sort for one of my libraries? I have one library for my originals books, for which the author sort is very useful, but I have another one where I put all my fanfictions.
It's weird to see pseudos like "magical blue cat" at "cat" and not "magical". I currently undo everything by copy/pasting in the "manage authors" browser, and it's time-consuming...


Otherwise, speaking about having two libraries, I was asking myself: Are they totally separated? And if not, where's the limit, especially in the parameters? I mean, every time I change something I'm telling myself: "Is it only for this one? Or am I deleting something the other one?"


I also wanted to know, is there somewhere where I search and learn for myself the template language? I know it's a lot of python, but the template functions themselves? I tried to search by myself and I always end up on very specifics pages, and not somewhere general.


And my two main problems right now:
I'm using the plugging 'count page' to count the words in my books, and I wanted to know if it was possible to change the format of the numbers to something clearer. For example to display "1000000" like that: "1'000'000" or like that: "1 000 000", currently, my template looks like that:
Code:
{0:,.0f}
Which display: "1,000,000"
Since I'm french, it's really weird, we usually use the commas to separate the decimals.

I also have 3 columns displaying some kind of date, and none of them display it the same way: The timestamp column, the pubdate column, and a custom column "#update".
I tried to change them in the tweaks under: Control how dates are displayed and it worked, but I don't know how to change for the custom column.
Mine looks like that right now:
Code:
gui_pubdate_display_format = 'dd MM yyyy'
gui_timestamp_display_format = 'dd MM yyyy'
gui_last_modified_display_format = 'dd MM yyyy'
I think I'm gonna create a custom column for the date last read, it would be nice to know how to make it more useful.


Thanks in advance for any help!!
Clem2605 is offline   Reply With Quote
Old 12-29-2020, 07:09 PM   #2
BetterRed
null operator
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: 18,008
Karma: 20473839
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Clem2605 View Post
So first, I've already looked for it in the parameters, and I'm pretty sure that it doesn't exist, but is it possible to disable the author_sort for one of my libraries? I have one library for my originals books, for which the author sort is very useful, but I have another one where I put all my fanfictions.
The JobSpy plugin Configuration settings includes a number of Per Library overrides for what are normally Global Preferences such as author sorting.

BR
BetterRed is offline   Reply With Quote
Advert
Old 12-30-2020, 03:25 AM   #3
chaley
Grumpy old git
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.
 
chaley's Avatar
 
Posts: 10,389
Karma: 3933793
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Clem2605 View Post
Hello!
I also wanted to know, is there somewhere where I search and learn for myself the template language? I know it's a lot of python, but the template functions themselves? I tried to search by myself and I always end up on very specifics pages, and not somewhere general.
https://manual.calibre-ebook.com/template_lang.html
Quote:
And my two main problems right now:
I'm using the plugging 'count page' to count the words in my books, and I wanted to know if it was possible to change the format of the numbers to something clearer. For example to display "1000000" like that: "1'000'000" or like that: "1 000 000", currently, my template looks like that:
Code:
{0:,.0f}
Which display: "1,000,000"
Since I'm french, it's really weird, we usually use the commas to separate the decimals.
Use the format specifier 'n' to get a locale-dependent display. For more information see https://docs.python.org/3/library/st...-mini-language. This page might be easier to read.

Alternatively, if you can't get the 'n' specifier to give you what you want then use the template function 're' to change the characters.
Quote:
I think I'm gonna create a custom column for the date last read, it would be nice to know how to make it more useful.
Enter whatever date format you want when you create the column.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Template Language phossler Calibre 8 01-12-2016 04:37 PM
Template language uses title_sort instead of title eMole Calibre 2 03-11-2014 07:22 AM
Help needed with template language Mamaijee Devices 12 02-19-2013 01:52 AM
Help with template language Pepin33 Calibre 8 11-11-2012 08:32 AM
Template language question BookJunkieLI Library Management 7 02-02-2012 06:55 PM


All times are GMT -4. The time now is 12:19 PM.


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