Updated json file call from url

This commit is contained in:
Simon Wüllhorst 2015-12-23 22:51:35 +01:00
parent 48d4fca08b
commit 1d66bb7418
3 changed files with 6 additions and 4 deletions

View file

@ -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):

View file

@ -71,4 +71,5 @@ targets = {
]
}
ds = DomainSelector(nodesFile = 'nodes.json', graphFile = 'graph.json', printStatus = True, dataPath = '../domaenensplit_webserver_config/', targets = targets)
#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)

View file

@ -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)
#stat = TrackStatistics('nodes.json', data, printStatus = True)
stat = TrackStatistics('https://freifunk-muensterland.de/map/data/nodes.json', data, printStatus = True)