Skip to content

mrbrenna83/nwdiag

 
 

Repository files navigation

nwdiag generate network-diagram image file from spec-text file.

drone.io CI build status Latest PyPI version Number of PyPI downloads

Features

  • Generate network-diagram from dot like text (basic feature).
  • Multilingualization for node-label (utf-8 only).

You can get some examples and generated images on blockdiag.com .

Setup

Use easy_install or pip:

$ sudo easy_install nwdiag

Or

$ sudo pip nwdiag

spec-text setting sample

Few examples are available. You can get more examples at blockdiag.com .

simple.diag

simple.diag is simply define nodes and transitions by dot-like text format:

nwdiag {
  network dmz {
      address = "210.x.x.x/24"

      web01 [address = "210.x.x.1"];
      web02 [address = "210.x.x.2"];
  }
  network internal {
      address = "172.x.x.x/24";

      web01 [address = "172.x.x.1"];
      web02 [address = "172.x.x.2"];
      db01;
      db02;
  }
}

Usage

Execute nwdiag command:

$ nwdiag simple.diag
$ ls simple.png
simple.png

Requirements

  • Python 3.5 or later
  • blockdiag 1.5.0 or later
  • funcparserlib 0.3.6 or later
  • reportlab (optional)
  • wand and imagemagick (optional)
  • setuptools

License

Apache License 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.2%
  • Roff 2.8%