1
0
Fork
You've already forked notegraph
0
CLI utility to generate and manipulate graphs of links in a PKM/Obsidian-style notebook
  • Python 100%
2026年06月16日 23:28:19 -04:00
src/notegraph fixed use of cli flags 2026年06月16日 23:28:19 -04:00
.gitignore gitignore/pyproject 2026年06月15日 09:51:27 -04:00
LICENSE initial commit 2026年05月30日 00:49:34 -04:00
pdm.lock working cli tool 2026年06月01日 15:04:32 -04:00
pyproject.toml gitignore/pyproject 2026年06月15日 09:51:27 -04:00
README.md updated cli flags 2026年06月16日 23:25:12 -04:00

README

CLI utility to generate and manipulate graphs of links in a PKM/Obsidian-style notebook

Installing

To install with pipx:

pipx install git+https://codeberg.org/reillypascal/notegraph.git

Configuration

notegraph looks for a configuration file at ~/.config/notegraph/config.toml. Example configuration:

[paths]
input = "path/to/notes/directory"

Usage

  • -h, --help show this help message and exit
  • -i, --input folder of notes to parse; set default in $XDG_CONFIG_HOME/notegraph
  • -o, --output output file for Graphviz graph (default: './graph.gv')
  • -d, --depth depth at which to find neighbors (default: 1)
  • -g, --graph output Graphviz graph
  • -l, --list list notes with link counts: optional positive n shows n most-linked, and negative n shows n least-linked
  • -n, --neighbors find neighbors of note, given note title
  • -O, --orphans find orphaned notes (notes with no links)
  • -r, --reverse reverse order of sorted link counts

Generating Graph Images

This tool outputs a Graphviz (.gv/.dot) file. To convert the file to a PNG image, run the following:

# layered graph
dot -Tpng graph.gv -o graph.png

Graphviz also provides the following commands to create force-directed graphs. Note that these are mostly useful for smaller and/or sparser graphs:

# force-directed graph
fdp -Tpng graph.gv -o graph.png
# multiscale force-directed graph; good for large graphs
sfdp -Tpng graph.gv -o graph.png