diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-12-27 14:00:36 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-12-27 14:00:36 +0100 |
commit | 249ba7892da2cafbcc6ede1b41eb187c590bac00 (patch) | |
tree | ca95fdc30e73dd096f6f90f2b34c6fafb1c5a084 /.local/share | |
parent | 7c9e27da43f27aab54b788990c3d80f6a90d64f3 (diff) |
added single2folder script
Diffstat (limited to '.local/share')
-rwxr-xr-x | .local/share/bin/single2folder | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.local/share/bin/single2folder b/.local/share/bin/single2folder new file mode 100755 index 0000000..b3b2d30 --- /dev/null +++ b/.local/share/bin/single2folder @@ -0,0 +1,16 @@ +#!/bin/sh +file=$1 +foldername=$(basename "$file" .flac) + +echo "mkdir \"$foldername\"" +mkdir "$foldername" + +echo "mv \"$file\" \"$foldername\"" +mv "$file" "$foldername" + +echo "extract folder.png" +metaflac --export-picture-to="${foldername}/folder.png" "${foldername}/${file}" + +echo "make sure folder.png is a png" +magick "${foldername}/folder.png" "${foldername}/folder.png" + |