faust icon indicating copy to clipboard operation
faust copied to clipboard

Faust2PNG and other converters relying on inkscape fails

Open madskjeldgaard opened this issue 4 years ago • 5 comments
trafficstars

Hello

Using faust2png and other converters that rely on inkscape are broken on new version of inkscape (tested on version 1.0.2), since inkscape apparantly decided to change the command line flags:

Unknown option -e

madskjeldgaard avatar Apr 25 '21 10:04 madskjeldgaard

An alternative to this could be using imagemagick's convert for this instead of inkscape.

Here's an example using that command in a similar same way for faust2png:

#! /bin/bash -e

faust2svg $@

for d in $@; do
    for f in ${d%.*}-svg/*.svg; do
		convert -density 1000 -resize 1000x "$f" "${f%.svg}.png"
        rm $f
    done
    mv ${d%.*}-svg ${d%.*}-png
done

madskjeldgaard avatar Apr 25 '21 15:04 madskjeldgaard

grep inkscape *

faust2eps:        inkscape -E ${f%.svg}.eps $f
faust2mathdoc:		inkscape --without-gui --file="$SRC" --export-pdf="$PDF"
faust2mathdoc:		inkscape --without-gui --file="$SRC" --export-pdf="$PDF"
faust2pdf:            inkscape -E ${f%.svg}.eps $f
faust2png:        inkscape -e ${f%.svg}.png -d 300 $f

@madskjeldgaard Could you update all four and test them?

sletz avatar Apr 26 '21 20:04 sletz

sure!

madskjeldgaard avatar Apr 27 '21 09:04 madskjeldgaard

you can still use inkscape, it's just the options that changed:

inkscape -o "${f%.svg}.png" -d 300 "${f}"
inkscape -o "${f%.svg}.eps "${f}"
inkscape -o "${f%.svg}.pdf "${f}"

umlaeute avatar Dec 02 '21 14:12 umlaeute

Any PR ?

sletz avatar Dec 02 '21 14:12 sletz