]> git.g-eek.se Git - users/gustav/scripts.git/commitdiff
[exiv2-find-uncommented] Inital on find untaged script
authorGustav Eek <gustav.eek@fripost.org>
Sun, 10 Jul 2022 09:05:30 +0000 (11:05 +0200)
committerGustav Eek <gustav.eek@fripost.org>
Sun, 10 Jul 2022 09:05:30 +0000 (11:05 +0200)
Makefile
exiv2-find-uncommented [new file with mode: 0755]

index d09fb69de5443e1bd255377628fe0e400192021f..85e10db83cb759ea36af1b394b250811c66ba250 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ SCRIPTS = \
   event-participant \
   exiv2-common-edits \
   exiv2-export \
+  exiv2-find-uncommented \
   folkets \
   ip-check \
   json2yaml \
diff --git a/exiv2-find-uncommented b/exiv2-find-uncommented
new file mode 100755 (executable)
index 0000000..717bd58
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Script that finds image files which are not commented with common edits
+#
+# SYNOPSIS
+#
+#    exiv2-find-uncommented PATHS
+
+PAT=".*\.\(jpg\|JPG\)"
+KEY="Exif.Image.Copyright"
+
+all=$XDG_RUNTIME_DIR/${0##*/}-$$-all.csv
+
+find ${@} -type f -regex "$PAT" | sort > $all
+cat $all | xargs exiv2 -g "$KEY" | cut -d\  -f1 |\
+    comm -3 $all - |\
+    cat