improve NC integration
parent
ca0da300be
commit
79b379e267
|
|
@ -106,14 +106,18 @@ class BiogamesClient(Client):
|
||||||
return self.download_files([i["file_url"] for i in self.list()])
|
return self.download_files([i["file_url"] for i in self.list()])
|
||||||
|
|
||||||
class GeogamesClient(Client):
|
class GeogamesClient(Client):
|
||||||
config_fields = ("host", "path")
|
config_fields = ("host",)
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
for field in self.config_fields:
|
for field in self.config_fields:
|
||||||
if not field in kwargs:
|
if not field in kwargs:
|
||||||
raise ValueError(f"missing parameter: {field}")
|
raise ValueError(f"missing parameter: {field}")
|
||||||
self.host = kwargs['host']
|
self.host = kwargs['host']
|
||||||
self.path = kwargs['path']
|
self.path = "neocartographer"
|
||||||
|
self.config = kwargs
|
||||||
|
|
||||||
|
def login(self):
|
||||||
|
return True
|
||||||
|
|
||||||
def list(self):
|
def list(self):
|
||||||
logs = self.get(self.path)
|
logs = self.get(self.path)
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ ACTIVITY = """{
|
||||||
]
|
]
|
||||||
}"""
|
}"""
|
||||||
|
|
||||||
CONFIGS = { # TODO
|
CONFIGS = { # TODO: more
|
||||||
"KML": KML,
|
"KML": KML,
|
||||||
"ActivityMapper": ACTIVITY,
|
"ActivityMapper": ACTIVITY,
|
||||||
}
|
}
|
||||||
|
|
@ -130,4 +130,11 @@ CONFIGS = { # TODO
|
||||||
URLS = {
|
URLS = {
|
||||||
"KML": "/",
|
"KML": "/",
|
||||||
"ActivityMapper": "#",
|
"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/"
|
||||||
Loading…
Reference in New Issue