CmuScrobbler is a little python script that sends your songs to last.fm while you listen to them with cmus. It supports "now playing" and also caches the scrobbles while you are offline to upload them once you get online again.
CmuScrobbler has problems when it has to scrobble more than 5 files from the cache. It scrobbles songs multiple times. I'm working on a workaround and I have solved it in the git repository but right now it's not very beautiful code and there are some issues with partly scrobbled caches. It works better with the code from the repository but right now you have to make sure that cmuscrobbler terminates and does not get killed. When I have time, I'll make it nicer. Feel free to have a look at the messy code.
Check out the git-repository at github.
It is highly recommended that you use the code from the git-repository since version 1.0 is quite broken. It also has new features.