The Nassi-Shneiderman Diagram Generator is a command line tool which converts xml documents describing the structure of a Nassi-Shneiderman diagram into png files displaying said diagrams.
This diagram of the selection sort algorithm has been generated using the xml code below.
<diagram title="Selection Sort"> <loop condition="for i from 0 to n"> <block>m = i</block> <loop condition="for j from i + 1 to n"> <branch condition="a[j] \l a[m]"> <left label="yes"> <block>m = j</block> </left> <right label="no" /> </branch> </loop> <block> h = a[m] a[m] = a[i] a[i] = h </block> </loop> </diagram>
To use the generator, Java 7 needs to be properly installed and accessible from the command line.
To get started, download the latest release from GitHub. It contains anything you need. Alongside the generator itself, it contains a user guide in English and in German as well as a bunch of examples. An xml schema is provided, too, which some xml editors can use to validate your document and to propose content. (For more information on that, have a look at the user guide.)
After you have created the xml files, generating the diagrams becomes as easy as this:
java -jar nsdg.jar <path-to-xml-file>...
- Look at the GitHub repository.