Heavily inspired by websequencediagrams.com, who offer a serverside solution. We use Jison to parse the text, and Raphaël to draw the image.