Wrote a plugin. Got my bearings after reading this.
Might not be the best way to do this but here it is.