|
|
#1 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2024
Device: Kobo
|
recover the size in bytes only of epub files
Good morning,
I use the formula below, but it shows me: EPUB:1182150,KEPUB:701399 but I only want to have the epub and the size in bytes like this: 1182150 The current formula is: {:'formats_sizes()'} Do you have a tip? It seems to be python, but I didn't succeed with things proposed by chatgpt (lol) like: {:'formats_sizes().get("EPUB")'} {#formats.contains('EPUB') ? formats_sizes('EPUB'): ''} THANKS |
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
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')'}
Code:
{:'human_readable(select(formats_sizes(), 'EPUB'))'}
Code:
{:'format_number(select(formats_sizes(), 'EPUB'), ',d')'}
|
|
|
|
|
|
#3 | |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2024
Device: Kobo
|
Quote:
Thank you, that work perfectly. |
|
|
|
|
![]() |
| Tags |
| column settings, formula, python function, regex-function |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Caliber 64Bit size limit on EPUB Files? | KEPutnam | Calibre | 4 | 02-21-2021 06:25 PM |
| Trimming .epub and .mobi files for size? | FlyHero | Reading and Management | 7 | 03-05-2018 08:03 PM |
| find and remove zero size .epub files? | hank | Library Management | 25 | 07-03-2015 12:13 PM |
| Reducing the size of epub files? | Corpsegoddess | ePub | 8 | 01-09-2013 09:14 PM |
| 'utf8' codec can't decode bytes error (HTML to EPUB conversion) | gsz | Calibre | 10 | 10-26-2009 07:29 PM |