summaryrefslogtreecommitdiff
path: root/miscripts/imnotgivingup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'miscripts/imnotgivingup.sh')
-rw-r--r--miscripts/imnotgivingup.sh15
1 files changed, 15 insertions, 0 deletions
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'
+
+
+
+