... | ... | @@ -41,7 +41,9 @@ The commands supported by `pepcli` are listed below. Follow hyperlinks to read m |
|
|
|
|
|
- [`get`](#get) retrieves data from a specific cell.
|
|
|
- [`list`](#list) lists data available in PEP.
|
|
|
- [`pull`](#pull) stores a data set in files on your local machine.
|
|
|
- [`query`](#query) provides information on the PEP environment.
|
|
|
- [`store`](#store) stores data in a specific cell.
|
|
|
|
|
|
## Commands categorized by task
|
|
|
|
... | ... | @@ -55,6 +57,8 @@ Data storage and retrieval: |
|
|
|
|
|
- [`get`](#get) retrieves data from a specific cell.
|
|
|
- [`list`](#list) lists data available in PEP.
|
|
|
- [`pull`](#pull) stores a data set in files on your local machine.
|
|
|
- [`store`](#store) stores data in a specific cell.
|
|
|
|
|
|
## General flags
|
|
|
|
... | ... | @@ -76,15 +80,15 @@ Other general flags exist, but are intended for use by developers of the PEP sys |
|
|
|
|
|
## `get`
|
|
|
|
|
|
After you have done a list, depending on whether data was inlined or not, you have IDs for data entries. You can retrieve the data as follows:
|
|
|
After you have [`list`](#list)ed data, depending on whether data was inlined or not, you have IDs for data entries. You can retrieve the data as follows:
|
|
|
```
|
|
|
pepcli get -t <ticket file> -i <identifier> -o <output file>
|
|
|
```
|
|
|
|
|
|
The flags are:
|
|
|
|
|
|
- `-t` The ticket you stored with the `-T` flag of `pepcli list`
|
|
|
- `-i` The identifier you got from `pepcli list`
|
|
|
- `-t` The ticket you stored with the `-T` flag of [the `list` command](#list)
|
|
|
- `-i` The identifier you got from [`pepcli list`](#list)
|
|
|
- `-o` The file to write the output to. `-` indicates stdout. This is the default.
|
|
|
- `-m` Also retrieve the metadata and write it to the given file. `-` indicates stdout. Default is to not retrieve metadata. If you do not know what you would need metadata for, then you probably don't need it.
|
|
|
|
... | ... | @@ -96,7 +100,7 @@ You can list data e.g. as follows: |
|
|
pepcli list -C <column group> -P <participant group> -T <ticket out file>
|
|
|
```
|
|
|
|
|
|
This will list the data that is in PEP, in json format. If a data entry is short enough, it will be displayed directly in the output. For larger entries it will display an id, which can be used with the `pepcli get` command. There are flags to change this behaviour.
|
|
|
This will list the data that is in PEP, in json format. If a data entry is short enough, it will be displayed directly in the output. For larger entries it will display an id, which can be used with the [`get` command](#get). There are flags to change this behaviour.
|
|
|
|
|
|
Important flags are:
|
|
|
|
... | ... | @@ -113,6 +117,26 @@ Important flags are: |
|
|
|
|
|
Note: Shells use `*` for globbing. We do not want this behaviour, so make sure you escape it with a backslash or double quotes when invoking pepcli from e.g. bash.
|
|
|
|
|
|
## `pull`
|
|
|
|
|
|
The `pull` command downloads a data set from PEP and stores the data in files. If you need more fine-grained control, use the [`list`](#list) and [`get`](#get) commands instead.
|
|
|
|
|
|
```
|
|
|
pepcli pull -C <column group> -P <participant group>
|
|
|
```
|
|
|
|
|
|
This will by default store the data to the directory `pulled-data`.
|
|
|
|
|
|
Important flags are:
|
|
|
|
|
|
- `-C` Column group to list data for. Can be repeated if you want data for more than one column group. There is a special column group `*` that contains all columns.
|
|
|
- `-c` Specific column to list data for. Can be repeated, and combined with `-C` if you want multiple columns and column groups
|
|
|
- `-P` Participant group to list data for. Can be repeated if you want data for more than one participant group. There is a special participant group `*` that contains all partipants.
|
|
|
- `-o` Directory to write files to. Default is `pulled-data`.
|
|
|
- `-f` Overwrite or remove existing data in output directory
|
|
|
- `-r` Resume an interupted download
|
|
|
- `-u` Updates an existing output directory, e.g. when new data is available. This will use the same participant(group)s and column(group)s as the original download, so `-c`, `-C`, `-p` and `-P` are not allowed with this flag
|
|
|
|
|
|
## `query`
|
|
|
|
|
|
Use the `pepcli query` command to query the system. It currently only supports a single sub-command, which lists the columns accessible to you:
|
... | ... | @@ -126,7 +150,8 @@ The output will include all columns and column groups accessible to you, as well |
|
|
- either by means of a prior call to `pepLogon`,
|
|
|
- or by [passing an appropriate OAuth token](#general-flags) to `pepcli`.
|
|
|
|
|
|
## Store data
|
|
|
## `store`
|
|
|
|
|
|
You can store data with this command:
|
|
|
```
|
|
|
pepcli store -c <column name> -p <participant> -i /PATH/TO/DATA/FILE
|
... | ... | @@ -142,27 +167,6 @@ The flags are: |
|
|
- `-d` Data to store. Use either this or `-i`
|
|
|
- `-T` By default, pepcli will request a write-only ticket. You can use `-T` and give a path to store the ticket in. If you use this flag, pepcli will also request read access to the entry that is stored. You can then use the ID in the output, together with this ticket for `pepcli get`. This way you can check whether the data was stored correctly. Note that pepcli also performs its own checks to see whether the data was stored correctly.
|
|
|
|
|
|
## Pull data
|
|
|
The above commands are low level PEP commands. But there is also a command that makes downloading from PEP more convenient:
|
|
|
|
|
|
```
|
|
|
pepcli pull -C <column group> -P <participant group>
|
|
|
```
|
|
|
|
|
|
This will by default store the data to the directory `pulled-data`.
|
|
|
|
|
|
|
|
|
Important flags are:
|
|
|
|
|
|
- `-C` Column group to list data for. Can be repeated if you want data for more than one column group. There is a special column group `*` that contains all columns.
|
|
|
- `-c` Specific column to list data for. Can be repeated, and combined with `-C` if you want multiple columns and column groups
|
|
|
- `-P` Participant group to list data for. Can be repeated if you want data for more than one participant group. There is a special participant group `*` that contains all partipants.
|
|
|
- `-o` Directory to write files to. Default is `pulled-data`.
|
|
|
- `-f` Overwrite or remove existing data in output directory
|
|
|
- `-r` Resume an interupted download
|
|
|
- `-u` Updates an existing output directory, e.g. when new data is available. This will use the same participant(group)s and column(group)s as the original download, so `-c`, `-C`, `-p` and `-P` are not allowed with this flag
|
|
|
|
|
|
|
|
|
# Specific examples
|
|
|
Let's say we have the following column groups, with the listed columns:
|
|
|
|
... | ... | |