Macro for

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Macro for

Rune Flobakk-3

After recently discovering the site I wanted to be able
easily to include some UML in my APT documents, and started on a Doxia
macro for this. I intend to open source it once I get some actual
functionality up and running.

I picture the macro as something like this: it should accept's
textual UML syntax (or maybe some parametrization), forward it to and retrieve the generated picture, store the picture with the
generated documentation, and call figure() etc on the Sink to insert
the picture into the resulting document. The problem which I quickly
encountered is where exactly do I store the pictures which I get from I believe the usual case for Doxia macros is to reference
resources which are known beforehand, but in this case I essentially
want my macro to output a file which should be included in the
resulting document.

I can get the basedir from the provided MacroRequest, but this gives
me the root of the current Maven project, and I was hoping to avoid
hardcoding e.g. "target/site/images/uml". I could of course output a URL to Sink.figureGraphics() but that would potentially
generate a lot of unnecessary traffic to the, and the
generated site will depend on being online.

So is this a viable approach at all?
Thanks for any pointers!

- Rune