Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
/ wp2harp Public archive

Simple migration from WordPress to Harp

Notifications You must be signed in to change notification settings

peremenov/wp2harp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordpress to Harp

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.


Setup

$ git clone https://github.com/peremenov/wp2harp.git
$ cd wp2harp
$ npm install

Usage

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/

Internal help

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

Todo

  • 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