The Data Retriever earlier used a simple CLI for developing new dataset scripts. This allowed users with no programming experience to quickly add most standard datasets to the Retriever by specifying the names and locations of the tables along with additional information about the configuration of the data. The script is saved as a JSON file, that follows the DataPackage standards.
This functionality has been moved to this repository to separate the scripts from the core retriever
functionalities to help with organization, maintenance, and testing. The retriever-recipes
repository thus holds all the scripts which were earlier shipped with retriever
and also all the script adding/editing functionalities.
To facilitate the use of recipes as a command-line utility, the user can simply clone the repository and install it. The installation steps are mentioned in the next section.
git clone https://www.github.com/weecology/retriever-recipes.git
cd retriever-recipes
python setup.py install
To see the full list of command line options and datasets run retriever-recipes --help
. The output will look like this:
usage: retriever-recipes [-h] {new_json,edit_json,delete_json,help} ...
positional arguments:
{new_json,edit_json,delete_json,help}
sub-command help
new_json CLI to create retriever json script
edit_json CLI to edit retriever json script
delete_json CLI to remove retriever json script
help
optional arguments:
-h, --help show this help message and exit
Some example usages of the CLI interface are:
- Add a new JSON script:
retriever-recipes new_json
- Delete an existing JSON script:
retriever-recipes delete_json dataset
- Edit an existing JSON script:
retriever-recipes edit_json dataset`
For more information, see the Data Retriever website.