This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g} | |
require File.join(File.dirname(__FILE__), "downmark_it") | |
module WordPress | |
def self.import(database, user, password, table_prefix = "wp", host = 'localhost') | |
db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8') | |
%w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder} |