Skip to content

Instantly share code, notes, and snippets.

@yorkxin
yorkxin / wordpressdotcom.rb
Created November 25, 2011 18:29
Wordpress.com (XML export) to Octopress importer. See http://git.io/x8yapw for change notes.
# coding: utf-8
# Original File: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb
# Modified by Yu-Cheng Chuang <ducksteven@gmail.com>
# Licensed under MIT License (same as the original file)
# This version of wordpressdotcom.rb is compatible
# with the real-world Wordpress.com export file, which:
#
# - Makes paragraphs (<p>) and line breaks (<br>)
@tnmt
tnmt / wp-xml-octopress-import.rb
Created November 15, 2011 12:31
Import XML of Wordpress to Octopress
# -*- coding: utf-8 -*-
require 'fileutils'
require 'date'
require 'yaml'
require 'uri'
require 'rexml/document'
include REXML
doc = Document.new File.new(ARGV[0])