Running the new copy I get the following error:
Code:
Traceback (most recent call last):
File "/home/user/calibre-5.7.2/src/calibre/utils/formatter.py", line 884, in safe_format
ans = self.evaluate(fmt, [], kwargs, global_vars)
File "/home/user/calibre-5.7.2/src/calibre/utils/formatter.py", line 845, in evaluate
ans = self._eval_program(kwargs.get('$', None), fmt[8:],
File "/home/user/calibre-5.7.2/src/calibre/utils/formatter.py", line 753, in _eval_program
tree = self.gpm_parser.program(self, self.funcs, self.lex_scanner.scan(prog))
File "/home/user/calibre-5.7.2/src/calibre/utils/formatter.py", line 325, in program
tree = self.expression_list()
File "/home/user/calibre-5.7.2/src/calibre/utils/formatter.py", line 333, in expression_list
expr_list.append(self.infix_expr())
File "/home/user/calibre-5.7.2/src/calibre/utils/formatter.py", line 377, in infix_expr
left = self.expr()
File "/home/user/calibre-5.7.2/src/calibre/utils/formatter.py", line 418, in expr
self.error(_('Unknown function {0}').format(id_))
File "/home/user/calibre-5.7.2/src/calibre/utils/formatter.py", line 168, in error
raise ValueError(m)
ValueError: Formatter: Unknown function globals near 'globals'
debug: template_output: (TEMPLATE_ERROR: Formatter: Unknown function globals near 'globals')
Edit: I am perfectly fine with using the first version myself, if the second one is for one reason or another problematic or not optimal, I think we should stick with the first one. I originally misunderstood how this should work, that is why I was not initially able to get to work.