Sha256: 2b3627a5264035c78429bd10c180db13979bcdf8caba7cdf2ddcbd8739a46efa

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

require 'nokogiri'
require 'open-uri'
require 'fileutils'
require 'json'

require_relative 'blog'
require_relative 'author'
require_relative 'post'
require_relative 'category'
require_relative 'tag'
require_relative 'post_category_domain'
require_relative 'post_attachment'
require_relative 'post_author'

module Contentful
  module Exporter
    module Wordpress
      class Export
        attr_reader :wordpress_xml, :settings

        def initialize(settings)
          @settings = settings
          @wordpress_xml = Nokogiri::XML(File.open(settings.wordpress_xml))
        end

        def export_blog
          Blog.new(wordpress_xml, settings).blog_extractor
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wordpress-exporter-0.2.0 lib/wordpress/export.rb
wordpress-exporter-0.1.0 lib/wordpress/export.rb