Some useful scripts

Andrea Landaker qirien at icecavern.net
Tue Feb 3 11:23:18 EST 2004


Greetings, and thanks for a wonderful DDR program!  I've tried lots of them, 
but I like pyDance the best.  :-)

Just thought I'd share some scripts that I've found useful when adding new 
songs to my collection.  In each case, you should run them from your .pydance 
directory (or wherever you keep your songs).  I wrote these scripts for 
Linux, but you could probably run them under cygwin, too.  Maybe someone has 
already submitted something like this, but I couldn't find it.  :-)

If you've got a bunch of MP3s in your collection that you want to convert to 
OGGs, you can use this script to convert them all quickly (I haven't noticed 
any timing issues or problems with doing this).  This will both convert the 
audio files and change the filename in the step file.

find -name "*.dwi" -exec perl -pi -e 's/\.mp3/\.ogg/g' '{}' \;
find -name "*.sm" -exec perl -pi -e 's/\.mp3/\.ogg/g' '{}' \;
mp32ogg --delete .

Many times people will include both a DWI and an SM file with the same steps 
for the same song, and it shows up twice in pyDance.  This little script 
deletes all the DWI files where there is an SM file with the same name:

find -type f -name "*.sm" -print0 | sed -e 's/\.sm/\.dwi/g' | xargs -0 
--verbose -i ls -Q "{}" 2> /dev/null | xargs --verbose -p -n 1 rm

Once again, thanks for a great program!

-- 
Andrea Landaker
http://www.icecavern.net/~qirien




More information about the pyddr-discuss mailing list