diff --git a/_tools/convert-png.sh b/_tools/convert-png.sh new file mode 100644 index 0000000..117bc1b --- /dev/null +++ b/_tools/convert-png.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +inputFiles=$1/* +outDir=$2 + +mkdir -p $outDir + +for inFile in $inputFiles +do + outFile=${inFile%.*}.png + outFile="$outDir/$(basename $outFile)" + echo "Converting $inFile ..." + #convert -background none -density 600 $inFile $outFile + /mnt/c/Program\ Files/Inkscape/inkscape.exe $inFile --export-png $outFile -d 600 +done \ No newline at end of file diff --git a/_tools/fix-svg.sh b/_tools/fix-svg.sh new file mode 100644 index 0000000..50e539a --- /dev/null +++ b/_tools/fix-svg.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +inputFiles=$1/* + +for inFile in $inputFiles +do + echo "Fixing SVG $inFile ..." + svgo $inFile +done \ No newline at end of file diff --git a/_tools/gallery.js b/_tools/gallery.js new file mode 100644 index 0000000..a23d964 --- /dev/null +++ b/_tools/gallery.js @@ -0,0 +1,48 @@ +#!/usr/bin/node + +const fs = require('fs'); + +var DIR = process.argv[2]; +if(!DIR) { + console.log(`### ERROR! No directory provided!`); + console.log(`Usage: node gallery.js {directory REQUIRED}`); + process.exit(1); +} + +outHtml = ` +