device

package
v0.0.0-...-09b491c Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Name    string
	Content []byte
}

Document denotes a document / file (name + content)

type Documents

type Documents []Document

Documents denotes several documents

type Element

type Element struct {
	ID       string    `json:"id"`
	Name     string    `json:"name"`
	Type     string    `json:"type"`
	Children []Element `json:"children"`
}

type ExtraMetadata

type ExtraMetadata struct {
	LastColor      string `json:"LastColor"`
	LastTool       string `json:"LastTool"`
	ThicknessScale string `json:"ThicknessScale"`
}

type File

type File struct {
	Name string `json:"displayName"`
	ID   string `json:"id"`
}

type FileContentData

type FileContentData struct {
	ExtraMetadata  ExtraMetadata `json:"extraMetadata"`
	FileType       string        `json:"fileType"`
	FontName       string        `json:"fontName"`
	LastOpenedPage int           `json:"lastOpenedPage"`
	LineHeight     int           `json:"lineHeight"`
	Margins        int           `json:"margins"`
	PageCount      int           `json:"pageCount"`
	TextScale      int           `json:"textScale"`
	Transform      Transform     `json:"transform"`
}

type FileMetaData

type FileMetaData struct {
	Deleted          bool   `json:"deleted"`
	LastModified     string `json:"lastModified"`
	Metadatamodified bool   `json:"metadatamodified"`
	Modified         bool   `json:"modified"`
	Parent           string `json:"parent"`
	Pinned           bool   `json:"pinned"`
	Synced           bool   `json:"synced"`
	Type             string `json:"type"`
	Version          int    `json:"version"`
	VisibleName      string `json:"visibleName"`
}

type Folder

type Folder struct {
	Name    string             `json:"displayName"`
	ID      string             `json:"id"`
	Files   []File             `json:"files"`
	Folders map[string]*Folder `json:"folders"`
}

func (*Folder) Flatten

func (f *Folder) Flatten() []Element

type Remarkable

type Remarkable interface {

	// Close closes the device
	Close() error

	// Frame retrieves a single frame
	Frame() ([]byte, error)

	// NewStream adds a new stream recipient on the provided writer
	NewStream(w io.Writer) error

	// Dimensions returns the width + height of the underlying frame(buffer)
	Dimensions() (int, int)

	// Upload uploads a file (PDF / ePUB) to the device tree
	Upload(docs ...Document) error

	// FileTree returns a tree structure of all files on the device
	FileTree() (*Tree, error)

	// Download retrieves a file (PDF / ePUB) from the device tree
	Download(id string) (*Document, error)
}

Remarkable denotes a generic Remarkable device

type Transform

type Transform struct {
	M11 int `json:"m11"`
	M12 int `json:"m12"`
	M13 int `json:"m13"`
	M21 int `json:"m21"`
	M22 int `json:"m22"`
	M23 int `json:"m23"`
	M31 int `json:"m31"`
	M32 int `json:"m32"`
	M33 int `json:"m33"`
}

type Tree

type Tree = Folder

Directories

Path Synopsis
Package common provides functionality shared by all Remarkable devices
Package common provides functionality shared by all Remarkable devices

Jump to

Keyboard shortcuts

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