Simple migration from WordPress to Harp. Converts Wordpress XML export to Harp file structure in Markdown format keeping all paths, comments (in meta files) and drafts. It automaticly generates _data.json
files with nessesary meta information for each page.
$ git clone https://github.com/peremenov/wp2harp.git
$ cd wp2harp
$ npm install
First you need to take out Wordpress XML with:
- go to Wordpress Admin console
- choose
Tools
menu - click to
Export
- click button
Download export file
- save file
Example:
$ node wp2harp -c -d -s wordpress.2014-10-13.xml -t harpProject/
Usage: wp2harp [options]
Options:
-h, --help output usage information
-V, --version output the version number
-s, --source <path> path to Wordpress xml, required
-t, --target <path> path to save Harp file structure [current directory]
-c, --comments get comments from xml
-d, --drafts save drafts
-m, --meta keep metadata in separated .json files
- fix paragraph migration (Wordpress doesn’t use
<p>
tag) - fix index file
- make metadata assembler as separated component (for single use)
- add comments tree export
- add untit tests