No activity today, make something!
tweb-filters index

20161127102849 cdent  

This space provides documentation and tutorials on TiddlyWeb filters.

Note: The examples in this tank were originally written in TiddlyWiki text. In Markdown there's no corresponding filtering tools, so some examples may not work.

In the TiddlyWeb world a filter is a set of commands for constraining or sorting any collection by attributes of the member entities of the collection. They can be used in three places:

  • as query parameters on collection URIs, with any representation (HTML, wiki, Atom, etc)
  • in recipes to filter the tiddlers selected from a bag
  • in custom plugin code

A filter is distinguished from a search by context. A filter operates on a known and discrete collection which is provided to the filter. A search is a query against the entire corpus of tiddlers (and just tiddlers, no other entities) in a TiddlyWeb instance.

The default filters are divided into three types:

  • select: choose an entity by attribute (including negation)
  • sort: sort the results by an attribute (ascending or descending)
  • limit: limit the results by quantity or range

Filters are cumulative and processed in the order they are given. That is a second filter uses the results of the first filter as the collection on which it operates. It is most efficient to put a select first, before a sort or limit. Logic demands that a limit come after a sort.

Filters can be extended on two axes via plugins:

  • new types of filters can be added
  • additional attributes can be made available

Next Steps: