Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- if [ -z $1 ] ; then
- echo "Usage: $0 [FILE]"
- exit 1
- else
- FILE=$1
- fi
- for ID in $(grep -o "id=\".*\"" ${FILE} | cut -d\" -f2 | grep "^g"); do
- OUTPUT="${ID}.pdf"
- echo "Exporting area $ID to $OUTPUT..."
- inkscape -z -f ${FILE} --export-text-to-path \
- --export-ignore-filters --export-id=${ID} \
- --export-id-only --export-pdf=${OUTPUT}
- done
- find . -name "*.pdf" -size +4k | while read PDF; do
- SVG="$(basename ${PDF} .pdf).svg"
- echo "Converting from <${PDF}> to <${SVG}>..."
- pdf2svg ${PDF} ${SVG}
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement