Using fountain.io as a transform script to convert plain text in 'fountain' format into html, then some light javascript to extract character names, and add some highlighting and internal navigation links.
See the sample EPUB embedded in the epub.js renderer below.