mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Changes to FAQ for series indices.
Change custom column editor to not permit names ending with _index. This uses a hammer to solve the problem of series index names conflicting with another column name.
This commit is contained in:
parent
2902ff6a67
commit
0f45134578
@ -105,6 +105,8 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
|
|||||||
return self.simple_error('', _('No lookup name was provided'))
|
return self.simple_error('', _('No lookup name was provided'))
|
||||||
if re.match('^\w*$', col) is None or not col[0].isalpha() or col.lower() != col:
|
if re.match('^\w*$', col) is None or not col[0].isalpha() or col.lower() != col:
|
||||||
return self.simple_error('', _('The lookup name must contain only lower case letters, digits and underscores, and start with a letter'))
|
return self.simple_error('', _('The lookup name must contain only lower case letters, digits and underscores, and start with a letter'))
|
||||||
|
if col.endswith('_index'):
|
||||||
|
return self.simple_error('', _('Lookup names cannot end with _index, because these names are reserved for the index of a series column.'))
|
||||||
col_heading = unicode(self.column_heading_box.text())
|
col_heading = unicode(self.column_heading_box.text())
|
||||||
col_type = self.column_types[self.column_type_box.currentIndex()]['datatype']
|
col_type = self.column_types[self.column_type_box.currentIndex()]['datatype']
|
||||||
if col_type == '*text':
|
if col_type == '*text':
|
||||||
|
@ -212,9 +212,10 @@ metadata.
|
|||||||
You can build advanced search queries easily using the :guilabel:`Advanced Search Dialog`, accessed by
|
You can build advanced search queries easily using the :guilabel:`Advanced Search Dialog`, accessed by
|
||||||
clicking the button |sbi|.
|
clicking the button |sbi|.
|
||||||
|
|
||||||
Available fields for searching are: ``tag, title, author, publisher, series, rating, cover, comments, format,
|
Available fields for searching are: ``tag, title, author, publisher, series, series_index, rating, cover,
|
||||||
isbn, date, pubdate, search, size`` and custom columns. If a device is plugged in, the ``ondevice`` field
|
comments, format, isbn, date, pubdate, search, size`` and custom columns. If a device is plugged in, the
|
||||||
becomes available. To find the search name for a custom column, hover your mouse over the column header.
|
``ondevice`` field becomes available. To find the search name for a custom column, hover your mouse over the
|
||||||
|
column header.
|
||||||
|
|
||||||
The syntax for searching for dates is::
|
The syntax for searching for dates is::
|
||||||
|
|
||||||
@ -223,9 +224,8 @@ The syntax for searching for dates is::
|
|||||||
pubdate:=2009 Will find all books published in 2009
|
pubdate:=2009 Will find all books published in 2009
|
||||||
|
|
||||||
If the date is ambiguous, the current locale is used for date comparison. For example, in an mm/dd/yyyy
|
If the date is ambiguous, the current locale is used for date comparison. For example, in an mm/dd/yyyy
|
||||||
locale, 2/1/2009 is interpreted as 1 Feb 2009. In a dd/mm/yyyy locale, it is interpreted as 2 Jan 2009.
|
locale, 2/1/2009 is interpreted as 1 Feb 2009. In a dd/mm/yyyy locale, it is interpreted as 2 Jan 2009. Some
|
||||||
|
special date strings are available. The string ``today`` translates to today's date, whatever it is. The
|
||||||
Some special date strings are available. The string ``today`` translates to today's date, whatever it is. The
|
|
||||||
strings `yesterday`` and ``thismonth`` also work. In addition, the string ``daysago`` can be used to compare
|
strings `yesterday`` and ``thismonth`` also work. In addition, the string ``daysago`` can be used to compare
|
||||||
to a date some number of days ago, for example: date:>10daysago, date:<=45daysago.
|
to a date some number of days ago, for example: date:>10daysago, date:<=45daysago.
|
||||||
|
|
||||||
@ -234,9 +234,15 @@ You can search for books that have a format of a certain size like this::
|
|||||||
size:>1.1M Will find books with a format larger than 1.1MB
|
size:>1.1M Will find books with a format larger than 1.1MB
|
||||||
size:<=1K Will find books with a format smaller than 1KB
|
size:<=1K Will find books with a format smaller than 1KB
|
||||||
|
|
||||||
Dates and numeric fields support the operators ``=`` (equals), ``>`` (greater than), ``>=`` (greater than or
|
Dates and numeric fields support the relational operators ``=`` (equals), ``>`` (greater than), ``>=``
|
||||||
equal to), ``<`` (less than), ``<=`` (less than or equal to), and ``!=`` (not equal to). Rating fields are
|
(greater than or equal to), ``<`` (less than), ``<=`` (less than or equal to), and ``!=`` (not equal to).
|
||||||
considered to be numeric. For example, the search ``rating:>=3`` will find all books rated 3 or higher.
|
Rating fields are considered to be numeric. For example, the search ``rating:>=3`` will find all books rated 3
|
||||||
|
or higher.
|
||||||
|
|
||||||
|
Series indices are searchable. For the standard series, the search name is 'series_index'. For
|
||||||
|
custom series columns, use the column search name followed by _index. For example, to search the indices for a
|
||||||
|
custom series column named ``#my_series``, you would use the search name ``#my_series_index``.
|
||||||
|
Series indices are numbers, so you can use the relational operators described above.
|
||||||
|
|
||||||
The special field ``search`` is used for saved searches. So if you save a search with the name
|
The special field ``search`` is used for saved searches. So if you save a search with the name
|
||||||
"My spouse's books" you can enter ``search:"My spouse's books"`` in the search bar to reuse the saved
|
"My spouse's books" you can enter ``search:"My spouse's books"`` in the search bar to reuse the saved
|
||||||
|
Loading…
x
Reference in New Issue
Block a user