I frequently found myself working this out manually, so I wrote a little code to do it for me. If you'd like to see how the site came together, check it out on GitHub. If you're into this kind of thing, you may like to read my music blog.