Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lawrencec/wordpress_to_rst
- Owner: lawrencec
- Created: 2010-04-12T21:27:12.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2012-06-14T20:04:06.000Z (over 12 years ago)
- Last Synced: 2024-10-08T13:33:34.971Z (4 months ago)
- Language: Python
- Homepage: http://github.com/lawrencec/wordpress_to_rst#readme
- Size: 113 KB
- Stars: 2
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
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.