Friday, April 13, 2007

Citrix and Debian Etch

I've been waiting a while and testing Debian etch before upgrading my main desktop from sarge to etch. So far the upgrade has went well. Instead of using ice weasel, I just loaded Firefox and Thunderbird with the lightning plug in for my calendar. One of the biggest hitches so far is adding my new citrix client so I can use my citrix server here at home. First off, libmotif3 isn't loaded and i havent been able to find it in the debian repository. If try to run ICA 10, you'll get libXm.so.3 errors due to no openmotif2.3 libs installed. No worrys. Go to here and download the libmotif2.2.3 deb and install it using dpkg. You will find the libXmso.3 in /usr/X11/lib directory. I've found its just as easy to create a soft link to it in /usr/lib. I had where it wasnt in my path. Download the new citrix ICA client for Linux. I keep with the rpm download and just convert it to deb using alien -d. Easy enough; You may have to hit the repository to get a few tools. I forget the list off the top of my head though. If you get the error: FONTLIST_DEFAULT_TAG_STRING., use xset fp rehash to reset your X fonts. You should have a working citrix client. All you need to do now is do your drive mappings. I map c: to my home dir and you should be all set.

Monday, April 02, 2007

Tips for massive decoding and tagging files

I recently had a dilemma of wanting to decode and tag my entire live show collection and upload them to my ampache music server. I've fiddled around trying to get ampache play my flac files and was so- so successful. Being that most of my older collection of shows was strictly shorten files, ampache has no means to play them at all. So I sat down and wrote some simple scripts to do all my dirty work of decoding and tagging and another to upload the show via ftp if anyone is interested in using them. Clearly linux / unix only.
To decode shorten, you must use a tool called shnwrapper available from sourceforge.
#!/bin/sh
folder=`pwd | cut -b 20-29`
picture=/home/share/panic.jpg
flac -d *.flac
#shnwrap -x *.shn
oggenc -q 8 *.wav
rm -f *.wav
mkdir $folder
cp *.ogg $folder
cp $picture $folder
cp -r $folder /home/share/wsogg
rm *.ogg
rm -rf $folder
exit 0


Here is a simple script to tag using the id3v2 tool.

#!/bin/bash
FILES=`pwd`/*.ogg
artist=Phish
year=`pwd | cut -b 20-23`
album=Live-Phish" "`pwd | cut -b 22-31`
count=0
for file in $FILES
do
count=`expr $count + 1`
echo "Track $count is [$file]"
id3v2 -T $count -g 17 --year $year -A "$album" -a $artist $file
done


I also have some scripts to determine whether the files are flac or shorten and run the right script on the files as needed. I used these scripts to rip about 250 gigs of music and upload it and works well. The only thing you have to watch is empty spaces in the file names. Im working on script to get rid of that as well. I'm sure ive borrowed code ive seen by googleing so any resemblance, many thanks to the original authors.