View Single Post
Old 09-19-2024, 07:38 AM   #3
oles
Junior Member
oles began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2024
Device: Kobo
Quote:
Originally Posted by chaley View Post
The template language documentation is at https://manual.calibre-ebook.com/template_lang.html. It isn't remotely python.

This Template Program Mode template does what I think you want.
Code:
{:'select(formats_sizes(), 'EPUB')'}
You might prefer this one that gives the size in kb or mb:
Code:
{:'human_readable(select(formats_sizes(), 'EPUB'))'}
Or perhaps this one that adds commas to the size:
Code:
{:'format_number(select(formats_sizes(), 'EPUB'), ',d')'}

Thank you, that work perfectly.
oles is offline   Reply With Quote