From 72ba0c15a09af6168b6bf7cd61bedf42e4c5d85d Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 7 Aug 2024 13:26:22 -0500 Subject: [PATCH 1/5] Add `Resource Identifiers` link --- docs/12_download.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/12_download.md b/docs/12_download.md index cb765775..6c15686a 100644 --- a/docs/12_download.md +++ b/docs/12_download.md @@ -64,7 +64,7 @@ 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. ## Using DataLad From c66553ccd57aa527dfbdebf9f07c18fdcb8925e2 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 7 Aug 2024 13:44:46 -0500 Subject: [PATCH 2/5] Add instructions for the `--preserve-tree` option --- docs/12_download.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/12_download.md b/docs/12_download.md index 6c15686a..dad95418 100644 --- a/docs/12_download.md +++ b/docs/12_download.md @@ -67,6 +67,16 @@ application, e.g.: **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 a specific file and preserve the directory tree of the Dandiset +In the command below, replace the ``, ``, and asset ``. +The `` can be found by selecting the `View asset metadata` icon next to an asset on the web app and locating the `path` key. + + dandi download --preserve-tree dandi://dandi/@/ + +For example: + + dandi download --preserve-tree dandi://dandi/000026@draft/sub-I58/ses-Hip-CT/micr/sub-I58_sample-01_chunk-01_hipCT.json + ## Using DataLad All dandisets are regularly mirrored to DataLad datasets which are made available at the GitHub organization https://github.com/dandisets. From f4c8dba763253d1293bf007257fb57b2c0ff3ca2 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 7 Aug 2024 13:47:33 -0500 Subject: [PATCH 3/5] Add url --- docs/12_download.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/12_download.md b/docs/12_download.md index dad95418..fdb7e0c1 100644 --- a/docs/12_download.md +++ b/docs/12_download.md @@ -69,7 +69,7 @@ an incorrect URL (e.g. `dandi download wrongurl`) will provide a list of support ### Download a specific file and preserve the directory tree of the Dandiset In the command below, replace the ``, ``, and asset ``. -The `` can be found by selecting the `View asset metadata` icon next to an asset on the web app and locating the `path` key. +The `` 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/@/ From f4cec4e2bf4f5e65793126cdf313877038fc37b3 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 8 Aug 2024 08:29:06 -0500 Subject: [PATCH 4/5] Add version information --- docs/12_download.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/12_download.md b/docs/12_download.md index fdb7e0c1..8b3aba29 100644 --- a/docs/12_download.md +++ b/docs/12_download.md @@ -68,6 +68,7 @@ application, e.g.: an incorrect URL (e.g. `dandi download wrongurl`) will provide a list of supported identifiers. ### Download a specific file and preserve the directory tree of the Dandiset +Now available in version `0.63.0` is the `--preserve-tree` option. In the command below, replace the ``, ``, and asset ``. The `` can be found by selecting the `View asset metadata` icon next to an asset on https://dandiarchive.org and locating the `path` key. From 61ce49c6a8cc58b1c2b328a392eca8b723a41fd5 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 15 Aug 2024 23:01:13 -0500 Subject: [PATCH 5/5] Update section title --- docs/12_download.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/12_download.md b/docs/12_download.md index 8b3aba29..ef8f9fc6 100644 --- a/docs/12_download.md +++ b/docs/12_download.md @@ -67,7 +67,7 @@ application, e.g.: **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 a specific file and preserve the directory tree of the Dandiset +### 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 ``, ``, and asset ``. The `` can be found by selecting the `View asset metadata` icon next to an asset on https://dandiarchive.org and locating the `path` key.