Zamansky 41: Pandoc

Mike Zamansky has the latest video in his Using Emacs Series up. This time it’s about leveraging Pandoc to deal with document interchange. I’ve written about Pandoc before but usually in the context of converting an Org document to some other format, such as Word docx. In this video, Zamansky goes in the other direction and converts an HTML document to Org mode.

Here’s the problem Zamansky is trying to solve: He has a lab assignment as an HTML file that he would like to modify to better fit a class he’s teaching. He could, of course, just edit the original file but the HTML is really ugly—it looks like it was generated by some other program—and Zamansky didn’t want to waste his time and suffer the pain of working with it. Instead, he used Pandoc to convert the HTML to Org, which is easy to understand and edit.

He could, of course, export (or convert with Pandoc) the edited Org file back to HTML or whatever other format he needed but all his assignments are handled through GitHub so he just uploaded the Org file and let GitHub worry about the formatting. All in all, a nice solution to the common but annoying problem of needing to edit a file in an inconvenient format.

In the comments, Zamansky says that before working on this problem, he didn’t realize Pandoc could convert to Org. I didn’t either but I always assume—not always but usually correctly—that Pandoc can convert between any two formats that I’m apt to come across.

The video is short, just 4 minutes, 36 seconds, so it should be easy to find time for it.

This entry was posted in General and tagged , . Bookmark the permalink.