Re: Adding class to SVG Export

On Mon, Oct 21, 2013 at 10:20 PM, Hans Breuer <hans breuer org> wrote:
At 21.10.2013 16:48, jul gil gmail com wrote:


I am trying to use Dia to generate svg diagram for presentations build
using reveal.js, and I need to modify the way the svg is exported.

Context : Reveal.js is a small
framework for creating presentation using HTML. Of course SVG can be
included in the HTML file.
One of the feature of reveal.js is to be able to display the content
of a slide step by step using the class "fragment"( See and ).
A small test shows that it work for SVG too : I can have a beautiful
diagramm in my page that appears step by step, the problem is I just
need to edit the SVG by hand...I would like to use Dia for that, of

I have actually 2 problems :

- include class and data-fragment-index in the properties :
easy for the shapes thanks to <ext_attributes>, but I have no idea of
what to modify to add a property to arrow, lines, polygon, etc...

It might be possible to use the objects meta data dicitionary for this, but
only the current development version has a GUI for it.

Another idea could be to manage you animations by distributing objects to
layers and encode class and index in the layer name.

- SVG export : it seems to me that 2 exports exists : and an
integrated export.
The python script is called when using export "SVG plain" or "SVG
compressed", the integrated export is called on "Scalable Vector
Graphic". Right ?

Mostly. There usually is a third SVG exporter provided by the cairo plug-in,
but it's availability depends on the buid system configuration.

The 2 exports are not exactly the same, the integrated export
generated <g> for each element, and that's on this element I want to
add the class. The python script seems not be able to add those tag,
but I am perhaps wrong.

The two exporters are definitely not exactly the same. They are
intentionally producing different output. With the current development
version it is possible to handle group creation on the object's rendering
level. See:

Seems perfect for what I want to do. I think I need to install the
development version.

So my questions are : am I on the right way ? Is it possible to do
what I want without modifying a single line of code ?

How is the behavior of the source code supposed to be changed without
changing the source code?

My question was : does exists another solution that I didn't found ?
another script to convert .dia to .svg not included in the main
distribution ? It seems not.

is it worth it ?

Not sure I get this question. Shouldn't you be the one to answer it?

Yes, of course, I just mean : is it something that can interest
someone else, and will it be integrated in the main source code ?

Julien Gilles.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]