Command line tools
geoslurper
Program to download and manage Earth Science data
usage: geoslurper [-h] [-f] [-V] [-i] [-l] [--purge-cache [filter]]
[--purge-data [filter]] [--purge-entry] [--pull [JSON]]
[--register [JSON]] [--export [OUTPUTFILE]]
[--local-settings LOCALSETTINGSFILE]
[--write-local-settings] [--config [JSON]]
[--show-config [SHOWPASS]] [--auth-config [JSON]]
[--admin-config [JSON]] [--host [hostname]] [--user user]
[--add-user username] [--add-readonly-user username]
[--password password] [--create-schema schemaname]
[--port port] [--dataroot [DATAROOT]] [--dbalias [DBALIAS]]
[--keyring] [-v [VERBOSE]] [--data-dir DIR] [--cache DIR]
[SCHEMA.ITEM]
- schema.item
Select a fully qualified dataset, function or view specified as schema.tablename/function/view. use –func or –view to specify the type considered (default is a dataset
- -h, --help
Prints detailed help (may be used in combination with a positional argument matching a certain dataset for detailed JSON options)
- -f, --func
Use geoslurp database functions
- -V, --view
Use geoslurp database views)
- -i, --info
Show information about selected datasets
- -l, --list
List all datasets which are available to use. When a positional argument is supplied it will be used as a search string
- --purge-cache <filter>
Purge the cache of the selected dataset. while optionally applying a filter for the files
- --purge-data <filter>
Purge the data of the selected dataset. while optionally applying a filter for the files
- --purge-entry
Purge the database entry of the selected dataset.
- --pull
Pull data from online resource (possibly pass on options as a JSON dict
- --register
Register data in the database (possibly pass on options as a JSON dict)
- --export <outputfile>
Export the selected tables in a SQLITE or geopackage file. The type of output is determined from the OUTPUTFILE extension (.sql or .gpkg). When no OUTPUTFILE is provided an SQLITE or gpkg file is dumped in the current directory (depending on whether thee table has a geometry columns.
- --local-settings <localsettingsfile>
Specify a different file to read the local settings from (default= ${HOME}/.geoslurp_lastused.yaml)
- --write-local-settings
Write relevant command line options to local-settings file
- --config
Register user settings (pass as a JSON dict, e.g. {“DataDir”:”path/”})
- --show-config <showpass>
Show user configurations as stored in the database, specify ‘–show-config nohide’ to also show passwords
- --auth-config
Register (and encrypt on a user basis in the database) authentification services (pass as a JSON dict, e.g. {“servicename”:{“user”:..,”passw”:…}}). To delete an entry specify {“servicename”:”delete”}
- --admin-config
Register admin/default settings (pass as a JSON dict, e.g. {“DataDir”:”path/”})
- --host <hostname>
Select host where the PostgreSQL/PostGIS server is running. Specifying –host without a hostname will try to connect to the local unix socket
- --user <user>
Select postgresql user
- --add-user <username>
Add a new postgresql user (you will be prompted for a password, or you can append the password after a colon e.g. pietje:secretpassword)
- --add-readonly-user <username>
Add a new readonly postgresql user (you will be prompted for a password, or you can append the password after a colon e.g. pietje:secretpassword)
- --password <password>
Select password for the postgresql user
- --create-schema <schemaname>
Create a new postgresql schema with the default geoslurp permissions
- --port <port>
Select the port where the database is served
- --dataroot <dataroot>
Specify the local root of the data directory. Defaults to ${HOME}/geoslurp_data
- --dbalias <dbalias>
Specify the database alias to connect to. Each database alias can have a different host,port,user,password,dataroot,etc (see the localsettings file
- --keyring, --no-keyring
Use/don’t use the system keyring to store and retrieve the database password (alternatives are using –password or the environment variable GEOSLURP_PGPASS
- -v, --verbose
Increase verbosity of the output one cvan use multiple v’s after another (e.g. -vv) to increase verbosity. The default prints errors and info
- --data-dir <dir>
Specify a dataset specific data directory DIR
- --cache <dir>
Set the root of the cache directory to DIR