From 81405faf3ec765889c63430ed7512a29aeabc35a Mon Sep 17 00:00:00 2001 From: Vanhala Antti Date: Sun, 30 Mar 2014 14:34:08 +0300 Subject: [PATCH] Move mapping tools to mapper/ --- .gitignore | 2 +- mapperconf_sh.example.py => mapper/conf_sh.example.py | 3 +-- makeGraph.py => mapper/makeGraph.py | 2 +- start-mappers.sh => mapper/start-mappers.sh | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) rename mapperconf_sh.example.py => mapper/conf_sh.example.py (90%) rename makeGraph.py => mapper/makeGraph.py (99%) rename start-mappers.sh => mapper/start-mappers.sh (96%) diff --git a/.gitignore b/.gitignore index 317d742..036e21e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ *.pyc graph.json mapper-confs/* -mapperconf_sh.py +conf_sh.py diff --git a/mapperconf_sh.example.py b/mapper/conf_sh.example.py similarity index 90% rename from mapperconf_sh.example.py rename to mapper/conf_sh.example.py index 123764f..0c98ee0 100644 --- a/mapperconf_sh.example.py +++ b/mapper/conf_sh.example.py @@ -2,9 +2,8 @@ # This file should be runnable by bash and python! # - cjdns_path="/home/user/cjdns" - +graph_output="../web/static/graph.json" num_of_nodes=30 # Where mapper nodes connect to diff --git a/makeGraph.py b/mapper/makeGraph.py similarity index 99% rename from makeGraph.py rename to mapper/makeGraph.py index 66cbb45..7288d23 100755 --- a/makeGraph.py +++ b/mapper/makeGraph.py @@ -198,6 +198,6 @@ for e in G.iteredges(): json_output = json.dumps(out_data) -f = open('web/static/graph.json', 'w') +f = open(graph_output, 'w') f.write(json_output) f.close() \ No newline at end of file diff --git a/start-mappers.sh b/mapper/start-mappers.sh similarity index 96% rename from start-mappers.sh rename to mapper/start-mappers.sh index c2de6c3..d3f905e 100755 --- a/start-mappers.sh +++ b/mapper/start-mappers.sh @@ -1,6 +1,6 @@ #!/bin/bash -source mapperconf_sh.py +source conf_sh.py mkdir -p mapper-confs for i in $(seq 1 $num_of_nodes)