From 1d66bb74181114de87d43a1c7567eab93e2eb8bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20W=C3=BCllhorst?= Date: Wed, 23 Dec 2015 22:51:35 +0100 Subject: [PATCH] Updated json file call from url --- domain_selector.py | 2 +- node_hierarchy.py | 3 ++- track_statistics.py | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/domain_selector.py b/domain_selector.py index 2925cad..c89fca3 100644 --- a/domain_selector.py +++ b/domain_selector.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 - #Imports: -import json +import json, urllib from graph import Graph class DomainSelector: def __init__(self, nodesFile, graphFile, dataPath = './', printStatus = False, targets = None): diff --git a/node_hierarchy.py b/node_hierarchy.py index 7660ce4..ac23bf9 100755 --- a/node_hierarchy.py +++ b/node_hierarchy.py @@ -71,4 +71,5 @@ targets = { ] } -ds = DomainSelector(nodesFile = 'nodes.json', graphFile = 'graph.json', printStatus = True, dataPath = '../domaenensplit_webserver_config/', targets = targets) \ No newline at end of file +#ds = DomainSelector(nodesFile = 'nodes.json', graphFile = 'graph.json', printStatus = True, dataPath = '../domaenensplit_webserver_config/', targets = targets) +ds = DomainSelector(nodesFile = 'https://freifunk-muensterland.de/map/data/nodes.json', graphFile = 'https://freifunk-muensterland.de/map/data/graph.json', printStatus = True, dataPath = '../domaenensplit_webserver_config/', targets = targets) \ No newline at end of file diff --git a/track_statistics.py b/track_statistics.py index 33617c7..a818d54 100755 --- a/track_statistics.py +++ b/track_statistics.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 - #Imports: -import json +import json, urllib import operator class TrackStatistics: @@ -87,4 +87,5 @@ data = [ }, ] -stat = TrackStatistics('nodes.json', data, printStatus = True) \ No newline at end of file +#stat = TrackStatistics('nodes.json', data, printStatus = True) +stat = TrackStatistics('https://freifunk-muensterland.de/map/data/nodes.json', data, printStatus = True) \ No newline at end of file