dotparser 0.2.0

diagram file parser for Bevy visualization of diagrams
Documentation
  • Coverage
  • 0%
    0 out of 19 items documented0 out of 4 items with examples
  • Size
  • Source code size: 32.31 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.13 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 24s Average build duration of successful builds.
  • all releases: 31s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • navicore/dotparser
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • navicore

dotparser

A Rust library for parsing Graphviz DOT files into graph structures.

Overview

dotparser converts DOT format files into a graph representation using petgraph. It handles both standard edge-based graphs and nested subgraph structures.

Usage

use dotparser::dot;

let dot_content = r#"
    digraph {
        A -> B;
        B -> C;
    }
"#;

let graph_data = dot::parse(dot_content);
println!("Nodes: {}", graph_data.graph.node_count());
println!("Edges: {}", graph_data.graph.edge_count());

Features

  • Parses standard DOT edge notation (A -> B)
  • Supports nested subgraphs
  • Handles node attributes (type, level)
  • Preserves node labels and relationships

Data Structures

The parser outputs a GraphData structure containing:

  • A petgraph::DiGraph with node information
  • A HashMap for node name lookups

Nodes can have types like Organization, Team, User, etc., useful for hierarchical visualizations.

Future

This crate currently supports DOT format only. Other diagram formats may be added as separate modules.

License

MIT