Size was added as a template field, then removed because it badly broke device metadata caching. As a result, there is currently no way to get at size in a template.
I have submitted changes to add a new formatter function to get the value of 'size'. Assuming acceptance, in the next release you will be able to use one of the following:
Code:
program:booksize()
{:'booksize()'}
If you want kbytes, use
Code:
program:divide(booksize(), 1000)
{:'divide(booksize(), 1000)'}