.TH "datalad metadata" "1" "2021\-07\-23" "datalad metadata 0.14.6" .SH NAME \fBdatalad metadata\fR \- metadata reporting for files and entire datasets .SH SYNOPSIS .nh .HP \fBdatalad metadata\fR [-h] [-d\~DATASET] [--get-aggregates] [--reporton\~TYPE] [-r] [PATH ...] .hy .SH DESCRIPTION Two types of metadata are supported: .PP 1. metadata describing a dataset as a whole (dataset\-global metadata), and .PP 2. metadata for files in a dataset (content metadata). .PP Both types can be accessed with this command. .PP Examples: .PP Report the metadata of a single file, as aggregated into the closest locally available dataset, containing the query path:: .PP % datalad metadata somedir/subdir/thisfile.dat .PP Sometimes it is helpful to get metadata records formatted in a more accessible form, here as pretty\-printed JSON:: .PP % datalad \-f json_pp metadata somedir/subdir/thisfile.dat .PP Same query as above, but specify which dataset to query (must be containing the query path):: .PP % datalad metadata \-d . somedir/subdir/thisfile.dat .PP Report any metadata record of any dataset known to the queried dataset:: .PP % datalad metadata \-\-recursive \-\-reporton datasets .PP Get a JSON\-formatted report of aggregated metadata in a dataset, incl. information on enabled metadata extractors, dataset versions, dataset IDs, and dataset paths:: .PP % datalad \-f json metadata \-\-get\-aggregates .SH OPTIONS .TP PATH path(s) to query metadata for. Constraints: value must be a string .TP \fB-h\fR, \fB--help\fR, \fB--help-np\fR show this help message. --help-np forcefully disables the use of a pager for displaying the help message .TP \fB-d\fR \fI\s-1DATASET\s0\fR, \fB--dataset\fR \fI\s-1DATASET\s0\fR dataset to query. If given, metadata will be reported as stored in this dataset. Otherwise, the closest available dataset containing a query path will be consulted. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) .TP \fB--get-aggregates\fR if set, yields all (sub)datasets for which aggregate metadata are available in the dataset. No other action is performed, even if other arguments are given. The reported results contain a datasets's ID, the commit hash at which metadata aggregation was performed, and the location of the object file(s) containing the aggregated metadata. .TP \fB--reporton\fR TYPE choose on what type result to report on: 'datasets', 'files', 'all' (both datasets and files), or 'none' (no report). Constraints: value must be one of ('all', 'datasets', 'files', 'none') [Default: 'all'] .TP \fB-r\fR, \fB--recursive\fR if set, recurse into potential subdataset. .SH AUTHORS datalad is developed by The DataLad Team and Contributors .