Sunday, 20 June 2010

Archive your CD collection using the CLI

Yes, there are programs around called abcde which turns out to be a very handy CD ripper. And using a small while loop you can basically rip your whole CD collection automatically. Apart from inserting the CD's of course ;-).


$ sudo apt-get install abcde id3v2
$ while true; do abcde -a cddb,read,encode,tag,move,playlist,clean -d /dev/cdrom -o mp3 -V -x -N; sleep 5; done
# Now insert your CD's if your trays open and close it to continue ripping
# Press CTRL+C when done ripping


Note: The recent version of Ubuntu seems to have those 'smart' popup screen on CD inserts, tell them to do-nothing-and-never-prompt-again as they can be annoying while you continue working on your computer while ripping the CD's.

Now you are done you can make yourself a playlist in a breeze:
$ find -P . -type f  -iname '*.mp3' > fullList.m3u

And while we are working on the CLI anyway, use the nvlc (part of $ sudo apt-get install vlc) to play your music in Random mode:
$ nvlc -Z fullList.m3u




Enjoy your music!