diff --git a/geonodectl b/geonodectl index 61db340..dd86095 100755 --- a/geonodectl +++ b/geonodectl @@ -266,12 +266,7 @@ To use this tool you have to set the following environment variables before star required=True, help="file to upload", ) - documents_upload.add_argument( - "-t", "--title", type=str, dest="title", required=True, help="document title" - ) - documents_upload.add_argument( - "-a", "--abstract", type=str, dest="abstract", help="docment abstract" - ) + documents_upload.add_argument( "--metadata-only", action="store_true", diff --git a/src/datasets.py b/src/datasets.py index 8bb1816..88959f2 100644 --- a/src/datasets.py +++ b/src/datasets.py @@ -28,7 +28,6 @@ class GeonodeDatasetsHandler(GeonodeResourceHandler): def cmd_upload( self, - title: str, file_path: Path, charset: str = "UTF-8", time: bool = False, @@ -38,14 +37,12 @@ def cmd_upload( """upload data and show them on the cmdline Args: - title (str): title of the new dataset file_path (Path): Path to the file to upload. charset (str, optional): charset of data Defaults to "UTF-8". time (bool, optional): set if data is timeseries data Defaults to False. mosaic (bool, optional): declare dataset as mosaic """ r = self.upload( - title=title, file_path=file_path, charset=charset, time=time, @@ -85,7 +82,6 @@ def upload( Args: file_path (Path): Path to the file to upload. If shape make sure to set the shp file and add place other files with same name next to the given - title (str): title of the new dataset charset (str, optional): Fileencoding Defaults to "UTF-8". time (bool, optional): True if the dataset is a timeseries dataset. Defaults to False. mosaic (bool, optional): declare dataset as mosaic diff --git a/src/documents.py b/src/documents.py index 9e7401b..a9ca138 100644 --- a/src/documents.py +++ b/src/documents.py @@ -26,7 +26,6 @@ class GeonodeDocumentsHandler(GeonodeResourceHandler): def cmd_upload( self, - title: str, file_path: Path, metadata_only: bool = False, charset: str = "UTF-8", @@ -35,17 +34,12 @@ def cmd_upload( """upload data and show them on the cmdline Args: - title (str): title of the new dataset file_path (Path): Path to the file to upload. charset (str, optional): charset of data Defaults to "UTF-8". metadata_only (bool, optional): set upload as metadata_only """ r = self.upload( - title=title, - file_path=file_path, - metadata_only=metadata_only, - charset=charset, - **kwargs + file_path=file_path, metadata_only=metadata_only, charset=charset, **kwargs ) list_items = [ ["name", r["title"]], @@ -63,7 +57,6 @@ def cmd_upload( def upload( self, - title: str, file_path: Path, charset: str = "UTF-8", metadata_only: bool = False, @@ -72,7 +65,6 @@ def upload( """upload a document to geonode Args: - title (str): title of the document file_path (Path): file to upload charset (str, optional): charset. Defaults to "UTF-8". metadata_only (bool, optional): set upload as metadata_only. Defaults to False. @@ -91,8 +83,6 @@ def upload( params = { # layer permissions "permissions": '{ "users": {"AnonymousUser": ["view_resourcebase"]} , "groups":{}}', - "title": title, - "abstract": kwargs["abstract"] if "abstract" in kwargs else "", "charset": charset, "metadata_only": metadata_only, }