Last active
May 9, 2017 06:51
-
-
Save slok/0dd764e2e007a7c90726 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ACTUAL_PATH=$1 | |
FILES=$ACTUAL_PATH/svg/*.svg | |
DPI=118 | |
mkdir $ACTUAL_PATH/wmf | |
mkdir $ACTUAL_PATH/svg2 | |
for f in $FILES | |
do | |
FILENAME=${f##*/} | |
#convert +antialias -density $DPI $ACTUAL_PATH/svg/$FILENAME $ACTUAL_PATH/svg2/$FILENAME | |
rsvg-convert $ACTUAL_PATH/svg/$FILENAME -w 1000 -a -f svg -o $ACTUAL_PATH/svg2/$FILENAME | |
uniconvertor $ACTUAL_PATH/svg2/$FILENAME $ACTUAL_PATH/wmf/$FILENAME.wmf | |
done | |
# Sometimes google drive doesn't work ok when transforming to drive formats. To solve this error you need to upload with the API | |
# for example using gdrive: https://github.com/prasmussen/gdrive | |
#find ./wmf/ -exec gdrive-linux-x64 import -p 0BzJtrvE4raJ5U2o3VFBaLVZSLWs {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment