Hg eb32cc96f2 don't embed the SVG inside the .shape, link to it
Dia doesn't seem to support complex SVG in the .shape? Or is the problem
elsewhere?
Anyway, just xlinking to the SVG file yields better results, and avoids
parsing the SVG ourselves, so it may be better.
Rely on ImageMagick to get the aspect ratio and dimensions then. Dia
supports abstract coordinates (we'll max them to 64x64).
2020-10-08 00:00:11 +02:00
2020-10-07 22:58:53 +02:00
2020-10-07 22:58:53 +02:00

svg-to-dia

Dia is an open-source diagram editor. It supports SVG pictograms. svg-to-dia converts ordinary SVG in the format supported by Dia.

How to use

  • Prepare files:
svg-to-dia --name my-shapes my-file1.svg my-file2.svg my-file3.svg

the above command will create a sheets/ and a shapes/ folders.

  • Move the generated files to dia's folder
mv sheets/* ~/.dia/sheets
mv shapes/* ~/.dia/shapes
  • Don't forget to restart dia
  • If you intend to publish, make sure to edit the .sheet files to add human-readable descriptions (multiple languages if you can)
  • ... and to edit the .shape files to add better coordinates of attachment points

License

svg-to-dia is released in the public domain, see UNLICENSE file.

Description
Script en Python para convertir SVG en ficheros para DIA. Genera el fichero .png y .shape correspondiente
Readme 45 KiB
Languages
Python 100%