-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1437 from asmacdo/clarify-download-docs
clarify resource identifier docs
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,16 +11,44 @@ | |
from ..download import DownloadExisting, DownloadFormat, PathType | ||
from ..utils import get_instance, joinurl | ||
|
||
_examples = """ | ||
EXAMPLES:\n | ||
# Download only the dandiset.yaml\n | ||
dandi download --download dandiset.yaml DANDI:000027\n | ||
# Download only dandiset.yaml if there is a newer version\n | ||
dandi download https://identifiers.org/DANDI:000027 --existing refresh | ||
# Download only the assets\n | ||
dandi download --download assets DANDI:000027 | ||
# Download all from a specific version\n | ||
dandi download DANDI:000027/0.210831.2033 | ||
# Download a specific directory\n | ||
dandi download dandi://DANDI/[email protected]/sub-RAT123/ | ||
# Download a specific file\n | ||
dandi download dandi://DANDI/[email protected]/sub-RAT123/sub-RAT123.nwb | ||
""" | ||
|
||
|
||
# The use of f-strings apparently makes this not a proper docstring, and so | ||
# click doesn't use it unless we explicitly assign it to `help`: | ||
@click.command( | ||
help=f"""\ | ||
Download files or entire folders from DANDI. | ||
\b | ||
{_dandi_url_parser.resource_identifier_primer} | ||
\b | ||
{_dandi_url_parser.known_patterns} | ||
""" | ||
\b | ||
{_examples} | ||
""" | ||
) | ||
@click.option( | ||
"-o", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters