Documentation
¶
Index ¶
- Constants
- Variables
- func CodeToRGBA(b byte) color.RGBA
- func NewDevice(notebook *Notebook)
- func NewFooter(file *os.File, notebook *Notebook) error
- func NewHeader(file *os.File, notebook *Notebook) error
- type Device
- type Footer
- type Header
- type Layer
- type NoteFile
- type Notebook
- type Page
- type RawContent
Constants ¶
const ( ConvertPNG string = "Convert To PNG" ConvertPDF string = "Convert To PDF" ExtractTXT string = "Extract TXT" DeviceAuto string = "Infer by note" DeviceManta string = "Supernote Manta A5X2" DeviceNomad string = "Supernote Nomad A6X2" DeviceA5X string = "Supernote Manta A5X" DeviceA6X string = "Supernote Nomad A6X" )
Variables ¶
var ( ColorBlack = color.RGBA{0x00, 0x00, 0x00, 0xff} ColorTransparent = color.RGBA{0x00, 0x00, 0x00, 0x00} ColorDarkGray = color.RGBA{0x9d, 0x9d, 0x9d, 0xff} ColorLightGray = color.RGBA{0xc9, 0xc9, 0xc9, 0xff} ColorWhite = color.RGBA{0xff, 0xff, 0xff, 0xff} )
var A5X = &Device{ Name: "Supernote Manta X", Model: "A5X", PageWidth: 1404, PageHeight: 1872, HorizontalOrientation: 1270, ToRGBA: CodeToRGBA, }
var A5X2 = &Device{ Name: "Supernote Manta X2", Model: "A5X2", PageWidth: 1920, PageHeight: 2560, HorizontalOrientation: 1090, ToRGBA: CodeToRGBA, }
Tech Specs from https://supernote.com/products/supernote-manta
var A6X = &Device{ Name: "Supernote Nomad X", Model: "A6X", PageWidth: 1404, PageHeight: 1872, HorizontalOrientation: 1270, ToRGBA: CodeToRGBA, }
var A6X2 = &Device{ Name: "Supernote Nomad X2", Model: "A6X2", PageWidth: 1404, PageHeight: 1872, HorizontalOrientation: 1270, ToRGBA: CodeToRGBA, }
Tech Specs from https://supernote.com/products/supernote-nomad
Functions ¶
func CodeToRGBA ¶ added in v0.5.0
Types ¶
type Layer ¶
type NoteFile ¶ added in v0.2.0
type NoteFile struct {
// path of file on disk
Path string
// parent directories, if any
Parents string
}
func FilterFreshNotes ¶ added in v0.3.0
FilterFreshNotes takes in a list of [NoteFile]s `allNotes` and a string path of the destination `output`. It checks if, for a give .note file, any corresponding files in the output exist and are newer than that file; removing that file from the returned list.
func GetNotesFromDir ¶ added in v0.2.0
GetNotesFromDir takes in a string path `dir` and returns a list of `.note` files in the format of NoteFile struct.
if recurse is true, it includes the files in subfolders, and attaches the recursed subfolders as `Parents` in the NoteFile struct.
type Page ¶
type RawContent ¶ added in v0.5.0
type RawContent struct {
Elements []struct {
Label string `json:"label"`
} `json:"elements"`
}
This is (one of the keys from) what we get when we docode the Real-Time Recognition content.