I had written a script quite a while back which did this.
It was running from cron so I could keep up with some of the radio shows I missed from the El Lay area.
Alas... a hard drive crash put an end to that.
It also resulted in my loss of the original script --thus prompting my recent investigation of source code management.

Anyway, I rewrote the script.
It's now NEW AND IMPROVED.
Since I've got an iPod now and not every stream is mp3, I've written it so that it can convert (on the fly) to iPod aac.

If you need to ask how this works or what it's for, it's probably not for you.
Nothing to see here folks, move along...

Been experimenting a lot with audio since my brother gave me an iPod shuffle for my birthday (thanks again Dan.)
After the ordeal of just getting the thing to work on Linux, I've been trying to find a way to squeeze the highest quality sound onto the thing.

Sniffing around I've found that there are several different losslessly compressed audio formats.
As I found losslessly compressed audio files in one format or another I had taken to writing scripts to convert them to aac using the FAAC encoder.

I went through a process of discovery where I would find some files in one format, write a script to convert them, then find files in another format and adapt the script to convert these as well.
After doing this several times I decided to just re-write the script one more time.
But this time to write it in a modular fashion, putting each type of conversion to wav into it's own subroutine so that I could more easily add other's in the future.

I had a bunch of fancy code that parsed the equivalent of the id3 tags for each of the various formats and then tagged the aac files.
Sometimes it worked, sometimes it didn't (sometimes the info wasn't even there.)
Since I couldn't get it to work consistently I shitcanned that section of code.
Now there's a routine that prompts for the information.
Stuff like: artist, album, genre, etc.
Track title and number are parsed from the filenames.

To use the script put it somewhere in your path, install the prerequisite software and run it. You have to do a little work up front to put the files into the format it likes.
Make them look like this:

Usually you wouldn't have them all mixed up in the same folder like this. But if you do it will still work. Provided it's all the same album as the script will be prompting for artist, album name, etc.