Browse Source

Генерировать словарь для иконок

master
parent
commit
71cb46236d
2 changed files with 8 additions and 8 deletions
  1. +4
    -4
      иконки/2019-09-12.js
  2. +4
    -4
      иконки/2019-09-12/ген

+ 4
- 4
иконки/2019-09-12.js View File

@@ -1,7 +1,7 @@
function RR() { return [
function RR() { return {


['layout', 'PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSIgZGF0YS1wcmVmaXg9ImZhcyIgZGF0YS1pY29uPSJib3hlcyIgY2xhc3M9InN2Zy1pbmxpbmUtLWZhIGZhLWJveGVzIGZhLXctMTgiIHJvbGU9ImltZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTc2IDUxMiI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJNNTYwIDI4OGgtODB2OTZsLTMyLTIxLjMtMzIgMjEuM3YtOTZoLTgwYy04LjggMC0xNiA3LjItMTYgMTZ2MTkyYzAgOC44IDcuMiAxNiAxNiAxNmgyMjRjOC44IDAgMTYtNy4yIDE2LTE2VjMwNGMwLTguOC03LjItMTYtMTYtMTZ6bS0zODQtNjRoMjI0YzguOCAwIDE2LTcuMiAxNi0xNlYxNmMwLTguOC03LjItMTYtMTYtMTZoLTgwdjk2bC0zMi0yMS4zTDI1NiA5NlYwaC04MGMtOC44IDAtMTYgNy4yLTE2IDE2djE5MmMwIDguOCA3LjIgMTYgMTYgMTZ6bTY0IDY0aC04MHY5NmwtMzItMjEuM0w5NiAzODR2LTk2SDE2Yy04LjggMC0xNiA3LjItMTYgMTZ2MTkyYzAgOC44IDcuMiAxNiAxNiAxNmgyMjRjOC44IDAgMTYtNy4yIDE2LTE2VjMwNGMwLTguOC03LjItMTYtMTYtMTZ6Ij48L3BhdGg+PC9zdmc+'],
'layout' : 'PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSIgZGF0YS1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CA3MnMzMi4yMzUgNzIgNzIgNzIgNzItMzIuMjM1IDcyLTcyUzEzNS43NjQgMCA5NiAweiI+PC9wYXRoPjwvc3ZnPg==',


]; }
}; }

+ 4
- 4
иконки/2019-09-12/ген View File

@@ -7,21 +7,21 @@ function gen
fileName=$2 fileName=$2
target=$3 target=$3


echo -n "['$name', '" >> $target
echo -n "'$name' : '" >> $target
base64 $fileName | tr -d \\n >> $target base64 $fileName | tr -d \\n >> $target
echo -e "'],\n" >> $target
echo -e "',\n" >> $target
} }


function genIcons function genIcons
{ {
target=$1 target=$1


echo -e "function RR() { return [\n" > $target
echo -e "function RR() { return {\n" > $target


gen "layout" "boxes-solid.svg" $target gen "layout" "boxes-solid.svg" $target
gen "info" "info-solid.svg" $target gen "info" "info-solid.svg" $target


echo "]; }" >> $target
echo "}; }" >> $target
} }


genIcons "../2019-09-12.js" genIcons "../2019-09-12.js"

Loading…
Cancel
Save