cmd

package
v0.0.0-...-88a2583 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "exhume",
	Short: "Import a LiveJournal backup to the Hugo site generator",
	Long: `This tool reads files generated by the ljdump tool and
transforms them into post entries for the Hugo site generator (gohugo.io)

`,
}
View Source
var ShowBanned bool
View Source
var ShowComments bool

Cobra command metadata for the post subcommand

View Source
var ShowDeleted bool
View Source
var ShowSpam bool

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type LiveJournalComment

type LiveJournalComment struct {
	Subject  string `xml:"subject"`
	User     string `xml:"user"`
	Id       int32  `xml:"id"`
	ParentID string `xml:"parentid"`
	State    string `xml:"state"`
	Date     string `xml:"date"`
	Body     string `xml:"body"`
}

This is a rough mapping from XML to Go of the useful fields in an LJ comment

type LiveJournalComments

type LiveJournalComments struct {
	XMLName  xml.Name             `xml:"comments"`
	Comments []LiveJournalComment `xml:"comment"`
}

type LiveJournalPost

type LiveJournalPost struct {
	XMLName          xml.Name `xml:"event"`
	Itemid           int64    `xml:"itemid"`
	Subject          string   `xml:"subject"`
	Eventtime        string   `xml:"eventtime"`
	Event_timestamp  uint64   `xml:"event_timestamp"`
	Url              string   `xml:"url"`
	Current_mood     string   `xml:"current_mood"`
	OptPreformatted  int32    `xml:"opt_preformatted"`
	Current_music    string   `xml:"current_music"`
	Current_location string   `xml:"current_location"`
	Taglist          string   `xml:"props>taglist"`
	Reply_count      int32    `xml:"reply_count"`
	Picture_keyword  string   `xml:"picture_keyword"`
	EventText        string   `xml:"event"`

	Commentary LiveJournalComments `xml:"comments"`
}

This is a rough mapping from XML to Go of the useful fields in an LJ post

Jump to

Keyboard shortcuts

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