exportimport

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package exportimport handles JSON round-trip, Markdown, and Obsidian vault export.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportJSON

func ExportJSON(ctx context.Context, store storage.Storage, project string) ([]byte, error)

ExportJSON exports the full graph as JSON.

func ExportMarkdown

func ExportMarkdown(ctx context.Context, store storage.Storage, project string) (string, error)

ExportMarkdown exports nodes as a Markdown document.

func ExportObsidian

func ExportObsidian(ctx context.Context, store storage.Storage, project, vaultDir string) (int, error)

ExportObsidian exports the graph as an Obsidian vault (one .md file per node, wikilinks for edges). vaultDir must be an absolute path and must not escape above itself via ".." components.

func ImportJSON

func ImportJSON(ctx context.Context, store storage.Storage, data []byte) (int, int, error)

ImportJSON imports a graph from JSON, skipping duplicates.

Types

type GraphExport

type GraphExport struct {
	Version    string          `json:"version"`
	ExportedAt time.Time       `json:"exported_at"`
	Nodes      []*storage.Node `json:"nodes"`
	Edges      []*storage.Edge `json:"edges"`
}

GraphExport is the full graph export format.

Jump to

Keyboard shortcuts

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