Skip to content

terhorstd/pla2dot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pla2dot

This program converts the data structures used in the PLA [1] web-page to a file in DOT language used by the Graphviz [2] tool.

Installation

This program doesn't need to be compiled.

Dependencies

To run this script Python needs to be installed, together with the docopt module.

pip install docopt

For the output to be of any use you probably also want to have graphviz installed.

Usage

The input data for this script can be generated by viewing the source code of a web-page in the PLA [1] that contains a dependency graph. You will find a section looking something like

 <style type="text/css">
     #mynetwork {
         width: 600px;
         height: 400px;
         border: 1px solid lightgray;
     }
 </style>


 <script type="text/javascript">
     // create an array with nodes
     var nodes = new vis.DataSet([{id: 7, label: 'NEST code with abstracted neuron model representations', color: 'rgba(97,195,238,1.0)'},
     {id: 19, label: 'Streaming, steering and data analysis of NEST - VisNEST', color: 'rgba(97,195,238,1.0)'},
     ...

Copy and paste the passages create an array with nodes and create an array with edges to a text file on your disk, e.g. "graph.data". Now you can convert this text to a dot-file and view it with graphviz as follows:

./pla2dot.py graph.data graph.dot
dot -Tx11 graph.dot

To get help about the usage type

pla2dot --help

currently this gives ``` Usage: convert [options]

Options:
    --rankdir=<dir>  either TB or LR [default: TB]
    -v, --verbose   tell what is going on
    -h, --help      print this text

# References

[1]: https://project-lifecycle.herokuapp.com
[2]: http://www.graphviz.org/Documentation.php

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published