Skip to content

amanessinger/wordpress-xml-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WordPress XML Parser

Go Report Card Docs License

Overview

The wordpress-xml-go package provides WordPress XML parser.

Documentation

Documentation is provided using godoc and available on GoDoc.org.

Installation

Installing any of the packages will install the entire library. For example:

$ go get github.com/grokify/wordpress-xml-go

Usage

import (
	"github.com/grokify/wordpress-xml-go"
)

func main() {
	wp := wordpressxml.NewWordpressXml()
	err := wp.ReadXml("myblog.wordpress.2016-08-13.xml")
	if err != nil {
		panic(err)
	}
	wp.WriteMetaCsv("articles.csv")
}

Notes

Since WordPress uses content:encoded and excerpt:encoded, Go's XML built-in parser treats both of these as the field encoded in different namespaces. This parser retrieves these fields as an array of encoded and then moves the data into the Content property.

Contributing

Features, Issues, and Pull Requests are always welcome.

To contribute:

  1. Fork it ( http://github.com/grokify/wordpress-xml-go/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Please report issues and feature requests on Github.

License

WordPress XML Parser is available under the MIT license. See LICENSE for details.

WordPress XML Parser © 2016 by John Wang

About

WordPress XML export parser in Go. The parser has since been incorporated into https://github.com/amanessinger/wordpress-xml-to-hugo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%