From 03e9e929838630a79256faa70f8ce1cb5b881a05 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Mon, 1 Aug 2011 09:31:52 +0100 Subject: [PATCH] Documentation for new functions. --- src/calibre/manual/template_lang.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/manual/template_lang.rst b/src/calibre/manual/template_lang.rst index 10c2c751f5..b452525848 100644 --- a/src/calibre/manual/template_lang.rst +++ b/src/calibre/manual/template_lang.rst @@ -263,6 +263,9 @@ The following functions are available in addition to those described in single-f * ``formats_sizes()`` -- return a comma-separated list of colon_separated items representing sizes in bytes of the formats of a book. You can use the select function to get the size for a specific format. Note that format names are always uppercase, as in EPUB. * ``has_cover()`` -- return ``Yes`` if the book has a cover, otherwise return the empty string * ``not(value)`` -- returns the string "1" if the value is empty, otherwise returns the empty string. This function works well with test or first_non_empty. You can have as many values as you want. + * ``list_difference(list1, list2, separator)`` -- return a list made by removing from `list1` any item found in `list2`, using a case-insensitive compare. The items in `list1` and `list2` are separated by separator, as are the items in the returned list. + * ``list_intersection(list1, list2, separator)`` -- return a list made by removing from `list1` any item not found in `list2`, using a case-insensitive compare. The items in `list1` and `list2` are separated by separator, as are the items in the returned list. + * ``list_sort(list, direction, separator)`` -- return list sorted using a case-insensitive sort. If `direction` is zero, the list is sorted ascending, otherwise descending. The list items are separated by separator, as are the items in the returned list. * ``merge_lists(list1, list2, separator)`` -- return a list made by merging the items in list1 and list2, removing duplicate items using a case-insensitive compare. If items differ in case, the one in list1 is used. The items in list1 and list2 are separated by separator, as are the items in the returned list. * ``multiply(x, y)`` -- returns x * y. Throws an exception if either x or y are not numbers. * ``ondevice()`` -- return the string "Yes" if ondevice is set, otherwise return the empty string