1 unstable release
|0.1.0||Mar 10, 2023|
#7 in #dag
dot-viewer is a dot-format graph debugger in TUI, inspired by Vim.
1. Getting Started
dot-viewer parses a dot format file using C bindings to Graphviz (v7.0.6).
The system environment should be able to find and include the following header files.
#include <gvc.h> #include <cgraph.h>
Option 1. Installing Graphviz from Package Manager
Coming from Linux,
$ sudo apt install graphviz-dev
And coming from vanilla Ubuntu, you may want to install these too.
$ sudo apt install build-essentials cmake $ sudo apt install clang
Coming from Mac,
$ brew install graphviz
And coming from Apple Silicon Mac, and add an environment variable,
Option 2. Building Graphviz from Source
Or, try building from the source code following the guide.
dot-viewer renders a subgraph with
xdot.py, an interactive dot visualizer.
It is required that xdot is executable in command-line beforehand such that the following works.
$ xdot *.dot
First initialize and update the submodule
$ git submodule init $ git submodule update
Then run crate.
$ cargo run --release [path-to-dot-file]
This will open a TUI screen on the terminal.
dot-viewer, users may
traverse the graph in TUI using,
- goto next/prev node of the currently selected node
- fuzzy search on node name
- regex search on node name and attributes
make and export subgraphs using,
- subgraph tree selection
- applying filter on search matches
nnodes of the currently selected node
||go back to the main screen|
esc to go back to Normal mode whenever you are unsure of what you are doing...
||close the current tab(view)|
||move focus between current, prevs, nexts list|
||traverse in focused list|
||move between matched nodes|
||move to the topmost node in focused list|
||move to the bottom node in focused list|
||move between tabs|
||autocomplete search keyword|
e.g., in fuzzy search mode,
/g1_s14_t100 and in regex search mode,
r\(H: ., D: .\)
||apply filter on current matches, opening a new tab(view)|
||get up to
||export the current tab(view) to dot|
||open a popup showing subgraph tree|
All exported files are saved in
exports directory in the project root.
Most recently exported file is copied in
||traverse the tree|
||change root to the selected subgraph, opening a new tab(view)|
||traverse help messages|