obsidian

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Note

type Note struct {
	Path         string         `json:"path"`
	Name         string         `json:"name"`
	Content      string         `json:"content"`
	Frontmatter  map[string]any `json:"frontmatter,omitempty"`
	Tags         []string       `json:"tags,omitempty"`
	Links        []string       `json:"links,omitempty"`
	ModTime      time.Time      `json:"mod_time"`
	RelativePath string         `json:"relative_path"`
}

Note represents a markdown note from an Obsidian vault or similar

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader reads markdown notes from a directory

func NewReader

func NewReader(rootDir string) (*Reader, error)

NewReader creates a new markdown reader for the given directory

func (*Reader) ListNotes

func (r *Reader) ListNotes(ctx context.Context) ([]Note, error)

ListNotes returns all markdown notes in the vault

func (*Reader) ListNotesByFolder

func (r *Reader) ListNotesByFolder(ctx context.Context, folder string) ([]Note, error)

ListNotesByFolder returns notes in a specific folder (relative path)

func (*Reader) ListNotesByTag

func (r *Reader) ListNotesByTag(ctx context.Context, tag string) ([]Note, error)

ListNotesByTag returns notes with a specific tag

func (*Reader) ListRecentNotes

func (r *Reader) ListRecentNotes(ctx context.Context, since time.Duration) ([]Note, error)

ListRecentNotes returns notes modified within the given duration

func (*Reader) ReadNote

func (r *Reader) ReadNote(ctx context.Context, path string) (*Note, error)

ReadNote reads a single markdown note

func (*Reader) RootDir

func (r *Reader) RootDir() string

RootDir returns the root directory

Jump to

Keyboard shortcuts

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