improve NC integration

laptop_master
Clemens Klug 2018-06-11 15:51:08 +02:00
parent ca0da300be
commit 79b379e267
2 changed files with 15 additions and 4 deletions

View File

@ -106,14 +106,18 @@ class BiogamesClient(Client):
return self.download_files([i["file_url"] for i in self.list()])
class GeogamesClient(Client):
config_fields = ("host", "path")
config_fields = ("host",)
def __init__(self, **kwargs):
for field in self.config_fields:
if not field in kwargs:
raise ValueError(f"missing parameter: {field}")
self.host = kwargs['host']
self.path = kwargs['path']
self.path = "neocartographer"
self.config = kwargs
def login(self):
return True
def list(self):
logs = self.get(self.path)

View File

@ -122,7 +122,7 @@ ACTIVITY = """{
]
}"""
CONFIGS = { # TODO
CONFIGS = { # TODO: more
"KML": KML,
"ActivityMapper": ACTIVITY,
}
@ -131,3 +131,10 @@ URLS = {
"KML": "/",
"ActivityMapper": "#",
}
HOSTS = {
"Biogames": "http://biogames.potato.kinf.wiai.uni-bamberg.de",
"Geogames": "http://log_data/",
}
RESULT_HOST = "http://results.ma.potato.kinf.wiai.uni-bamberg.de/"