summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2023-04-25 20:59:00 -0400
committerAdam T. Carpenter <atc@53hor.net>2023-04-25 20:59:00 -0400
commite352f4224bd6f2ab14af103ca3237749f27ce54c (patch)
treeb866ffcd940caa725c6580a521ed8e3e22c77d38
parente19aef1832d72fa54d66c0b90718a68df72c1069 (diff)
downloadcarpentertutoring-e352f4224bd6f2ab14af103ca3237749f27ce54c.tar.xz
carpentertutoring-e352f4224bd6f2ab14af103ca3237749f27ce54c.zip
feat: include useful scripts
-rwxr-xr-xscripts/convert.sh6
-rwxr-xr-xscripts/serve.sh2
2 files changed, 8 insertions, 0 deletions
diff --git a/scripts/convert.sh b/scripts/convert.sh
new file mode 100755
index 0000000..97f6d9b
--- /dev/null
+++ b/scripts/convert.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+[ -z "$1" ] && exit 1
+basename=${1%.*}
+basename=${basename##*/}
+magick "$1" -resize 480x ./assets/"$basename".png
+magick ./assets/"$basename".png ./assets/"$basename".webp
diff --git a/scripts/serve.sh b/scripts/serve.sh
new file mode 100755
index 0000000..e7f2b4c
--- /dev/null
+++ b/scripts/serve.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+php -S localhost:8000