README.md in wp2middleman-0.0.1 vs README.md in wp2middleman-0.0.2

- old
+ new

@@ -1,18 +1,18 @@ [![Build Status](https://travis-ci.org/mdb/wp2middleman.png?branch=master)](https://travis-ci.org/mdb/wp2middleman) +[![Code Climate](https://codeclimate.com/github/mdb/wp2middleman/badges/gpa.svg)](https://codeclimate.com/github/mdb/wp2middleman) # wp2middleman -Migrate the posts contained in a Wordpress XML export file to Middleman-style markdown files. +A command line tool to help move a Wordpress blog to [Middleman](http://middlemanapp.com). +wp2middleman migrates the posts contained in a Wordpress XML export file to Middleman-style markdown files. + ## Installation ``` -git clone http://github.com/mdb/wp2middleman -cd wp2middleman -bundle install -rake install +gem install wp2middleman ``` ## Commandline Usage ``` @@ -33,13 +33,20 @@ <li>list item</li> <li>another list item</li> </ul> ``` -### Optional parameters +## Optional Parameters ``` +--body_to_markdown converts to markdown +--include_fields=FIELD_ONE FIELD_TWO ETC includes specific fields in frontmatter +``` + +### Convert to Markdown + +``` wp2mm some_wordpress_export.xml --body_to_markdown true ``` Results in YYYY-MM-DD-Some-Title.html.markdown, formatted as such: @@ -53,5 +60,30 @@ The post content in markdown or text, depending on how it was saved to Wordpress. * list item * another list item ``` + +### Include specific post fields + +``` +wp2mm some_wordpress_export.xml --include_fields wp:post_id link +``` + +Pulls the specified key/values out of the post xml and includes it in frontmatter: + +``` +--- +title: 'Some Title' +date: YYYY-MM-DD +tags: foo, bar +wp:post_id: '280' +link: http://somewebsite.com/2012/10/some-title +--- + +<p>The post content in HTML or text, depending on how it was saved to Wordpress.</p> +<ul> +<li>list item</li> +<li>another list item</li> +</ul> +``` +