From 533740b789382de5bd4454755b959a234da8c574 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Wed, 13 Dec 2017 20:21:10 -0500 Subject: [PATCH 1/3] Add ability to convert all images --- src/xmb/convert.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 src/xmb/convert.sh diff --git a/src/xmb/convert.sh b/src/xmb/convert.sh new file mode 100755 index 000000000..b0cb497ea --- /dev/null +++ b/src/xmb/convert.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# MonoChrome SVG to PNG Converter +# +# Will update the given icon from its SVG to its PNG. +# +# Requires Inkscape to be installed. +# +# ./convert.sh THEME ICON +# +# Parameters +# - THEME (optional) Which theme to act on. +# - ICON (optional) Which icon to conver from an SVG to a PNG. +# +# If the parameters are not provided, it will process all images. +# +# Example +# +# ./convert.sh monochrome battery-full +# ./convert.sh flatui DOS +# ./convert.sh + +if [ -z "$1" ]; then + for theme in $(find . -type d -not -path . -printf "%f\n"); do + for image in $theme/*.svg; do + ./convert.sh $theme "$(basename "$image" .svg)" + done + done +else + inkscape -z -e "../../xmb/$1/png/$2.png" -w 512 -h 512 "$1/$2.svg" +fi; \ No newline at end of file From 766158975426c6ac3aad018974bed48f8056fb01 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Wed, 13 Dec 2017 20:22:51 -0500 Subject: [PATCH 2/3] Remove old convert.sh --- xmb/convert.sh | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100755 xmb/convert.sh diff --git a/xmb/convert.sh b/xmb/convert.sh deleted file mode 100755 index 8718c22c9..000000000 --- a/xmb/convert.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# MonoChrome SVG to PNG Converter -# -# Will update the given icon from its SVG to its PNG. -# -# Requires Inkscape to be installed. -# -# ./convert.sh THEME ICON -# -# Parameters -# - THEME Which theme to act on. -# - ICON Which icon to conver from an SVG to a PNG. -# -# Example -# -# ./convert.sh monochrome battery-full -# ./convert.sh flatui DOS - -inkscape -z -e "$1/png/$2.png" -w 256 -h 256 "$1/src/$2.svg" From 65ccdc43015a7ab471571c472532e487dc735132 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Thu, 14 Dec 2017 02:10:28 -0500 Subject: [PATCH 3/3] Update convert.sh --- src/xmb/convert.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xmb/convert.sh b/src/xmb/convert.sh index b0cb497ea..36f2202df 100755 --- a/src/xmb/convert.sh +++ b/src/xmb/convert.sh @@ -27,5 +27,5 @@ if [ -z "$1" ]; then done done else - inkscape -z -e "../../xmb/$1/png/$2.png" -w 512 -h 512 "$1/$2.svg" -fi; \ No newline at end of file + inkscape -z -e "../../xmb/$1/png/$2.png" -w 256 -h 256 "$1/$2.svg" +fi;