Skip to content

Instantly share code, notes, and snippets.

View thanhqtran's full-sized avatar

Quang-Thanh Tran (tedd) thanhqtran

View GitHub Profile
@thanhqtran
thanhqtran / wordpressxml2jekyll.rb
Last active February 10, 2022 07:37 — forked from markoa/wordpressxml2jekyll.rb
Script to export posts from a Wordpress XML file to Jekyll (Textile) files. Collects comments in a YAML file too.
#!/usr/bin/env ruby
# Input: WordPress XML export file.
# Outputs: a series of Textile files ready to be included in a Jekyll site,
# and comments.yml which contains all approved comments with metadata which
# can be used for a Disqus import.
require 'rubygems'
require 'hpricot'
require 'html2markdown'