Quote:
Originally Posted by dunhill
The formats_sizes function converts from mb to kb?
Or how would the syntax be for a custom column.
|
The formats_sizes function returns a list of all the formats with the size in bytes. If you want the size in some other scale then you must compute it yourself.
For example, this template returns the size of the EPUB format in KB, or the empty string if there isn't an EPUB format.
Code:
program:
if epub_size = select(formats_sizes(), 'EPUB') then
format_number(floor(divide(epub_size, 1024)), '{:,d} KB')
fi
You can also use the human_readable() function that chooses a reasonable scale factor.
Code:
program:
human_readable(select(formats_sizes(), 'EPUB'))