imagico / jsdotpattern

Generator for random periodic dot and symbol patterns for use in map rendering
22 stars 6 forks source link

Not working with recent Inkscape version on MacOS #10

Closed angoca closed 1 year ago

angoca commented 1 year ago

I am trying to run the svg_pattern.sh, but it generates a lot of errors.

inkscape -g --verb EditSelectAll --verb SelectionUnGroup --verb EditSelectAll --verb SelectionUnGroup --verb EditSelectAll --verb SelectionUnGroup --verb EditSelectAll --verb SelectionUnGroup --verb EditSelectAll --verb ObjectToPath --verb EditSelectAll --verb SelectionCombine --verb FileSave --verb FileClose --verb FileQuit frai.svg
Shortcut::add_shortcut: duplicate shortcut found for: <Primary>comma  Old: SelectionShrinkHalve  New: DialogPreferences !

...

./svg_pattern.sh: line 66: 66238 Segmentation fault: 11  inkscape -g --verb EditSelectAll --verb SelectionIntersect --verb FileSave --verb FileClose --verb FileQuit "$TARGET"

# and now we add this again as a workaround for Mapnik's senseless auto-centering
sed -i -e "s?<desc?<rect width=\"$SIZE\" height=\"$CLIP\" rx=\"0\" x=\"0\" y=\"0\" id=\"rect8566\" style=\"fill:none;fill-opacity:1;stroke:none\" /><desc?" "$TARGET"
+ sed -i -e 's?<desc?<rect width="1296" height="1296" rx="0" x="0" y="0" id="rect8566" style="fill:none;fill-opacity:1;stroke:none" /><desc?' frai.svg

inkscape -z --vacuum-defs -l "$TARGET" -f "$TARGET"
+ inkscape -z --vacuum-defs -l frai.svg -f frai.svg
Warning: Option --without-gui= is deprecated
Unknown option -f
imagico commented 1 year ago

This should be fixed now with https://github.com/imagico/jsdotpattern/commit/d20f66f86fc36f7d6b16d892633fa98ed3b3b151.