Sorts task entries in order by a specified field. Useful for generating RSS in particular order. By default the sort will be in ascending (lowest first) order.
Option | Description |
---|---|
field | The field by which to sort the entries. Default: title. Required if you are utilizing either of the other two options. |
reverse | If set to yes , the sort will be in descending order. |
ignore_articles | If set to yes , ignores 'a', 'an', and 'the' when sorting. Alternatively, this can be set to a regular expression of articles to be ignored (useful if you primarily use a different language). yes is equivelant to using the regex ^(the|a|an)\s . |
These entries will be used for the following examples.
His Entry
The Cats Entry
My Entry
Config:
sort_by: title
Result:
His Entry
My Entry
The Cats Entry
Config:
sort_by:
field: title
reverse: yes
Result:
The Cats Entry
My Entry
His Entry
Config:
sort_by:
field: title
ignore_articles: yes
Result:
The Cats Entry
His Entry
My Entry
Config:
sort_by:
field: title
ignore_articles: '^(his|my)\s'
Result
# note that 'His Entry' and 'My Entry' will be considered identical for the sort (since 'His' and 'My' will be ignored) and may be reversed, but will always be before 'The Cats Entry'
My Entry
His Entry
The Cats Entry
The field specification is a jinja expression for more advanced sorting.
e.g.
sort_by:
- field: quality.resolution
reverse: yes
- title|lower
Secondary (and further) search fields can be specified by providing the config in a list format.
sort_by:
- field: field1
reverse: yes
- field2