notesnook

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportData

type ExportData struct {
	Version       float64 `json:"version"`
	Type          string  `json:"type"`
	Date          int64   `json:"date"`
	Data          string  `json:"data"`
	Hash          string  `json:"hash"`
	HashType      string  `json:"hash_type"`
	Compressed    bool    `json:"compressed"`
	Encrypted     bool    `json:"encrypted"`
	FileName      string
	DebugFileName string
}

func ValidateBackupFiles

func ValidateBackupFiles(zf *zip.ReadCloser) ([]ExportData, error)

type From

type From struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

type Metadata added in v0.0.5

type Metadata struct {
	Hash     string `json:"hash"`
	HashType string `json:"hashType"`
	Filename string `json:"filename"`
	Type     string `json:"type"`
}

type Nook

type Nook struct {
	ID           string      `json:"id"`
	Type         Type        `json:"type"`
	Title        string      `json:"title,omitempty"`
	Pinned       bool        `json:"pinned,omitempty"`
	Topics       []Topic     `json:"topics,omitempty"`
	DateCreated  int64       `json:"dateCreated"`
	DateModified int64       `json:"dateModified"`
	DateEdited   int64       `json:"dateEdited,omitempty"`
	Synced       bool        `json:"synced"`
	Description  string      `json:"description,omitempty"`
	ContentID    string      `json:"contentId,omitempty"`
	Headline     string      `json:"headline,omitempty"`
	Tags         []string    `json:"tags,omitempty"`
	Locked       bool        `json:"locked,omitempty"`
	Favorite     bool        `json:"favorite,omitempty"`
	LocalOnly    bool        `json:"localOnly,omitempty"`
	Readonly     bool        `json:"readonly,omitempty"`
	NoteID       string      `json:"noteId,omitempty"`
	Data         interface{} `json:"data,omitempty"`
	NoteIDs      []string    `json:"noteIds,omitempty"`
	From         From        `json:"from,omitempty"`
	To           To          `json:"to,omitempty"`
	Notebooks    []Notebook  `json:"notebooks,omitempty"`
	Metadata     Metadata    `json:"metadata,omitempty"`
}

func ProcessNotesnookExportData

func ProcessNotesnookExportData(file ExportData) ([]Nook, error)

type Notebook

type Notebook struct {
	ID     string   `json:"id"`
	Topics []string `json:"topics"`
}

type NotebookInfo added in v0.0.7

type NotebookInfo struct {
	ID        uuid.UUID
	NookID    string
	Title     string
	Notes     []string
	CreatedAt string
	UpdatedAt string
	Parent    *uuid.UUID
}

type To

type To struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

type Topic

type Topic struct {
	ID          string `json:"id"`
	Type        string `json:"type"`
	NotebookID  string `json:"notebookId"`
	Title       string `json:"title"`
	DateCreated int64  `json:"dateCreated"`
	DateEdited  int64  `json:"dateEdited"`
}

type Type

type Type string
const (
	TypeNotebook   Type = "notebook"
	TypeNote       Type = "note"
	TypeTipTap     Type = "tiptap"
	TypeRelation   Type = "relation"
	TypeSettings   Type = "settings"
	TypeAttachment Type = "attachment"
)

Jump to

Keyboard shortcuts

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