View Single Post
Old 07-13-2022, 07:38 AM   #89
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
"Secret" template processing tweaks

There are two hidden (plugin) tweaks that affect the template processor:
  • The plugin tweak enable_template_debug_printing controls whether the sources of user-defined python template functions is printed to the log.

    In the plugin tweaks section, set
    Code:
    enable_template_debug_printing=True
    The default is False.
  • For those who always run calibre in debug mode (calibre-debug -g), I added a tweak to stop printing exception tracebacks. This removes the many (!) lines you see when typing in the template tester, telling you that the program isn't valid. You will still see the exception reason as the output of the formatter. If the exception occurred while evaluating a composite column you will see a single log line naming the column.

    In the plugin tweaks section, set
    Code:
    show_stack_traces_in_formatter = False
    The default is True
chaley is offline   Reply With Quote