Markdown to WordPress Format

When I discovered MarkDown I was in love, it was very nice to discover an easy, clean, well-thought-out markup language. I wanted a way to be able take my detailed notes, have them easy to read, and then to be able post them here on the blog that would be in a nice WordPress format. Yesterday, I wrote about discovering pandoc which enables a person to write in markdown and have it converted to HTML. To be able to use the HTML code created by pandoc in WordPress it needed to be slightly edited and cleaned up. Therefore,… I created a bash script for it.

Example conversion from MarkDown format to WordPress format

It works pretty good. Basically it removes tags for paragraphs (<p>), cleans up code blocks, improves formating, as well as doing a few other things. I haven’t gone through all permutations that pandoc conversion can do so a few thing swill be left out, but otherwise it should work for most things. If anything needs to be added please let me know.

Welcome to linuxtidbits.

linuxtidbits is a place for common bits of Linux knowledge. Linux is a good operating system with good people. Being part of Linux, to me, means being a part of something that everyone can contribute to.