#!/bin/sh # Long obsolete, but the way I used to organise music might be of interest. I # name my songs "Title - Artist.type", but this script creates symlinks in # "Artist - Title.type" form as well so I could quickly use tab completion to # find a named song or artist. cd ~/Sound/mpeg3 || exit 20 rm -rf lists/bytitle lists/byartist mkdir lists/bytitle lists/byartist find /30g/mpeg3/songs /30g/mpeg3/albums -type f | perl -ne 'chop; $n=$_; s/^.*\///; s/^[0-9-]+ // if ($n =~ /albums/); $b=$_; symlink $n, "lists/bytitle/$b"; s/(.*) - (.*).(mp3|ogg)/$2 - $1.$3/i; symlink $n, "lists/byartist/$_";' find ~/Sound/mpeg3/lists/byartist -follow -type f | sort -t / +7 >~/.xhippo/playlists/ByArtist find ~/Sound/mpeg3/lists/bytitle -follow -type f | sort -t / +7 >~/.xhippo/playlists/ByTitle cd cp .xhippo/playlists/ByArtist .xmms/xmms.m3u cat >.mp3blasterplaylist <>.mp3blasterplaylist grep -i '\.mp3$' .xhippo/playlists/ByTitle >Code/funk/playlist