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 03-13-2024, 06:58 AM   #1
baursak
Member
baursak began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Mar 2024
Location: Saint Petersburg, Russia
Device: Kindle Paperwhite (2021) Signature Edition
about The calibre template language

the section 'Basic templates' of chapter 'The calibre template language' (the Tutorial) has lots of really usefil information - thank you

Now

- the following sample pattern has drawn my attention:

{series}{series_index:| - | - }{title}

- I've slightly modified it to the following (I've checked - it works fine)

{series}{series_index:|-|. }{title}

- but I also would like to use the following formatter within {series_index}

{series_index:0>2s}

- is that possible?
- what will be the exact expression?
baursak is offline   Reply With Quote
Old 03-13-2024, 07:25 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Code:
{series_index:0>5.2f|| - }{title}
I use 5.2f as I use fractional series indexes for a couple of purposes
1.05 indicates contains a boxed set (does fall apart at 10, 20. no trailing 0)

.5 is a prequel
theducks is offline   Reply With Quote
Advert
Old 03-13-2024, 10:12 AM   #3
baursak
Member
baursak began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Mar 2024
Location: Saint Petersburg, Russia
Device: Kindle Paperwhite (2021) Signature Edition
Quote:
Originally Posted by theducks View Post
Code:
{series_index:0>5.2f|| - }{title}
I use 5.2f as I use fractional series indexes for a couple of purposes
1.05 indicates contains a boxed set (does fall apart at 10, 20. no trailing 0)

.5 is a prequel
Thank you !!!

I've slightly customized your solution to what I am accustomed:

{series:||. }{series_index:0>2s|| - }{title}
Attached Thumbnails
Click image for larger version

Name:	ответ (1) Calibre forum 2024-03-13 170932.png
Views:	33
Size:	83.5 KB
ID:	206871  
baursak is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Template language changes chaley Library Management 132 03-03-2024 06:34 PM
Template Language Question jvorzimmer Library Management 5 11-20-2021 01:26 PM
Template Language phossler Calibre 8 01-12-2016 04:37 PM
Help with template language Pepin33 Calibre 8 11-11-2012 08:32 AM
Stupid question about calibre language template Cammagno Calibre 1 01-08-2011 08:00 AM


All times are GMT -4. The time now is 04:31 PM.


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