]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
remove: covertometa integration in albentohandy
authorBastian Dehn <hhaalo@arcor.de>
Sat, 5 Dec 2020 14:21:14 +0000 (15:21 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 5 Dec 2020 14:21:14 +0000 (15:21 +0100)
albentohandy
covertometa [deleted file]

index 379a9a7eff3010abf1ef6bd9a918c9d6846a59bf..908be81520f5b735f2d8b5a4140ca38b3d5d3651 100755 (executable)
@@ -64,10 +64,37 @@ ConvertCoverToMeta()
        local readonly parallelopts="$2"
        local readonly scriptdir="$3"
 
-       find $workdir -name '*.jpg' \
-               | sort \
-               | parallel --will-cite --ungroup \
-               --sshlogin $parallelopts $scriptdir/covertometa {}
+       for i in $(find $workdir -name '*.jpg' | sort); do
+               CoverToMeta $i
+       done
+}
+
+CoverToMeta()
+{
+       local readonly INPUTFILE="$1"
+       local readonly OUTPUTFILE="${INPUTFILE/%.jpg/.txt}"
+
+       # Picture Typ
+       printf "0: %.8x" 3 | xxd -r -g0 > $OUTPUTFILE
+       # Mime type
+       printf "0: %.8x" $(printf "image/jpeg" | wc -c) \
+               | xxd -r -g0 >> $OUTPUTFILE
+       printf "image/jpeg" >> $OUTPUTFILE
+       # Description
+       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
+       # Width
+       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
+       # Heigth
+       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
+       # Color depth
+       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
+       # Color Count
+       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
+       # File Size
+       printf "0: %.8x" $(wc -c "$INPUTFILE" \
+               | cut --delimiter=' ' --fields=1) \
+               | xxd -r -g0 >> $OUTPUTFILE
+       cat $INPUTFILE >> $OUTPUTFILE
 }
 
 CleanupFlac()
diff --git a/covertometa b/covertometa
deleted file mode 100755 (executable)
index 1f374e4..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-main()
-{
-       local readonly INPUTFILE="$1"
-       local readonly OUTPUTFILE="${INPUTFILE/%.jpg/.txt}"
-
-       # Picture Typ
-       printf "0: %.8x" 3 | xxd -r -g0 > $OUTPUTFILE
-       # Mime type
-       printf "0: %.8x" $(printf "image/jpeg" | wc -c) \
-               | xxd -r -g0 >> $OUTPUTFILE
-       printf "image/jpeg" >> $OUTPUTFILE
-       # Description
-       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
-       # Width
-       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
-       # Heigth
-       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
-       # Color depth
-       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
-       # Color Count
-       printf "0: %.8x" 0 | xxd -r -g0 >> $OUTPUTFILE
-       # File Size
-       printf "0: %.8x" $(wc -c "$INPUTFILE" \
-               | cut --delimiter=' ' --fields=1) \
-               | xxd -r -g0 >> $OUTPUTFILE
-       cat $INPUTFILE >> $OUTPUTFILE
-}
-
-main $*
-exit 0