On Mon, Jul 20, 2009 at 8:06 AM, Steve<[email protected]> wrote: > > Hi, >
Hi ! Pls understand me if I didnt understand something you'r saying ;o) > I'm looking for some general advice on how best to approach a task > that I have been given. > ;) > We are attempting to use a graph tool called "XML/SWF Charts" to > create customizable graphs/tables of data stored in our TRAC database. > I suppose that this means that GraphViz is not a choice (isnt it ?) > The problem that I have is in trying to understand how to configure > TRAC to return an XML file containing data dynamically generated from > it's database. AFAIK in general this should be done by implementing a new plugin > I'm not even entirely sure if this is possible. I am > looking for the ability to perform some fixed query upon loading a new > page and to have the results of that query compiled into an XML file > the format of which is controlled by me. > It'd be nice to have something like that ;o) It is possible that I can do this in TracGViz plugin [1]_. For example since version 1.3.3 the plugin provides a data source (GVizReports AFAICR) which retrieves the data returned by a custom TracReport defined in a Trac environment. The fact is that currently the following output formats are available: - Standard: HTML, JSON, CSV - Extensions (non-official) : MoinMoin wiki text, reStructuredText (coming soon) So nothing about XML (in any flavour) *YET*; but if you need it, the good news is that it is quite easy to implement an encoder for XML output. In that case if the format was not the one you'r looking for (i.e. the one consumed by `XML/SWF Charts`) it is possible to use a (unique?) XSLT sheet in order to transform the data to the XML flavour that better fits your needs, so : - Is this what you need ? - What's the XML format ? Snippet ? - I could help if you decide that TracGViz plugin is suitable for what you'r doing ;o) > For example, this is what I'm trying to achieve: > > When the graph plugin loads, it attempts to read an XML file from some > location on the TRAC server (for example, http://trac/myproject/user_ages.xml) > The very act of attempting to read this file causes the TRAC server to > query it's database for the relevant information and then to collate > the results into a valid XML file. The graph plugin then reads this > dynamically created file and generates it's graph accordingly. > This is not exactly the way, it is something like this: - You implement an instance of IRequestHandler interface and match the paths your app will use to return your XML files - Then you implement the request / response ion another method defined by the intfc > I'm pretty sure it is not possible to do this out of the box (an > attempt to read a location on the TRAC server would typically return a > wiki page), This is true for `/wiki` prefix but not for all (e.g. using TracGViz plugin URLs under `/gviz` return raw data in the supported formats ) > but I was wondering if it would be possible to do it by > writing a plugin for TRAC. > Definitely yes, but possibly you dont need to do all that but use something like TracGViz (or perhaps a more specific plugin which I dont know ;o) > So, > > 1. Is such a feature possible with TRAC? And if so, what would be the > best approach to implement one? > Read above > > Thanks for your help, > Cya ! That's what we are here for ;o) .. [1] TracGViz plugin (https://opensvn.csie.org/traccgi/swlcu/wiki/En/Devel/TracGViz) -- Regards, Olemis. Blog ES: http://simelo-es.blogspot.com/ Blog EN: http://simelo-en.blogspot.com/ Featured article: --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
