Search this site


Metadata

Articles

Projects

Presentations

Music sorting

My music collection was fairly randomly sorted. Until today. In the past, I had ripped some of my CDs to random locations which inevitably moved around over the years, for whatever reason. This made finding a particular song annoying without something that already had parsed the ID3 tags.

I tried to use iTunes to 'consolidate' my library into /path/[artist]/[album]/[title].mp3 but for whatever reason it would get some percentage complete and then die. I assume it has something to do with strange non-alphanumeric upper-ascii characters in filenames and iTunes was using files over a samba share.

Whatever the reason, I had to fix this myself. I have two scripts now. One parses the ID3 tags and stores them in a file, and one uses that data to organize songs into the aforementioned directory structure.

Scripts: findsongs.py and migratemusic.py

Get a screen terminfo entry on Solaris.

Solaris doesn't have a 'screen' terminfo entry by default, so you might notice that if you set TERM to 'screen' things don't work right.

Screen itself comes with a termcap entry. If you install using the sunfreeware package, the termcap file will be: /usr/local/doc/screen/terminfo/screencap

We need to convert this to a terminfo file and compile it. All tools used below come standard with Solaris.

# captoinfo screencap > screen.ti
"screencap", line 2, col 24, terminal 'screen': unknown capability 'G0'
"screencap", line 18, col 58, terminal 'screen': unknown capability 'AX'
# tic screen.ti
# ls -d /usr/share/lib/terminfo/s/screen* 
/usr/share/lib/terminfo/s/screen     /usr/share/lib/terminfo/s/screen-w
Note: Make sure you're running /usr/bin/tic, not /usr/local/bin/tic (comes with some sunfreeware package). The /usr/local/bin/tic will write it's terminfo file to /usr/local/share/terminfo which isn't used by any shell I've tried, not by default anyway. Something to keep in mind.

Now you've got a screen terminfo entry. Setting your TERM to 'screen' should work now, which is the default inside new screen sessions.