On Fri, 26 Apr 2013, Tobias Beer wrote:
> Is it possible to search a tiddlyweb store via javascript remoting and
> retrieve all (readable or perhaps only writable) tiddlers from any bags
> (accessible to me) that have a certain tag (or even field / field value)?
Search functionality depends on which store you are using and what
(server side) plugins you are using.
For example tiddlywebplugins.mysql3[1] provides the /search
functionality on tiddlyspace, and tiddlywebplugins.whoosher[2] provide
the /hsearch functionality. Neither of these require tiddlyspace.
Mysql search can:
* search fields
* is generally better for exact matches on attributes of a tiddler
(tags, fields, modifier, etc)
The whoosher search is:
* more oriented toward searching the text of tiddlers
* does relevancy ordering
* doesn't automatically search fields (but can be set up to do so)
As with any tiddler collection presented by TiddlyWeb, you can use
javascript to retrieve a JSON representation of the tiddlers (either
"fat" or "skinny") and then present them however your client side code
desires.
> *Background*: a GTD style app space that retrieves tiddlers with specific
> tags from any given spaces (/bags)... yet not necessarily loading the
> entire tiddler bodies, e.g. to list all tiddlers that have a tag "star"
> as...
Compare the output of the following to see the difference between fat
and skinny:
http://tiddlyspace.com/bags/tiddlyspace/tiddlers.json?fat=0
http://tiddlyspace.com/bags/tiddlyspace/tiddlers.json?fat=1
> Assuming write priviledges, I'd also like to be able to create a ui to
> "remotely edit" tiddlers thusly listed, e.g. remove or add tags (or add
> custom fields / edit custom field values) and, most importantly, write
> changes back to the corrsponding bags, again using Javascript remoting
> ...assuming error handling capabilities, e.g. for edit conflicts.
Have you see the
http://edit.tiddlyspace.com/ ?
Something like that could be made to work on plain tiddlyweb.
> Does TiddlyWeb offer the webservices required to do so? How much wishful
> thinking is all this?
What you're describing is exactly what TiddlyWeb is for.
Have a look at the HTTP API description:
http://tiddlyweb.tiddlyspace.com/HTTP%20API
[1]
https://pypi.python.org/pypi/tiddlywebplugins.mysql3
[2]
https://pypi.python.org/pypi/tiddlywebplugins.whoosher
--
Chris Dent
http://burningchrome.com/
[...]