obsidian

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package obsidian generates Obsidian vault exports from graph data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCommunity

func GenerateCommunity(comm analyze.Community, nodeMap map[string]*graph.Node, degrees map[string]int) string

GenerateCommunity creates a community page.

func GenerateIndex

func GenerateIndex(nodes []*graph.Node, edges []*graph.Edge, godNodes []analyze.HubNode, communities *analyze.ClusterResult) string

GenerateIndex creates the index.md content.

func GenerateNode

func GenerateNode(node *graph.Node, outgoing, incoming map[string][]*graph.Edge, nodeMap map[string]*graph.Node) string

GenerateNode creates a node page.

func SanitizeName

func SanitizeName(id string) string

SanitizeName creates a safe filename for Obsidian.

Types

type Generator

type Generator struct {
	// TopN is the number of top hub nodes to include.
	TopN int

	// MinDegree is the minimum degree for a node to get its own page.
	MinDegree int
}

Generator creates Obsidian markdown pages from graph data.

func NewGenerator

func NewGenerator() *Generator

NewGenerator creates a Generator with default settings.

func (*Generator) Generate

func (g *Generator) Generate(nodes []*graph.Node, edges []*graph.Edge) *VaultContent

Generate creates all content for an Obsidian vault.

type VaultContent

type VaultContent struct {
	Index       string
	Communities map[int]string    // community ID -> content
	Nodes       map[string]string // sanitized node ID -> content
}

VaultContent holds all generated content for an Obsidian vault.

Jump to

Keyboard shortcuts

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