converter

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Badges file name
	Badges = "Badges.xml"
	// Comments file name
	Comments = "Comments.xml"
	// PostHistory file name
	PostHistory = "PostHistory.xml"
	// PostLinks file name
	PostLinks = "PostLinks.xml"
	// Posts file name
	Posts = "Posts.xml"
	// Tags file name
	Tags = "Tags.xml"
	// Users file name
	Users = "Users.xml"
	// Votes file name
	Votes = "Votes.xml"
)
View Source
const WriteBufferSize = 8388608

WriteBufferSize bytes (8MB)

Variables

This section is empty.

Functions

func Convert

func Convert(cfg Config) (err error)

Convert xml files from sourcePath and store csv result file(s) to the storeDir func Convert(sourcePath string, storeToDir string, skipHTMLDecoding bool) (err error) {

Types

type Config

type Config struct {
	ResultFormat     string
	SourcePath       string
	StoreToDir       string
	SkipHTMLDecoding bool
}

Config Initial config handler

type XMLIterator

type XMLIterator struct {
	// contains filtered or unexported fields
}

XMLIterator struct

func NewIterator

func NewIterator(file *os.File) (xi *XMLIterator)

NewIterator creates XML iterator

func (*XMLIterator) Decode

func (xi *XMLIterator) Decode(encoder *encoders.Encoder) error

Decode fill encoder fields

func (*XMLIterator) Next

func (xi *XMLIterator) Next() bool

Next iterate through XML document

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL