| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function render_doSvg { |
| |
| |
| |
| local EXPORTID='CENTOSARTWORK' |
| |
| |
| grep "id=\"$EXPORTID\"" $INSTANCE > /dev/null |
| if [[ $? -gt 0 ]];then |
| cli_printMessage "`eval_gettext "There is not export id (\\\$EXPORTID) inside \\\"\\\$TEMPLATE\\\"."`" --as-error-line |
| fi |
| |
| # Check existence of external files. Inside design templates and |
| # their instances, external files are used to refere the |
| # background information required by the design template. If such |
| # background information is not available the image is produced |
| # without background information. This is something that need to |
| # be avoided. |
| render_checkSvgAbsref "$INSTANCE" |
| |
| # Render template instance using inkscape and save the output. |
| local INKSCAPE_OUTPUT="$(\ |
| inkscape $INSTANCE --export-id=$EXPORTID --export-png=${FILE}.png)" |
| |
| # Modify output from inkscape to fit the centos-art.sh script |
| # output visual style. |
| cli_printMessage "$(echo "$INKSCAPE_OUTPUT" | egrep '^Area' \ |
| | sed -r "s!^Area!`gettext "Area"`: !")" |
| cli_printMessage "$(echo "$INKSCAPE_OUTPUT" | egrep '^Background' \ |
| | sed -r "s!^Background (RRGGBBAA):(.*)!`gettext "Background"`: \1 \2!")" |
| cli_printMessage "$(echo "$INKSCAPE_OUTPUT" | egrep '^Bitmap saved as' \ |
| | sed -r "s!^Bitmap saved as:!`gettext "Saved as"`: !")" |
| |
| } |
| |