.TH "datalad add-archive-content" "1" "2023\-07\-03" "datalad add-archive-content 0.19.2" .SH NAME \fBdatalad add-archive-content\fR \- add content of an archive under git annex control. .SH SYNOPSIS .nh .HP \fBdatalad add\-archive\-content\fR [-h] [-d\~DATASET] [--annex\~ANNEX] [--add-archive-leading-dir] [--strip-leading-dirs] [--leading-dirs-depth\~LEADING_DIRS_DEPTH] [--leading-dirs-consider\~LEADING_DIRS_CONSIDER] [--use-current-dir] [-D] [--key] [-e\~EXCLUDE] [-r\~RENAME] [--existing {fail,overwrite,archive-suffix,numeric-suffix}] [-o\~ANNEX_OPTIONS] [--copy] [--no-commit] [--allow-dirty] [--stats\~STATS] [--drop-after] [--delete-after] [--version] archive .hy .SH DESCRIPTION Given an already annex'ed archive, extract and add its files to the dataset, and reference the original archive as a custom special remote. .PP .SS Examples .PP Add files from the archive 'big_tarball.tar.gz', but keep big_tarball.tar.gz in the index:: .PP % datalad add\-archive\-content big_tarball.tar.gz .PP Add files from the archive 'tarball.tar.gz', and remove big_tarball.tar.gz from the index:: .PP % datalad add\-archive\-content big_tarball.tar.gz \-\-delete .PP Add files from the archive 's3.zip' but remove the leading directory:: .PP % datalad add\-archive\-content s3.zip \-\-strip\-leading\-dirs .SH OPTIONS .TP archive archive file or a key (if --key specified). 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 "specify the dataset to save. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) or value must be NONE .TP \fB--annex\fR \fI\s-1ANNEX\s0\fR DEPRECATED. Use the 'dataset' parameter instead. .TP \fB--add-archive-leading-dir\fR place extracted content under a directory which would correspond to the archive name with all suffixes stripped. E.g. the content of `archive.tar.gz` will be extracted under `archive/`. .TP \fB--strip-leading-dirs\fR remove one or more leading directories from the archive layout on extraction. .TP \fB--leading-dirs-depth\fR \fI\s-1LEADING_DIRS_DEPTH\s0\fR maximum depth of leading directories to strip. If not specified (None), no limit. .TP \fB--leading-dirs-consider\fR \fI\s-1LEADING_DIRS_CONSIDER\s0\fR regular expression(s) for directories to consider to strip away. Constraints: value must be a string or value must be NONE .TP \fB--use-current-dir\fR extract the archive under the current directory, not the directory where the archive is located. This parameter is applied automatically if --key was used. .TP \fB-D\fR, \fB--delete\fR delete original archive from the filesystem/Git in current tree. Note that it will be of no effect if --key is given. .TP \fB--key\fR signal if provided archive is not actually a filename on its own but an annex key. The archive will be extracted in the current directory. .TP \fB-e\fR \fI\s-1EXCLUDE\s0\fR, \fB--exclude\fR \fI\s-1EXCLUDE\s0\fR regular expressions for filenames which to exclude from being added to annex. Applied after --rename if that one is specified. For exact matching, use anchoring. Constraints: value must be a string or value must be NONE .TP \fB-r\fR \fI\s-1RENAME\s0\fR, \fB--rename\fR \fI\s-1RENAME\s0\fR regular expressions to rename files before added them under to Git. The first defines how to split provided string into two parts: Python regular expression (with groups), and replacement string. Constraints: value must be a string or value must be NONE .TP \fB--existing\fR {fail, overwrite, archive-suffix, numeric-suffix} what operation to perform if a file from an archive tries to overwrite an existing file with the same name. 'fail' (default) leads to an error result, 'overwrite' silently replaces existing file, 'archive-suffix' instructs to add a suffix (prefixed with a '-') matching archive name from which file gets extracted, and if that one is present as well, 'numeric-suffix' is in effect in addition, when incremental numeric suffix (prefixed with a '.') is added until no name collision is longer detected. [Default: 'fail'] .TP \fB-o\fR \fI\s-1ANNEX_OPTIONS\s0\fR, \fB--annex-options\fR \fI\s-1ANNEX_OPTIONS\s0\fR additional options to pass to git-annex. Constraints: value must be a string or value must be NONE .TP \fB--copy\fR copy the content of the archive instead of moving. .TP \fB--no-commit\fR don't commit upon completion. .TP \fB--allow-dirty\fR flag that operating on a dirty repository (uncommitted or untracked content) is ok. .TP \fB--stats\fR \fI\s-1STATS\s0\fR ActivityStats instance for global tracking. .TP \fB--drop-after\fR drop extracted files after adding to annex. .TP \fB--delete-after\fR extract under a temporary directory, git-annex add, and delete afterwards. To be used to "index" files within annex without actually creating corresponding files under git. Note that `annex dropunused` would later remove that load. .TP \fB--version\fR show the module and its version which provides the command .SH AUTHORS datalad is developed by The DataLad Team and Contributors .