def download(geojson_file, basepath, output, progress): """ Download features' image_url/label_url data products """ features = geojson.read(geojson_file) products = [] for feature in features: mod_feature = Download.run(feature, base_path=basepath, progressbar=progress) products.append(mod_feature) log.debug(products) if output: json_2_geojson(products, filename=output) else: import json click.echo(json.dumps(products, indent=2))
def process(geojson_file, basepath, output, tmpdir): """ WIP """ features = geojson.read(geojson_file) if docker_isis: from npt import isis isis.set_docker(docker_isis) products = [] for feature in features: mod_feature = Processing.run(feature, output_path=basepath, tmpdir=tmpdir) products.append(mod_feature) log.debug(products) if output: json_2_geojson(products, filename=output) else: import json click.echo(json.dumps(products, indent=2))
def _sh(*args, **kwargs): v = [f'{v}' for v in args] kv = [f'{k}={v}' for k, v in kwargs.items()] comm = ' '.join(exec + v + kv) log.debug(comm) return sh(comm)
def reset(self): _sh = _set_sh() log.debug(_sh) self._sh = _sh
def log(res): log.debug("Exit code: " + str(res and res.exit_code))