Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lawrencec/wordpress_to_rst

Simple converter that converts Wordpress xml format to json with optional Rst for HTML content
https://github.com/lawrencec/wordpress_to_rst

Last synced: 2 months ago
JSON representation

Simple converter that converts Wordpress xml format to json with optional Rst for HTML content

Awesome Lists containing this project

README

        

# Wordpress to Rst convertor

Converts Wordpress blog posts in wordpress xml format to Restructured Text.

## Help:
Run on commandline. Use -h option to view command line options

-h, --help show this help message and exit
-f FILE, --file=FILE Wordpress export xml file
-o OUTFILE, --outfile=OUTFILE Filename to save output to (JSON)
-c, --convert perform conversion to RestructedText
-s, --split-output Split data into separate files eg -categories.json, -tags.json, -posts.json
-d, --dry-run Performs a dry run, will not save any output

## Examples:

The following example will convert a wordpress xml file to json and save it in json format in a file called myblog.json

python parse.py -f myblog.xml -o myblog.json

This will convert to json and save split out the categories, tags and posts into separate files.

python parse.py -f myblog.xml -o myblog.json -s

The following will split and convert to json with any html fields converted to Rst format.

python parse.py -f myblog.xml -o myblog.json -c -s

## Requirements:

The Rst conversion is done via pandoc, so this will need to be installed if conversion to Rst is required.