enex

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 6 Imported by: 0

README

go-enex

evernote .enex file parser in go

Example

TODO

  • en-crypt
  • en-todo
  • en-media

Refer

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:"updated"`
	Created    string         `xml:"created"`
	Tags       []string       `xml:"tag"`
	Attributes NoteAttributes `xml:"note-attributes"`
	Resources  []Resource     `xml:"resource"`
}

Note is one note in Evernote

type NoteAttributes

type NoteAttributes struct {
	Source            string `xml:"source"`
	SourceApplication string `xml:"source-application"`
	Latitude          string `xml:"latitude"`
	Longitude         string `xml:"longitude"`
	Altitude          string `xml:"altitude"`
	Author            string `xml:"author"`
	SourceUrl         string `xml:"source-url"`
}

NoteAttributes contain the note metadata

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