These could be used for converting HTML to Markdown for use as literate CoffeeScript. That way, you could just write an HTML page with your code in <pre>
sections, and push it through a toolchain that would compile it to JavaScript:
script.min.js: script.js uglifyjs $< > $@ script.js: script.coffee.md coffee -c $< script.coffee.md: script.html html2markdown $< > $@
Now we just need makefile2svg...
Of course, if you're not actually using the .coffee.md
file anywhere, you can just go ahead and write a node script that uses jQuery (after parsing the HTML5) and CoffeeScript itself to yank <pre>
sections out of a file, concatenate them together, and then compile them to JavaScript. Ought to be quite a small script.
(And yes, of course html2text.)
"There's the right way, the wrong way, and the XSLT way."
XSLT sounds like it might be a possible match, though then you'd have to make sure you emit XHTML which is always a bit nauseating. Some really crazy guy is going from Markdown to HTML using XSLT, instead of from XHTML to Markdown.
See also filetype:xsl Markdown.