Originally Posted by
mcduck
Of course if writing such script is easier than doing it by hand depends on how long playlist you have...
I have to do this weekly. It's a major time-suck. There's no way scripting it won't be quicker.
Below is what I have so far (it's not from banshee, but best-practices call for me to group them all in the same directory anyway, so it is quite a bit better than what I had). I don't really know sed and awk, so it will take some time to figure out how to parse the text, but at least now I don't have to click in banshee 1000 times to get the info.
Code:
#!/bin/bash
# It's not pretty, but I think it's better than what I've got now!
echo "This script requires mid3v2. If nothing happens, make sure it is installed. Was already installed on my system so I have no idea how it will react if you don't have it installed."
echo "As coded, the script requires being in the dir you want the output from"
#This part will rename all your files and dir and take the spaces out and replace them with underscores.
for f in *; do
file=$(echo $f | tr ' ' _)
[ ! -f $file ] && mv "$f" $file
done
cd .
for file in `dir -d *` ; do
mid3v2 -l "$file" >> test.txt
done
Bookmarks