Versions in this module Expand all Collapse all v0 v0.3.0 Sep 17, 2026 v0.2.0 Sep 16, 2026 v0.1.0 Sep 10, 2026 Changes in this version + const AssetsDir + const DeepLinkScheme + const DefaultDailyNoteTitlePattern + const DefaultDailyNotesDirectory + const DefaultDateNoteLocale + const DefaultMonthlyNoteTitlePattern + const DefaultMonthlyNotesDirectory + const DefaultTypstPreambleFolder + const DefaultWeeklyNoteTitlePattern + const DefaultWeeklyNotesDirectory + const InternalVaultDir + const MaxCommentAnchorTextLength + const MaxCommentAuthorLength + const NoteCommentsDir + const NoteCommentsSuffix + const PrimaryAttachmentsDir + const TaskFileTag + var AllFolders = []NoteFolder + var ErrAnchorNotFound = errors.New(...) + var ErrInvalidTemplate = errors.New("invalid template request") + var ErrPathEscape = errors.New("path escapes vault") + var ErrTaskGone = errors.New("task no longer exists at that location") + var LiveFolders = []NoteFolder + func AnchorForText(doc, anchorText string) (start, end int, text string, err error) + func AppendToBody(body, text string) string + func BodyHasLocalAsset(body string) bool + func BucketTasksByDueDate(tasks []Task) map[string][]Task + func BuildExcerpt(body string) string + func BuildOpenNoteDeepLink(relPath string) string + func ComposeTaskFile(in ComposeTaskFileInput) string + func ExtractOpenTaskBlocks(markdown string) (moved []string, rest string) + func ExtractTags(body string) []string + func ExtractWikilinks(body string) []string + func FolderSubpathOf(rel string, folder NoteFolder, primaryAtRoot bool, paths map[string]string) string + func ForwardTaskLines(markdown string, taskIndex int, linkToken string) (body string, moved []string) + func ForwardTaskSubtree(markdown string, taskIndex int, linkToken string) (body string, childLines []string) + func Frontmatter(body string) (block string, rest string, ok bool) + func InsertAtLineInBody(body string, lineNumber int, text string) string + func InsertTasksUnderTasksHeading(body string, taskLines []string) string + func IsAtomicWriteTempPath(p string) bool + func IsObsidianExcalidrawMarkdown(content string) bool + func IsObsidianExcalidrawPath(p string) bool + func IsOverdue(t Task, today time.Time) bool + func IsPathExcludedFromTasks(relPath string, excluded []string) bool + func IsTaskOpen(t Task) bool + func IsTypstPreamblePath(relPath, folder string) bool + func IsValidFolder(f NoteFolder) bool + func IsValidISODate(s string) bool + func LineOfOffset(doc string, units int) int + func MoveTaskLine(markdown string, fromTaskIndex, targetTaskIndex int, before bool) string + func NewCommentID() string + func NormalizeCommentAuthor(value string) string + func NormalizePriority(raw string) string + func NormalizeRelPath(rel string) string + func NormalizeSystemFolderPaths(raw map[string]string) map[string]string + func NormalizeTasksExcludedFolders(values []string) []string + func NoteTasksMode(val string) string + func ParseFrontmatterFields(block string) map[string][]string + func ParseFrontmatterScalars(raw string) (data map[string]string, body string) + func ParseTaskIndex(taskID, indexStr string) (int, error) + func PrependToBody(body, text string) string + func RemoveTaskLine(markdown string, taskIndex int) (line string, body string, ok bool) + func ReplaceInBody(body, find, replace string, all bool) (string, int, error) + func ResolveCommentAnchor(c NoteComment, doc string) (from, to int) + func ResolveFolderPath(folder NoteFolder, paths map[string]string) string + func RetitleLeadingHeading(body, title string) string + func RewriteWikilinksForRename(body string, notes []NoteMeta, oldPath, newTitle string) (string, int) + func SafeJoin(root, rel string) (string, error) + func SafeTemplateSlug(slug string) string + func SanitizeTitle(raw string) string + func SetTaskCancelled(markdown string, taskIndex int, cancelled bool) string + func SetTaskChecked(markdown string, taskIndex int, checked bool) string + func SetTaskDue(markdown string, taskIndex int, due string) string + func SetTaskField(markdown string, taskIndex int, key, value string) string + func SetTaskFileCancelled(body string, cancelled bool) string + func SetTaskFileField(body, key, value string) string + func SetTaskFileInProgress(body string, inProgress bool) string + func SetTaskFileStatus(body string, done bool, now time.Time) string + func SetTaskInProgress(markdown string, taskIndex int, inProgress bool) string + func SetTaskPriority(markdown string, taskIndex int, priority string) string + func SetTaskText(markdown string, taskIndex int, text string) string + func SetTaskWaiting(markdown string, taskIndex int, waiting bool) string + func SplitTaskID(taskID string) (rel string, indexStr string, err error) + func SplitWikilinkContent(content string) (target, anchor, alias string) + func StrPtr(s string) *string + func StripCodeContent(body string) string + func TaskFilePriorityValue(priority string) string + func ToPosix(p string) string + func TodayISO(now time.Time) string + func ToggleFileTaskInBody(body string, currentlyChecked bool, now time.Time) string + func ToggleTaskInBody(body string, targetIndex int, dialect TaskDialect) (next string, ok bool) + func UTF16Length(s string) int + func Unquote(v string) string + func UpdateFrontmatterFields(body string, updates []FrontmatterUpdate) string + func YAMLValue(value string) string + type AssetMeta struct + Name string + Path string + Size int64 + UpdatedAt int64 + type ComposeTaskFileInput struct + Body string + DateCreated string + Due string + Priority string + Scheduled string + Status string + Tags []string + Title string + type CustomTemplateFile struct + Raw string + SourcePath string + type DateNotePattern struct + Directory string + Locale string + TitlePattern string + type FolderEntry struct + Folder NoteFolder + Subpath string + type FrontmatterUpdate struct + Key string + Value *string + type NoteComment struct + AnchorEnd int + AnchorStart int + AnchorText string + Author string + Body string + CreatedAt int64 + ID string + NotePath string + ParentID string + ResolvedAt *int64 + UpdatedAt int64 + func NormalizeNoteComment(input NoteComment, notePath string, now int64) (NoteComment, bool) + func NormalizeNoteComments(raw []NoteComment, notePath string, now int64) []NoteComment + func ThreadRootOf(comments []NoteComment, id string) (NoteComment, bool) + type NoteCommentThread struct + Comment NoteComment + Replies []NoteComment + func ThreadNoteComments(comments []NoteComment) []NoteCommentThread + type NoteContent struct + Body string + type NoteFolder string + const FolderArchive + const FolderInbox + const FolderQuick + const FolderTrash + func FolderForRelativePath(rel string, paths map[string]string) (NoteFolder, bool) + func SystemFolderForDirName(name string, paths map[string]string) (NoteFolder, bool) + type NoteMeta struct + CreatedAt int64 + Excerpt string + Folder NoteFolder + Link string + Path string + Size int64 + Tags []string + Title string + UpdatedAt int64 + Wikilinks []string + func BacklinksIn(notes []NoteMeta, relPath string) []NoteMeta + func ResolveWikilink(notes []NoteMeta, target string) (NoteMeta, bool) + type OutlineItem struct + Level int + Line int + Text string + func Outline(body string) []OutlineItem + type ParseTasksOptions struct + Dialect TaskDialect + IncludeExcluded bool + type PeriodicNotes struct + Directory string + Enabled bool + LegacyPatterns []DateNotePattern + Locale string + RolloverUnfinishedTasks bool + TasksDueOnNoteDate bool + TemplateID string + TitlePattern string + type PrimaryNotesLocation string + const PrimaryNotesInbox + const PrimaryNotesRoot + type Task struct + Cancelled bool + Checked bool + CompletedDate string + Content string + Due string + DueInferred bool + Fields map[string]string + Forwarded bool + ID string + InProgress bool + Kind string + LineNumber int + Link string + NoteFolder NoteFolder + NoteTitle string + Priority string + RawText string + Scheduled string + SourcePath string + Status string + Tags []string + TaskIndex int + Waiting bool + func FilterTasksForDisplay(tasks []Task, showArchived bool) []Task + func InferDailyTaskDueDates(tasks []Task, dueByPath map[string]string) []Task + func ParseTasks(path, title string, folder NoteFolder, body string, opts ParseTasksOptions) []Task + func (t Task) MarshalJSON() ([]byte, error) + type TaskDialect int + const DialectApp + const DialectCLI + type TaskGroups struct + Cancelled []Task + Done []Task + Forwarded []Task + OverdueCount int + Today []Task + Upcoming []Task + Waiting []Task + func GroupTasks(tasks []Task, today time.Time) TaskGroups + type TextSearchMatch struct + Folder NoteFolder + LineNumber int + LineText string + Link string + Path string + Title string + type Vault struct + SyncTitleHeading bool + func Open(root string) (*Vault, error) + func (v *Vault) AbsPath(rel string) (string, error) + func (v *Vault) AppendToNote(rel, text string) (NoteMeta, error) + func (v *Vault) ArchiveNote(rel string) (NoteMeta, error) + func (v *Vault) Backlinks(rel string) ([]NoteMeta, error) + func (v *Vault) CreateFolder(folder NoteFolder, subpath string) error + func (v *Vault) CreateNote(folder NoteFolder, title, subpath string, body *string) (NoteMeta, error) + func (v *Vault) DeleteFolder(folder NoteFolder, subpath string) error + func (v *Vault) DeleteNote(rel string) error + func (v *Vault) DeleteTemplate(sourcePath string) error + func (v *Vault) DuplicateNote(rel string) (NoteMeta, error) + func (v *Vault) EmptyTrash() error + func (v *Vault) FolderDirName(folder NoteFolder) string + func (v *Vault) FolderOf(rel string) (NoteFolder, bool) + func (v *Vault) FolderRoot(folder NoteFolder) string + func (v *Vault) Info() VaultInfo + func (v *Vault) InsertAtLine(rel string, lineNumber int, text string) (NoteMeta, error) + func (v *Vault) ListAssets() ([]AssetMeta, error) + func (v *Vault) ListCSVFiles() ([]string, error) + func (v *Vault) ListDatabaseDirs() ([]FolderEntry, error) + func (v *Vault) ListFolders() ([]FolderEntry, error) + func (v *Vault) ListNotes() ([]NoteMeta, error) + func (v *Vault) ListTemplates() ([]CustomTemplateFile, error) + func (v *Vault) MetaFor(rel string) (NoteMeta, error) + func (v *Vault) MoveNote(rel string, target NoteFolder, targetSubpath string) (NoteMeta, error) + func (v *Vault) MoveToTrash(rel string) (NoteMeta, error) + func (v *Vault) PrependToNote(rel, text string) (NoteMeta, error) + func (v *Vault) PrimaryAtRoot() bool + func (v *Vault) PrimaryNotesLocation() PrimaryNotesLocation + func (v *Vault) ReadFileTextOrNull(rel string) (*string, error) + func (v *Vault) ReadNote(rel string) (NoteContent, error) + func (v *Vault) ReadNoteComments(rel string) ([]NoteComment, error) + func (v *Vault) ReadTemplate(sourcePath string) (string, error) + func (v *Vault) RelDirFor(folder NoteFolder, subpath string) string + func (v *Vault) RenameFile(oldRel, newRel string) error + func (v *Vault) RenameFolder(folder NoteFolder, oldSubpath, newSubpath string) (string, error) + func (v *Vault) RenameNote(rel, nextTitle string) (NoteMeta, error) + func (v *Vault) ReplaceInNote(rel, find, replace string, all bool) (NoteMeta, int, error) + func (v *Vault) RestoreFromTrash(rel string) (NoteMeta, error) + func (v *Vault) Root() string + func (v *Vault) ScanTasks(opts ParseTasksOptions) ([]Task, error) + func (v *Vault) ScanTasksForPath(rel string, opts ParseTasksOptions) ([]Task, error) + func (v *Vault) SearchText(query string, limit int) ([]TextSearchMatch, error) + func (v *Vault) Settings() VaultSettings + func (v *Vault) SubpathOf(rel string) string + func (v *Vault) SwitchPrimaryMode(target PrimaryNotesLocation) ([]string, error) + func (v *Vault) ToggleTask(taskID string, dialect TaskDialect) (*Task, error) + func (v *Vault) UnarchiveNote(rel string) (NoteMeta, error) + func (v *Vault) UpdateSettings(patch func(raw map[string]any)) error + func (v *Vault) WriteFileText(rel, text string) error + func (v *Vault) WriteNote(rel, body string) (NoteMeta, error) + func (v *Vault) WriteNoteComments(rel string, comments []NoteComment) ([]NoteComment, error) + func (v *Vault) WriteTemplate(input WriteTemplateInput) (CustomTemplateFile, error) + type VaultInfo struct + Name string + Root string + type VaultSettings struct + DailyNotes PeriodicNotes + ExplicitPrimary PrimaryNotesLocation + Favorites []string + MonthlyNotes PeriodicNotes + Raw map[string]any + SystemFolderPaths map[string]string + TasksExcludedFolders []string + TypstPreambleFolder string + WeeklyNotes PeriodicNotes + func ParseSettings(raw map[string]any) VaultSettings + type WriteTemplateInput struct + PreviousSourcePath string + Raw string + Slug string