On Feb 13, 10:48 am, Heiko Hees <[email protected]> wrote:
> On Feb 13, 2009, at 5:19 PM, Ryan Lane wrote:
>
> > I think I also like #2. I'd imagine this could also work for dynamic
> > page list or semantic mediawiki queries... Both of which I'm
> > interested in.
>
> > Should this be a GET, or a POST? The graphviz extension can take
> > arbitrarily long content between the opening and closing tags, and
> > would likely be too long for a GET request.
>
> It needs to be a GET request and these are limited to 50K in the  
> client library we are using (could probably be patched) and  15K in MW/
> PHP/or the Webserver (didn't check who generated the 413 response).
>
> > I'm thinking I could make a special page that takes the content, and
> > attributes, and returns the location of the image. Should I be posting
> > and returning XML? API-like work is fairly new to me.
>
> I assume that your extension (did not find a working demo) uses some  
> hashing to store and reference generated images. If this is the case  
> you could use this hash to identify these images for the PDFs.
>

This isn't my extension. There are about 6-7 of them all over the web.
I'm going to take the best one, clean it up, add this functionality to
it, and commit it to MediaWiki's SVN.

Like EasyTimeline, the earlier Graphviz plugin uses a hash of the
source for the filename (in fact, the plugin is a derivative of
EasyTimeline). Later versions allow different hashes, and a filename
based off of the title. I'm going to limit it to an MD5 hash (like
EasyTimeline).

I think I'm confused about what we are trying to accomplish here.

Do we want to:

1. Be able to take a tag like:

<graphviz renderer="dot">
digraph G {
  node1->node2->node3
}
</graphviz>

send it as:

http://<servername>/w/index.php?title=Special%3AGraphviz&source=%3Cgraphviz%20renderer%3D%22dot%22%3Edigraph%20G%20%7Bnode1-%3Enode2-%3Enode3%7D%3C/graphviz%3E&attr=dot

and have a filename returned as:

http://<servername>/w/images/graphviz/233b20134c14f65a896fbfe01f0021d2.png

or:

2. On the client side, take md5(source).png
(233b20134c14f65a896fbfe01f0021d2.png), return this to the parse tree
as:

[[Image:<<Special:Graphviz>>/233b20134c14f65a896fbfe01f0021d2.png]]

make the following request:

http://<servername>/w/index.php?title=Special%3AGraphviz&filename=233b20134c14f65a896fbfe01f0021d2.png

and have the server return an image?

V/r,

Ryan Lane
--~--~---------~--~----~------------~-------~--~----~
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