From eb61c1bae2ffad114e17393d91d86fb00d7ac8cd Mon Sep 17 00:00:00 2001 From: Hannah Isopod Date: Sat, 10 May 2025 03:03:58 -0600 Subject: Initialer commit Just remade the repo because I don't *need* need a comprehensive source history for my personal website and this is easier than getting filter-repo to work good --- stuff/webpkiller/webpkiller.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 stuff/webpkiller/webpkiller.sh (limited to 'stuff/webpkiller/webpkiller.sh') diff --git a/stuff/webpkiller/webpkiller.sh b/stuff/webpkiller/webpkiller.sh new file mode 100644 index 0000000..017fba0 --- /dev/null +++ b/stuff/webpkiller/webpkiller.sh @@ -0,0 +1,20 @@ +#!/bin/bash +if [ ! -f "$1" ]; then + echo "File $1 does not exist. Aborting..." + exit +fi + +suffix=".webp" +filename=${1%"$suffix"} +outfile="$filename.png" + +if [ -f "$outfile" ]; then + echo "File $outfile already exists. Aborting..." + notify-send --app-name=webpkiller "File $outfile already exists. Aborting..." + exit +fi + +magick $1 $outfile +rm -rf $1 + +xdg-open $outfile -- cgit v1.2.3