On Sat, 20 Apr 2013, FND wrote:
> AFAIK twanager doesn't let me retrieve tiddlers (yet?), so the only
> reasonable options appear to be
> * accessing the Python API
> * using the HTTP API to check whether the tiddler exists and retrieving
> its text representation, then using `twanager tiddler` to create or
> modify the tiddler
I'm a bit confused here. You seem to be saying "I don't want to use
either of the two very mature and very flexible APIs that are provided
by TiddlyWeb".
I'm guessing however that what you really mean though is: I want to
integrate a simple tool (that preferably already exists) into a stack
of unix tools in a shell script to accomplish the task above.
Which comes out making a bit more sense...
And you're right, if you don't want to engage Python and you don't
want to go over HTTP, the option's not there.
So the question, for me, becomes: How come using HTTP doesn't appeal?
GETting and PUTting (with curl) the text representation of a tiddler
seems a good fit here and means you don't have to be local to the
machine with the tiddlyweb store.
But: There is some awkwardness in the fact that you can't cat a
tiddler. Given your predilections if might sense for you take this
plugin which never quite got off the ground:
https://github.com/tiddlyweb/tiddlyweb-plugins/blob/master/unixcom/unixcom.py
And add cat, or something with a similar sort of name. cp, mv,
rm, touch and ls are there already (unclear if they still work but
they did once upon a time).
And turn it into a real plugin and put it on pypi.
You'll probably want to change how erroring out happens (right now it
prints a warning and then goes to usage(), a sys.exit(1) would be more
appropriate).
Or just use HTTP.
> PS: The ultimate goal is to create a non-browser client for my personal
> workflow(s). (Yes, I'm familiar with twikrad, but never quite got
> comfortable with it.)
twikrad is really useful if you are in the habit of generating long
content for and with other people but I too have found it sort of
wrong somehow for my own personal use (which is why there is now an
@edit). I presume this is because of context switching issues: the
environment in which the original wikrad was being used it was
generally used at a point when someone said "and now I will write
something" or "and now I will do some hard core gardening". That is:
there was an intentional and important switching of context.
--
Chris Dent
http://burningchrome.com/
[...]