2012-05-12 16:44:27 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
# TODO
|
|
|
|
# Gatewayliste
|
|
|
|
# aliases.json
|
|
|
|
|
|
|
|
import json
|
|
|
|
import fileinput
|
|
|
|
import argparse
|
|
|
|
|
|
|
|
from nodedb import NodeDB
|
|
|
|
from geomapbuilder import GeoMapBuilder
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
|
|
|
|
parser.add_argument('-a', '--aliases',
|
|
|
|
help='read aliases from FILE',
|
|
|
|
metavar='FILE')
|
|
|
|
|
|
|
|
parser.add_argument('batmanjson', help='output of batman vd json')
|
|
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
options = vars(args)
|
|
|
|
|
|
|
|
db = NodeDB()
|
|
|
|
|
|
|
|
db.import_batman(list(fileinput.input(options['batmanjson'])))
|
|
|
|
|
|
|
|
if options['aliases']:
|
|
|
|
db.import_aliases(json.load(open(options['aliases'])))
|
|
|
|
|
|
|
|
db.import_wikigps("http://freifunk.metameute.de/Knoten")
|
|
|
|
|
2012-06-04 20:59:12 +02:00
|
|
|
#db.wilder_scheiss()
|
2012-05-31 20:05:04 +02:00
|
|
|
|
2012-05-12 16:44:27 +02:00
|
|
|
m = GeoMapBuilder(db)
|
|
|
|
|
2012-06-05 17:12:36 +02:00
|
|
|
print(m.build().encode("utf8"))
|