This is basically a port of the changelog code with some better comments.
Fixes: #37 (closed)
Cc: @bradwood @brbialek