SVG to Raphael JS: svgConverter.pyThis is a small script with the potential to be very helpful.
SummaryA script to convert SVG files to Raphael JS. This was designed for SVG files generated by the Inkscape Vector Graphics program.
How to UseTo prepare an SVG file in Inkscape for parsing:
- Select all, and then under the 'Path' top menu choose 'Object to Path'
- Eliminate all layers by copy-pasting all paths onto the blank page and deleting layers
- Select all paths and the 'Path' top menu choose 'Break Apart' (Caution: using the 'Break Apart' command on images that are generated from a raster image can alter the fill of 'open' areas. This can be manually fixed for simple images.)
- Prepare an SVG file with Inkscape and put it in the same directory as svgConverter.py
- Open a terminal in that directory.
- With python installed, run svgConverter.py (type 'python svgConverter.py')