2019-02-23 10:42:39 +01:00
|
|
|
#!/usr/bin/bash
|
|
|
|
|
|
|
|
createsvg() {
|
|
|
|
local d
|
|
|
|
local svg
|
|
|
|
for d in ../ai/*.ai; do
|
|
|
|
svg=$(echo "$d" | sed 's/.ai/.svg/')
|
2019-02-23 14:38:36 +01:00
|
|
|
pdf=$(echo "$d" | sed 's/.ai/.pdf/')
|
2019-02-23 10:42:39 +01:00
|
|
|
output=$(echo "$svg" | sed 's/...//' | sed 's/\.ai/.svg/')
|
2019-02-23 14:38:36 +01:00
|
|
|
output_pdf=$(echo "$pdf" | sed 's/...//' | sed 's/\.ai/.pdf/')
|
2019-02-23 14:26:19 +01:00
|
|
|
echo "Convert AI to SVG $output ..."
|
|
|
|
inkscape --export-text-to-path -f "$d" -l "../$output"
|
2019-02-23 20:45:08 +01:00
|
|
|
# PDF export is handled by Illustrator export as Inkscape does not recognize the two artboards/pages in CLI mode
|
|
|
|
# echo "Convert AI to PDF $output_pdf ..."
|
|
|
|
# inkscape --export-text-to-path -f "$d" -A "../$output_pdf"
|
2019-02-23 10:42:39 +01:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$1" != "" ];then
|
|
|
|
cd $1
|
|
|
|
fi
|
|
|
|
|
|
|
|
createsvg
|
|
|
|
|