Quick Script: Wordpress to Markdown
Jul 01, 2017
Recently I had the occasion to convert a bunch of wordpress posts over to a
Jekyll blog, including a bunch of pictures that I sent out for third party
hosting. I wrote a quick/simple script and I’m embedding it via
github-gists
below. It downloads a page via http, then splits it into the
content
and then an array of pictures. Note that you’d have to change this
if you had pictures interspersed throughout your post, instead of all at the
end. I don’t intend this to be a catch-all or anything, but hopefully it’s
useful to someone. Requires BeautifulSoup
be installed and
imgur-uploader
be installed and working on the path. It only
converts/posts once per hour to avoid imgur
’s upload limits. I hope this
helps someone!