exportnotes

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	ID       string
	Modified time.Time
}

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. A folder or a note has its ID and its last change in Modified: a duplicate title becomes "Title (2)" and a / a -, so the path alone does not lead back to the item.

Jump to

Keyboard shortcuts

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