See
http://manual.calibre-ebook.com/template_lang.html
Try this:
Code:
{:'in_list(approximate_formats(), ',' , 'MOBI', 'Y', '')'}
Quote:
approximate_formats() – return a comma-separated list of formats that at one point were associated with the book. There is no guarantee that the list is correct, although it probably is. This function can be called in template program mode using the template {:'approximate_formats()'}. Note that format names are always uppercase, as in EPUB.
|
Quote:
in_list(separator, pattern, found_val, not_found_val) – interpret the field as a list of items separated by separator, comparing the pattern against each value in the list. If the pattern matches a value, return found_val, otherwise return not_found_val.
|
Also see the documentation for
Using functions in templates - template program mode