Skip to content

Commit 49d0178

Browse files
authored
Merge pull request #153 from kabilar/download
Add instructions for the `--preserve-tree` option and add Resource Identifiers URL
2 parents c96425d + 61ce49c commit 49d0178

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/12_download.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,20 @@ application, e.g.:
6464
dandi download https://api.dandiarchive.org/api/dandisets/000023/versions/0.210914.1900/assets/1a93dc97-327d-4f9c-992d-c2149e7810ae/download/
6565

6666

67-
**Hint:** `dandi download` supports a number of resource identifiers to point to a Dandiset, folder, or file. Providing
67+
**Hint:** `dandi download` supports a number of [Resource Identifiers](https://dandi.readthedocs.io/en/latest/ref/urls.html#resource-ids) to point to a Dandiset, folder, or file. Providing
6868
an incorrect URL (e.g. `dandi download wrongurl`) will provide a list of supported identifiers.
6969

70+
### Download the `dandiset.yaml` file and a specific file within the directory tree of the Dandiset
71+
Now available in version `0.63.0` is the `--preserve-tree` option.
72+
In the command below, replace the `<dandiset-id>`, `<version>`, and asset `<path>`.
73+
The `<path>` can be found by selecting the `View asset metadata` icon next to an asset on https://dandiarchive.org and locating the `path` key.
74+
75+
dandi download --preserve-tree dandi://dandi/<dandiset-id>@<version>/<path>
76+
77+
For example:
78+
79+
dandi download --preserve-tree dandi://dandi/000026@draft/sub-I58/ses-Hip-CT/micr/sub-I58_sample-01_chunk-01_hipCT.json
80+
7081
## Using DataLad
7182

7283
All dandisets are regularly mirrored to DataLad datasets which are made available at the GitHub organization https://github.com/dandisets.

0 commit comments

Comments
 (0)