diff --git a/manual/gui.rst b/manual/gui.rst index b692e1fd4e..01bc880b27 100644 --- a/manual/gui.rst +++ b/manual/gui.rst @@ -420,16 +420,16 @@ Searching for ``no`` or ``unchecked`` will find all books with ``No`` in the col Hierarchical items (e.g. A.B.C) use an extended syntax to match initial parts of the hierarchy. This is done by adding a period between the exact match indicator (=) and the text. For example, the query ``tags:=.A`` will find the tags `A` and `A.B`, but will not find the tags `AA` or `AA.B`. The query ``tags:=.A.B`` will find the tags `A.B` and `A.B.C`, but not the tag `A`. -Identifiers (e.g., isbn, doi, lccn etc) also use an extended syntax. First, note that an identifier has the form ``type:value``, as in ``isbn:123456789``. The extended syntax permits you to specify independently which type and value to search for. Both the type and the value parts of the query can use `equality`, `contains`, or `regular expression` matches. Examples: +Identifiers (e.g., ISBN, doi, lccn etc) also use an extended syntax. First, note that an identifier has the form ``type:value``, as in ``isbn:123456789``. The extended syntax permits you to specify independently which type and value to search for. Both the type and the value parts of the query can use `equality`, `contains`, or `regular expression` matches. Examples: * ``identifiers:true`` will find books with any identifier. * ``identifiers:false`` will find books with no identifier. * ``identifiers:123`` will search for books with any type having a value containing `123`. * ``identifiers:=123456789`` will search for books with any type having a value equal to `123456789`. - * ``identifiers:=isbn:`` and ``identifiers:isbn:true`` will find books with a type equal to isbn having any value - * ``identifiers:=isbn:false`` will find books with no type equal to isbn. - * ``identifiers:=isbn:123`` will find books with a type equal to isbn having a value containing `123`. - * ``identifiers:=isbn:=123456789`` will find books with a type equal to isbn having a value equal to `123456789`. + * ``identifiers:=isbn:`` and ``identifiers:isbn:true`` will find books with a type equal to ISBN having any value + * ``identifiers:=isbn:false`` will find books with no type equal to ISBN. + * ``identifiers:=isbn:123`` will find books with a type equal to ISBN having a value containing `123`. + * ``identifiers:=isbn:=123456789`` will find books with a type equal to ISBN having a value equal to `123456789`. * ``identifiers:i:1`` will find books with a type containing an `i` having a value containing a `1`. diff --git a/manual/template_lang.rst b/manual/template_lang.rst index de697ae75d..aa9241d0fd 100644 --- a/manual/template_lang.rst +++ b/manual/template_lang.rst @@ -130,7 +130,7 @@ The functions available are listed below. Note that the definitive documentation * ``list_item(index, separator)`` -- interpret the field as a list of items separated by `separator`, returning the `index`th item. The first item is number zero. The last item can be returned using `list_item(-1,separator)`. If the item is not in the list, then the empty value is returned. The separator has the same meaning as in the `count` function. * ``lookup(pattern, field, pattern, field, ..., else_field)`` -- like switch, except the arguments are field (metadata) names, not text. The value of the appropriate field will be fetched and used. Note that because composite columns are fields, you can use this function in one composite field to use the value of some other composite field. This is extremely useful when constructing variable save paths (more later). * ``re(pattern, replacement)`` -- return the field after applying the regular expression. All instances of `pattern` are replaced with `replacement`. As in all of calibre, these are Python-compatible regular expressions. - * ``select(key)`` -- interpret the field as a comma-separated list of items, with the items being of the form "id:value". Find the pair with the id equal to key, and return the corresponding value. This function is particularly useful for extracting a value such as an isbn from the set of identifiers for a book. + * ``select(key)`` -- interpret the field as a comma-separated list of items, with the items being of the form "id:value". Find the pair with the id equal to key, and return the corresponding value. This function is particularly useful for extracting a value such as an ISBN from the set of identifiers for a book. * ``shorten(left chars, middle text, right chars)`` -- Return a shortened version of the field, consisting of `left chars` characters from the beginning of the field, followed by `middle text`, followed by `right chars` characters from the end of the string. `Left chars` and `right chars` must be integers. For example, assume the title of the book is `Ancient English Laws in the Times of Ivanhoe`, and you want it to fit in a space of at most 15 characters. If you use ``{title:shorten(9,-,5)}``, the result will be `Ancient E-nhoe`. If the field's length is less than ``left chars`` + ``right chars`` + the length of ``middle text``, then the field will be used intact. For example, the title `The Dome` would not be changed. * ``str_in_list(separator, string, found_val, ..., not_found_val)`` -- interpret the field as a list of items separated by `separator`, comparing the `string` against each value in the list. If the `string` matches a value (ignoring case), return `found_val`, otherwise return `not_found_val`. If the string contains separators, then it is also treated as a list and each value is checked. The `string` and `found_value` can be repeated as many times as desired, permitting returning different values depending on the search. The strings are checked in order. The first match is returned. * ``subitems(start_index, end_index)`` -- This function is used to break apart lists of tag-like hierarchical items such as genres. It interprets the field as a comma-separated list of tag-like items, where each item is a period-separated list. Returns a new list made by first finding all the period-separated tag-like items, then for each such item extracting the components from `start_index` to `end_index`, then combining the results back together. The first component in a period-separated list has an index of zero. If an index is negative, then it counts from the end of the list. As a special case, an end_index of zero is assumed to be the length of the list. Examples:: @@ -245,7 +245,7 @@ The following functions are available in addition to those described in single-f * ``check_yes_no(field_name, is_undefined, is_false, is_true)`` -- checks the value of the yes/no field named by the lookup key ``field_name`` for a value specified by the parameters, returning "yes" if a match is found, otherwise returning an empty string. Set the parameter ``is_undefined``, ``is_false``, or ``is_true`` to 1 (the number) to check that condition, otherwise set it to 0. Example:: check_yes_no("#bool", 1, 0, 1) - + returns "yes" if the yes/no field ``"#bool"`` is either undefined (neither True nor False) or True. More than one of ``is_undefined``, ``is_false``, or ``is_true`` can be set to 1. This function is usually used by the ``test()`` or ``is_empty()`` functions. * ``cmp(x, y, lt, eq, gt)`` -- compares x and y after converting both to numbers. Returns ``lt`` if x < y. Returns ``eq`` if x == y. Otherwise returns ``gt``. * ``current_library_name()`` -- return the last name on the path to the current calibre library. This function can be called in template program mode using the template ``{:'current_library_name()'}``. diff --git a/src/calibre/ebooks/metadata/sources/base.py b/src/calibre/ebooks/metadata/sources/base.py index 2d05d17814..1078fc1499 100644 --- a/src/calibre/ebooks/metadata/sources/base.py +++ b/src/calibre/ebooks/metadata/sources/base.py @@ -545,7 +545,7 @@ class Source(Plugin): def identify(self, log, result_queue, abort, title=None, authors=None, identifiers={}, timeout=30): ''' - Identify a book by its title/author/isbn/etc. + Identify a book by its Title/Author/ISBN/etc. If identifiers(s) are specified and no match is found and this metadata source does not store all related identifiers (for example, all ISBNs @@ -563,7 +563,7 @@ class Source(Plugin): This integer will be used by :meth:`compare_identify_results`. If the order is unimportant, set it to zero for every result. - Make sure that any cover/isbn mapping information is cached before the + Make sure that any cover/ISBN mapping information is cached before the Metadata object is put into result_queue. :param log: A log object, use it to output debugging information/errors diff --git a/src/calibre/gui2/preferences/look_feel.py b/src/calibre/gui2/preferences/look_feel.py index 334b76cd65..064df049c2 100644 --- a/src/calibre/gui2/preferences/look_feel.py +++ b/src/calibre/gui2/preferences/look_feel.py @@ -127,7 +127,7 @@ class IdLinksRuleEdit(Dialog): self.l = l = QFormLayout(self) l.setFieldGrowthPolicy(l.AllNonFixedFieldsGrow) l.addRow(QLabel(_( - 'The key of the identifier, for example, in isbn:XXX, the key is isbn'))) + 'The key of the identifier, for example, in isbn:XXX, the key is ISBN'))) self.key = k = QLineEdit(self) l.addRow(_('&Key:'), k) l.addRow(QLabel(_( diff --git a/src/pyj/book_list/local_books.pyj b/src/pyj/book_list/local_books.pyj index 9b36bc08a3..9d4ac49f4e 100644 --- a/src/pyj/book_list/local_books.pyj +++ b/src/pyj/book_list/local_books.pyj @@ -229,7 +229,7 @@ def init(container_id): container.appendChild(recent) recent.appendChild(E.div( style='margin: 1rem 1rem', - _('Loading downloaded books from storage, please wait...') + _('Loading downloaded books from local storage, please wait...') )) conditional_timeout(recent_container_id, 5, show_recent)