Literate programming is a programming paradigm introduced by Donald Knuth in which a program is combined with its documentation to form a single document. Tools are then used to extract the documentation for viewing or typesetting or to extract the program code so it can be compiled and/or run. While I have never been very enthusiastic about literate programming as a development methodology, I was recently inspired to explore these ideas as they relate to the sort of technical writing I do for this blog.
Posts for: #Markdown
Converting HTML to Markdown
In order to import posts from Blogger into Scriptogr.am I needed to convert all the HTML formatting into Markdown. Thankfully there are a number of tools out there that can help with this task.
MarkdownRules. This is an online service build around Markdownify. It’s a slick site with a nice API, but the backend wasn’t able to correctly render
<pre>blocks. Since I’m often writing about code, my posts are filled with things like embedded XML and#include <stdio.h>, so this was a problem.