That sounds very interesting - there's been talk of this before (e.g. it
would help us manage tickets), but I believe Trac's missing a web API.
However, the XML-RPC plugin* might offer that - I can't really tell.
> * Convince TiddlyWiki to display TracWikiText correctly
You can teach TiddlyWiki to interpret different wiki markup. Martin has
written formatters for a number of wiki engines:
http://martinswiki.com
There's also some information on the community wiki:
http://www.tiddlywiki.org/wiki/Dev:Formatter
Since Trac's wiki markup is fairly similar to TiddlyWiki's, this
shouldn't be too hard.
> 1. Convert each page into a Tiddler
> 1. Import into target TiddlyWiki
If the XML-RPC plugin does indeed provide an interface for accessing the
Trac data, you could write an adaptor. Again, Martin's and the community
wiki have examples and more information:
http://www.tiddlywiki.org/wiki/Dev:Server_Adaptor_Mechanism
> And optionally, Tiddly => Trac ; it might be nice for my remote users
> to be able to make edits and send them back to me.
If the API supports it, this should be possible with the adaptor.
Looking forward to hearing about your progress!
-- F.
I've been a bit preoccupied, but I still intend to have a crack at it so
I can support my extra-network users with a user manual.
My initial impression of the XMLRPC interface for Trac is that it easily
supports enough features to export a TracWiki to a TiddlyWiki (which is
my initial goal, even though 2-way syncing is obviously desirable). The
TracFormatter by Mr Budden is obviously a large plus here. I've only
just dicovered that to install a plugin you just make a tiddler out of
it... so I'll play with that first. (seems to work nicely)
I've not had a proper crack at XMLRPC over JavaScript, but it seems easy
enough.
My needs would probably be supported well by a plain TracFile import
(since I'm the Trac admin and can get it dumped to disk), but the XMLRPC
solution seems a lot more elegant.
Same here (I suppose if it works for TracWiki, it works for TracTickets).
> I've not had a proper crack at XMLRPC over JavaScript, but it seems easy
> enough.
If you could provide us with some details on how to get started, maybe
we can chip in a few bits of code and general guidance.
-- F.
FWIW, I (only) just realized that we'll need some kind of XML-RPC
message builder for JavaScript:
http://www.google.com/search?q=JavaScript%20XML-RPC
Then we could access Trac like so:
http://trac.tiddlywiki.org/xmlrpc
http://trac.tiddlywiki.org/login/xmlrpc
From there it should be fairly easy.
However, I don't really know a lot about how XML-RPC works...
-- F.
http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/JSPWikiAdaptorPlugin.js
Martin
2008/7/21 FND <FN...@gmx.net>:
Oh - I didn't know that, so I've come up with a simple XML-RCP plugin:
http://tinyurl.com/5k879p
(http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/XMLRPCPlugin.js)
Here's some sample code:
---------------
var url = "http://trac.tiddlywiki.org/xmlrpc";
var method = "ticket.query";
var params = [{
type: "str",
value: "owner=FND"
}]
xmlrpc.request(url, config.macros.XMLRPC.diplayResults, method, params);
---------------
The output is not being processed yet, and there are still a few bits of
XML-RPC functionality missing (e.g. complex data types for parameters).
I've already spent more time on this than I had intended, so any
contributions would be very welcome...
-- F.
[1] http://trac.tiddlywiki.org/xmlrpc
[2] http://trac-hacks.swapoff.org/wiki/XmlRpcPlugin
> Oh - I didn't know that, so I've come up with a simple XML-RCP plugin:
> http://tinyurl.com/5k879p
> (http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/XMLRPCPlugin.js
> )
nice! sounds like one step away from a MT/Wordpress API plugin
and TiddlyWiki as a MT/Wordpress/Blogger client, assuming someone
hasn't already done this?
http://codex.wordpress.org/XML-RPC_Support
of course AtomPub would be the cleaner way to do this,
but not currently mainstream:
http://www.intertwingly.net/blog/2007/08/30/WordPress-2-3-AtomPub
Well, I don't know about that (e.g. it currently uses RegEx instead of
proper XML parsing)...
> sounds like one step away from a MT/Wordpress API plugin
> and TiddlyWiki as a MT/Wordpress/Blogger client, assuming someone
> hasn't already done this?
Well, halfway through I was reminded of TiddlyBlogger:
http://boycook.wordpress.com/2007/11/05/tiddlyblogger-updated/
http://jayfresh.tiddlyspot.com/#BlogSetup%20BlogPlugin
While I personally don't care too much about WordPress right now (I just
really want to import tickets from Trac), it shouldn't be hard to make
TiddlyBlogger use this more generic (though incomplete) XML-RPC library.
-- F.