edemaine / svgtiler

Tool for drawing diagrams on a grid, combining grids of SVGs into a big SVG figure
MIT License
58 stars 6 forks source link

SVG files in command line / spin off conversion from SVG #75

Closed edemaine closed 2 years ago

edemaine commented 2 years ago

I've written Makefiles to convert SVG to PDF before for papers. I always look at SVG Tiler's source code for how to correctly invoke Inkscape.

Given that SVG Tiler already does this, why not support .svg files on the command line, and convert them as appropriate (-p for PDF, -P for PNG)? This would be especially nice with -j option for multithreading, and -w for watching (#74).

Plausibly this should also be spun off into another tool (svg2, supporting PDF and PNG and any other formats supported by Inkscape), but a fair number of papers probably need both, so including it in SVG Tiler seems nice. My plan is to split off this part of SVG Tiler, and then use it as a library in SVG Tiler.

This existing project has some things to learn from, e.g. automatic detection of number of cores to use.

edemaine commented 2 years ago

svgink is the spinoff. It already reproduces what SVG Tiler can do, but still need: