View Single Post
Old 05 October 2004, 07:47 pm   #14
Speek
Member
 
Join Date: Aug 2004
Location: The Netherlands
Posts: 7
Default

I use this script. It will tag the mpc files, but only if your wav files are named like: /some/path/artist - album/tracknr - title

Code:
#!/bin/sh



mppenc_options="--braindead --xlevel --deleteinput"



echo "Current mppenc options: $mppenc_options"

echo -n "Okay to use these? [Y/n] "

read okay

[ -z "$okay" ] && okay=y



if [ "$okay" = "n" ]

then

	mppenc_options=""

	while [ -z "$mppenc_options" ]

	do

  echo -n "Enter new mppenc options ('h' for help): "

  read mppenc_options

  if [ "$mppenc_options" = "h" ]

  then

  	mppenc --longhelp

  	echo

  	mppenc_options=""

  fi

	done

elif [ ! "$okay" = "y" ]

then

	echo "Wrong answer. Bye!"

	exit 1

fi





dir=`pwd`

artalb=`basename "$dir"`

artist=`echo "$artalb" | sed -e "s/ - /t/" | cut -f 1`                                  

album=`echo "$artalb" | sed -e "s/ - /t/" | cut -f 2`



for file in *.wav

do                                            

	tracknr=`echo "$file" | sed -e "s/ - /t/" | cut -f 1`

	title=`echo "$file" | sed -e "s/ - /t/" | cut -f 2 | cut -d "." -f 1`



	nice mppenc $mppenc_options --artist "$artist" --album "$album" --title "$title" --track $tracknr "$file"

done



exit 0
edit: I changed the options so it will use braindead profile and delete the wav files (!).
Speek is offline   Reply With Quote