Method: WP2Middleman::CLI#wp2mm
- Defined in:
- lib/wp2middleman/cli.rb
#wp2mm(wp_xml_export = nil) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/wp2middleman/cli.rb', line 11 def wp2mm(wp_xml_export = nil) return usage unless wp_xml_export unless File.file? wp_xml_export error "#{wp_xml_export} is not a valid file" exit 1 end include_fields = [:include_fields] || [] WP2Middleman.migrate(wp_xml_export, [:body_to_markdown], include_fields) say "Successfully migrated #{wp_xml_export}", "\033[32m" end |