Created
February 6, 2023 02:00
-
-
Save louisswarren/b1d4f8a5592bc7f98d16b887ddee1fbc to your computer and use it in GitHub Desktop.
Vet which media files to copy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
vet() { | |
echo "Playing $1" | |
mpv --no-audio-display "$1" | |
read x | |
if [ "$x" == "y" ]; then | |
cp -v "$1" "$2/" | |
else | |
echo "Skipping $1" | |
fi | |
} | |
export -f vet | |
vetf='vet "$0"' | |
find "$1" -name '*.mp3' -exec sh -c "$vetf '$2'" {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment