enex

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes struct {
	Timestamp string `xml:"timestamp"`
	Filename  string `xml:"file-name"`
	SourceUrl string `xml:"source-url"`
}

Attributes of the resource

type Content

type Content struct {
	Text []byte `xml:",innerxml"`
}

Content of Evernote Notes

type Data

type Data struct {
	XMLName  xml.Name `xml:"data"`
	Encoding string   `xml:"encoding,attr"`
	Content  []byte   `xml:",innerxml"`
}

Data object in base64

type Export

type Export struct {
	XMLName xml.Name `xml:"en-export"`
	Date    string   `xml:"export-date,attr"`
	Notes   []Note   `xml:"note"`
}

Export represents Evernote enex file structure

func Decode

func Decode(data io.Reader) (*Export, error)

Decode will return an Export from evernote

type Note

type Note struct {
	XMLName    xml.Name   `xml:"note"`
	Title      string     `xml:"title"`
	Content    []byte     `xml:"content"`
	Updated    string     `xml:"created"`
	Created    string     `xml:"updated"`
	Tags       []string   `xml:"tag"`
	Attributes string     `xml:"note-attributes"`
	Resources  []Resource `xml:"resource"`
}

Note is one note in Evernote

type Recognition

type Recognition struct {
	XMLName xml.Name `xml:"recoIndex"`
	ObjID   string   `xml:"objID,attr"`
	ObjType string   `xml:"objType,attr"`
}

Recognition for the resource

type Resource

type Resource struct {
	ID          string
	Type        string
	Data        Data       `xml:"data"`
	Mime        string     `xml:"mime"`
	Width       int        `xml:"width"`
	Height      int        `xml:"height"`
	Attributes  Attributes `xml:"resource-attributes"`
	Recognition []byte     `xml:"recognition"`
}

Resource embedded in the note

Jump to

Keyboard shortcuts

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