From 14a892e627a375334a02381351f139d94ad7ecf3 Mon Sep 17 00:00:00 2001 From: ダカマ Date: Mon, 2 Jun 2025 13:08:46 +0200 Subject: First dump --- miscripts/imnotgivingup.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 miscripts/imnotgivingup.sh (limited to 'miscripts/imnotgivingup.sh') diff --git a/miscripts/imnotgivingup.sh b/miscripts/imnotgivingup.sh new file mode 100644 index 0000000..0634e20 --- /dev/null +++ b/miscripts/imnotgivingup.sh @@ -0,0 +1,15 @@ +#!/bin/bash + + +# USE THIS WHEN IT'S TIME TO COMPILE A LIST OF NAMES FOR YOUR *ACTUAL* ART SORTING PROGRAM, YOU BITCH + +ART_DIR="$HOME/art" + +IMAGE_EXT_FIND="\(png\|jpe?g\|gif\|bmp\|webp\)" +IMAGE_EXT="$(echo "$IMAGE_EXT_FIND" | sed -r "s|\\\\\)|)|g; s|\\\\\(|(|g")" + +find "$ART_DIR" -type f -iregex ".*\.${IMAGE_EXT_FIND}$" | sed -r "s|$ART_DIR\/||g; s|\/[0-9]+\_p[0-9]+\.${IMAGE_EXT}$|\/PIXIV_TAG|g; s|\/danbooru(\_[a-z0-9]+){2}\.${IMAGE_EXT}$|\/DANBOORU_TAG|g; s|[0-9]*[^0-9]*?\.${IMAGE_EXT}$||g" | sort | uniq | sed '/^$/d' + + + + -- cgit v1.2.3