27 Apr 2023 (in calibre 6.18)
Changed template functions.
- has_extra_files()
Code:
has_extra_files([pattern])
returns the count of extra files, otherwise '' (the empty string). If the optional parameter 'pattern', a regular expression, is supplied then the list is filtered to files that match pattern before the files are counted. The pattern match is case insensitive. This function can be used only in the GUI.
What changed: the 'pattern' parameter was added and the function returns a count instead of 'Yes'.
- extra_file_names()
Code:
extra_file_names(sep [, pattern])
returns a sep-separated list of extra files in the book's '{}/' folder. If the optional parameter 'pattern', a regular expression, is supplied then the list is filtered to files that match pattern. The pattern match is case insensitive. This function can be used only in the GUI.
What changed: the 'pattern' parameter was added.