Source code for this is available on GitHub.