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)