Command line tool which generates images of Nassi-Shneiderman diagrams from xml files.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
res/eu/greenlightning/nsdg
src/eu/greenlightning/nsdg
.gitignore
LICENSE.txt
README.markdown

README.markdown

NSDG

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.

Example Diagram

This diagram of the selection sort algorithm has been generated using the xml code below.

selection-sort

<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>

Requirements

NSDG requires Java 7 to be properly installed and accessible from the command line.

Getting Started

The latest release contains anything you need to use NSDG. Alongside the generator itself, it contains a user guide in English and in German as well as a bunch of examples including the selection sort algorithm from above. 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>...