datalad xnat-init

Synopsis

datalad xnat-init [-h] [-F PATHFMT] [-p ID] [-s ID] [-e ID] [-c LABEL] [--credential NAME] [-f] [--interactive] [-d DATASET] [--version] url

Description

Initialize an existing dataset to track an XNAT project

Examples

Initialize a dataset in the current directory:

% datalad xnat-init http://central.xnat.org:8080

Initialize with anonymous access (no credentials used):

% datalad xnat-init https://central.xnat.org --credential anonymous

Use credentials previously stored as <NAME>:

% datalad xnat-init https://central.xnat.org --credential <NAME>

Track a specific XNAT project, without credentials:

% datalad xnat-init https://central.xnat.org --project Sample_DICOM --credential anonymous

Options

url

XNAT instance URL.

-h, --help, --help-np

show this help message. --help-np forcefully disables the use of a pager for displaying the help message

-F PATHFMT, --pathfmt PATHFMT

Specify the directory structure for the downloaded files, and if/where a subdataset should be created. The format string must use POSIX notation and must end with a slash ('/'). To include the subject, session, or scan values, use the following format: {subject}/{session}/{scan}/ To insert a subdataset at a specific directory level use '//': {subject}/{session}//{scan}/. [Default: '{subject}/{session}/{scan}/']

-p ID, --project ID

accession ID of a single XNAT project to track.

-s ID, --subject ID

accession ID of a single subject to track.

-e ID, --experiment ID

accession ID of a single experiment to track.

-c LABEL, --collection LABEL

limit updates to a specific collection/resource. Can be given multiple times.

--credential NAME

name of the credential providing a user/password combination to be used for authentication. The special value 'anonymous' will cause no credentials to be used, and all XNAT requests to be performed anonymously. The credential can be supplied via configuration settings 'datalad.credential.<name>.{user|password}', or environment variables DATALAD_CREDENTIAL_<NAME>_{USER|PASSWORD}, or will be queried from the active credential store using the provided name. If none is provided, the host-part of the XNAT URL is used as a name (e.g. 'https://central.xnat.org' -> 'central.xnat.org'). Constraints: value must be a string or value must be NONE

-f, --force

force (re-)initialization.

--interactive

enables interactive configuration based on XNAT queries. Default: enabled in interactive sessions.

-d DATASET, --dataset DATASET

specify the dataset to perform the initialization on. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) or value must be NONE

--version

show the module and its version which provides the command

Authors

datalad is developed by Michael Hanke <michael.hanke@gmail.com>.