exportnotes

package
v0.0.0-...-4d14c86 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const FilesDir = "_files"

FilesDir holds the images of the export, at its root.

Variables

View Source
var (
	ErrFolderNotFound = errors.New("folder not found")
	ErrNotFound       = errors.New("item not found")
)

Functions

func Process

func Process(ctx context.Context, db bun.IDB, folderID string, ids ...string) *run

Process exports the live content of a folder ("" = everything) as markdown files: a folder is a directory, a note is <title>.md with its text, links to notes written back as [[Title]], images copied into FilesDir and cited by a relative path. Given ids, it exports these items instead, a folder with what it holds.

Types

type File

type File struct {
	Path    string
	Dir     bool
	Content string
	Key     string
}

File is one entry of the export, its Path relative to the export directory: a folder (Dir), a note, or an image whose bytes the writer reads from Silo at Key.

Jump to

Keyboard shortcuts

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