On Mon, Oct 21, 2013 at 10:20 PM, Hans Breuer <[email protected]> wrote: > At 21.10.2013 16:48, [email protected] wrote: >> >> Hi >> >> 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 https://github.com/hakimel/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 >> https://github.com/hakimel/reveal.js/#fragments and >> http://lab.hakim.se/reveal-js/#/fragments ). >> 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 >> course. >> >> 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 : diasvg.py 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: > https://git.gnome.org/browse/dia/commit/?id=3cf5a400d9924a7dc6fc5e67cec166a466885887
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. _______________________________________________ dia-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/dia-list FAQ at http://live.gnome.org/Dia/Faq Main page at http://live.gnome.org/Dia
