summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-10-01 20:21:20 +0200
committermakefu <github@syntax-fehler.de>2015-10-01 20:21:20 +0200
commit4e9aa988069d80142548b7b6a78e91d46234e941 (patch)
tree44f86a5bfc5588f46c3465eeb22526c3a5d0bc86
parent147044be891c92b3c0c1bcc3a4e53e2d0eef9963 (diff)
parent1e08f24def660fad9111ad6d50a9d434f7aad201 (diff)
Merge branch 'master' of github.com:krebscode/painload
-rw-r--r--retiolum/scripts/adv_graphgen/USAGE.md27
-rwxr-xr-xretiolum/scripts/adv_graphgen/scripts/build-graphs6
-rw-r--r--retiolum/scripts/adv_graphgen/setup.py2
-rw-r--r--retiolum/scripts/adv_graphgen/tinc_graphs.nix2
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