First gather all of the _color.svg into the output directory. Do this by searching recursively in all the subdirectories from the root folder with the find command.mkdir output ; find . -name "*_color.svg" -exec cp {} output \;
now process all svgs in output folder with svgo optimization and put the optimized ones in the root folder and if successful (&&) delete the original svgs in the output folder
svgo --config ~/Documents/appimages/svgo.config.js -f ./output/ -o . && rm output/*.svgNow reduce floating points (9.784 --> 9.7) to one digit after decimal
for f in *.svg; do sed -i -r 's|([0-9]+\.[0-9]{1})[0-9]+|\1|g' "$f" ; doneThen make gallery with VSCode.
mkdir output ; find . -name "*_flat.svg" -exec cp {} output \;
and do again mkdir output ; find . -name "*_high_contrast.svg" -exec cp {} output \;
Only thing is to create your svgo.config.js file with the following and point to itsvgo.config.js
module.exports = {
multipass: true,
plugins: [
{
name: 'preset-default',
params: {
overrides: {
cleanupNumericValues: false,
removeViewBox: false,
removeHiddenElems: false,
moveElemsAttrsToGroup: false,
moveGroupAttrsToElems: false,
},
},
},
],
};
>>Click here to continue<<