d=`date +"%Y-%m-%d"` sox -t coreaudio "Soundflower (2c" -q ~/$d.mp3 trim 0 3:00:0 channels 1 mid3v2 --artist="Lewis and Floorwax" --album=$d $d.mp3
Toss into cron and you're good to go. I needed to move this process to a Linux box, due to domestic contention for computer resources. This is a little trickier, and not well documented anywhere. Make sure you have all of the above software, except Soundflower of course. I'm averse to adding software that I don't need on any box (due to maintenance and security concerns). so wanted to use the built-in ALSA technology. Fire up alsamixer, use the tab and arrow keys to select "Capture", and hit the space bar to get the red "CAPTURE" below it. Arrow to the "Mix" and hit the space bar to put a red "CAPTURE" there too.
The Sox incantation then becomes:
Hope this helps someone. On yet another system, I use arecord and lame:
sox -t alsa hw:0,0 -q ~/$d.mp3 trim 0 3:00:0 channels 1
arecord -q -t wav -d 14400 -r 16000 -f S16_LE | lame - file.mp3