Some quickly cobbled together plugins. They should provide sufficient information to get you started.