Hi Arkady

Sorry, I'm not very familiar with node.js.  Can you give me an example
> of a command for how to add a JSON file named tiddlers.json into a TW5
> file named mytw5.html?  Is it just
>
> node mytw5.html --load tiddlers.json text/json ?
>

Close, but on the server TW5 needs a WikiFolder to store it's tiddlers, and
cannot use a standalone HTML file as it's working store. So you'd need to
do something like this:

node ./tiddlywiki.js \
./path/to/my/wiki/folder \
--verbose \
--load ./path/to/my/wikifile \
--rendertiddler $:/core/templates/tiddlywiki5.template.html ./test.html
text/plain \
|| exit 1

Line 1 invokes TW5, line 2 points to your wiki folder (take a copy of
editions/empty to get started). Line 4 loads the (non-system) tiddlers from
the specified TiddlyWiki file, and line 5 saves the result as a standalone
wiki.

If you're working this way you can make your scripts deposit tiddlers as
.tid files in the tiddlers folder of your wiki folder. Then they will be
automatically loaded when the wiki starts up.

But you might be better off running a local server under node.js; see
./serve.sh. If you're running like that then your scripts should use CURL
to save tiddlers directly to the server.

Can I pipe STDOUT to node instead of importing a file?
> E.g.
>
> echo "<json code>" | node mytw5.html --load - text/json
>
> or something like that?
>

No, at the moment all the command line stuff in TW5 is file-based, not
stream based.


> This would be very useful.  Most of my tasks come from emails and if I can
> write a script to add tiddlers to TW5 from command line, I can create a
> macro in my mutt mail client to create tasks from emails.  This would be
> great because integration with email client is #1 feature I look for in
> a task management system.  I did something similar when I used "task"
> project management application (terminal based) and it worked well.
>

Yes, that would be great, and I think perfectly possible as things stand,

Best wishes

Jeremy



>
> Thanks.
>
> --
> Arkady
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to