Hi,

On Feb 13, 2009, at 4:00 PM, Ryan Lane wrote:

>
> I'd like to add support for graphviz, and can't figure out how to do
> it.
>
> I'm assuming I need to add a graphviz class to tagext.py, and return
> something inside of __call__. I can't figure out what I need to return
> though. The example says "this function builds wikimarkup and returns
> a parse tree for this". I'm not exactly sure what this means.
>
> What I need to do it take the source, put it into a file, run graphviz
> on the file (depending on the attributes), and include the outputted
> file (png, svg, etc) into whatever the output is.

there are two possibilites:
1) Either support the tag (see other examples like <source/>) and  
implement a method in the PDF writer, which triggers graphviz and  
includes the image.

2) Extend the extension to serve images via HTTP-GET requests. You  
then could return  [[Image:]] markup with a name that encodes the  
location and the parameter for the graphviz server. We'd probably need  
to add support for arbitrary URLs in images, but this shouldn't be too  
hard.  I'd prefer this option because it can be used as a webservice  
by other applications as well. This  approach would also work for  
other extensions such as <hiero/> or <timeline/>.

I assume both option to be some work but we'd assist you in that if  
possible.

Heiko


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mwlib" 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/mwlib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to