diff options
-rw-r--r-- | retiolum/scripts/adv_graphgen/USAGE.md | 27 | ||||
-rwxr-xr-x | retiolum/scripts/adv_graphgen/scripts/build-graphs | 6 | ||||
-rw-r--r-- | retiolum/scripts/adv_graphgen/setup.py | 2 | ||||
-rw-r--r-- | retiolum/scripts/adv_graphgen/tinc_graphs.nix | 2 |
4 files changed, 6 insertions, 31 deletions
diff --git a/retiolum/scripts/adv_graphgen/USAGE.md b/retiolum/scripts/adv_graphgen/USAGE.md deleted file mode 100644 index 9fa541ed..00000000 --- a/retiolum/scripts/adv_graphgen/USAGE.md +++ /dev/null @@ -1,27 +0,0 @@ -# Example usage -make sure you have the correct permissions! - -# High Level - - # creates all graphs with predefined paths (see source code of this script) - ./all_the_graphs.sh - - # create anonymized graphs to /tmp - ./anonytize.sh /tmp - - # create full detail graphs to /var/www/graph.retiolum - ./sanitize.sh /var/ww/graph.retiolum - - # return currently availabe supernodes - tinc_stats/Supernodes.py - -# Low Level - - # returns the current tinc graph as json - tinc_stats/Log2JSON.py - - # adds GEOIP information to the json file - tinc_stats/Log2JSON.py | tinc_stats/Geo.py - - # creates a grapviz file from current graph, pipes into a timpfile - tinc_stats/Log2JSON.py | tinc_stats/Graph.py complete > /tmp/out.graphviz diff --git a/retiolum/scripts/adv_graphgen/scripts/build-graphs b/retiolum/scripts/adv_graphgen/scripts/build-graphs index 3eb675ec..89151671 100755 --- a/retiolum/scripts/adv_graphgen/scripts/build-graphs +++ b/retiolum/scripts/adv_graphgen/scripts/build-graphs @@ -1,5 +1,5 @@ #!/bin/sh -set -euf +set -eufx mode=${1?arg1 must be either 'anonymous' or 'complete'} out=${2?arg2 must be set to an outdir} # for creating all the graphs @@ -15,11 +15,11 @@ tinc-stats2json | tinc-build-graph "$mode" > "$DOTFILE" i=1 for setter in dot circo 'neato -Goverlap=prism ' sfdp do - tmpgraph=`mktemp --tmpdir=$1` + tmpgraph=`mktemp --tmpdir=$out` # first build, then move to avoid half-built graphs "$setter" -T$TYPE -o "$tmpgraph" "$DOTFILE" ||: chmod go+rx "$tmpgraph" - mv "$tmpgraph" "$1/retiolum_$i.$TYPE" + mv "$tmpgraph" "$out/retiolum_$i.$TYPE" i=`expr $i + 1` done diff --git a/retiolum/scripts/adv_graphgen/setup.py b/retiolum/scripts/adv_graphgen/setup.py index dd772ef9..a692ebef 100644 --- a/retiolum/scripts/adv_graphgen/setup.py +++ b/retiolum/scripts/adv_graphgen/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup( name='tinc_graphs', - version='0.2.3', + version='0.2.4', description='Create Graphs from tinc Stats', long_description=open("README.md").read(), diff --git a/retiolum/scripts/adv_graphgen/tinc_graphs.nix b/retiolum/scripts/adv_graphgen/tinc_graphs.nix index 662e81ac..3d5a5f68 100644 --- a/retiolum/scripts/adv_graphgen/tinc_graphs.nix +++ b/retiolum/scripts/adv_graphgen/tinc_graphs.nix @@ -10,6 +10,8 @@ python3Packages.buildPythonPackage rec { propagatedBuildInputs = with pkgs;[ graphviz imagemagick + librsvg + libpng # optional if you want geolocation: python3Packages.pygeoip |