Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for the --preserve-tree option and add Resource Identifiers URL #153

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/12_download.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,20 @@ application, e.g.:
`dandi download https://api.dandiarchive.org/api/dandisets/000023/versions/0.210914.1900/assets/1a93dc97-327d-4f9c-992d-c2149e7810ae/download/`


**Hint:** `dandi download` supports a number of resource identifiers to point to a Dandiset, folder, or file. Providing
**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
an incorrect URL (e.g. `dandi download wrongurl`) will provide a list of supported identifiers.

### Download the `dandiset.yaml` file and a specific file within the directory tree of the Dandiset
Now available in version `0.63.0` is the `--preserve-tree` option.
In the command below, replace the `<dandiset-id>`, `<version>`, and asset `<path>`.
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.

dandi download --preserve-tree dandi://dandi/<dandiset-id>@<version>/<path>

For example:

dandi download --preserve-tree dandi://dandi/000026@draft/sub-I58/ses-Hip-CT/micr/sub-I58_sample-01_chunk-01_hipCT.json

bendichter marked this conversation as resolved.
Show resolved Hide resolved
## Using DataLad

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