1datalad add-archive-content(1G)eneral Commands Manudaaltalad add-archive-content(1)
2
3
4

NAME

6       datalad add-archive-content - add content of an archive under git annex
7       control.
8

SYNOPSIS

10       datalad add-archive-content [-h] [-d DATASET] [--annex  ANNEX]  [--add-
11              archive-leading-dir]   [--strip-leading-dirs]   [--leading-dirs-
12              depth            LEADING_DIRS_DEPTH]            [--leading-dirs-
13              consider LEADING_DIRS_CONSIDER] [--use-current-dir] [-D] [--key]
14              [-e EXCLUDE] [-r  RENAME]  [--existing  {fail,overwrite,archive-
15              suffix,numeric-suffix}]   [-o   ANNEX_OPTIONS]  [--copy]  [--no-
16              commit]   [--allow-dirty]   [--stats    STATS]    [--drop-after]
17              [--delete-after] [--version] archive
18
19
20

DESCRIPTION

22       Given  an  already  annex'ed  archive, extract and add its files to the
23       dataset, and reference the original archive as a custom special remote.
24
25   Examples
26       Add files from the  archive  'big_tarball.tar.gz',  but  keep  big_tar‐
27       ball.tar.gz in the index::
28
29        % datalad add-archive-content big_tarball.tar.gz
30
31       Add  files  from  the  archive  'tarball.tar.gz',  and  remove big_tar‐
32       ball.tar.gz from the index::
33
34        % datalad add-archive-content big_tarball.tar.gz --delete
35
36       Add files from the archive 's3.zip' but remove the leading directory::
37
38        % datalad add-archive-content s3.zip --strip-leading-dirs
39
40

OPTIONS

42       archive
43              archive file or a key (if --key specified).  Constraints:  value
44              must be a string
45
46
47       -h, --help, --help-np
48              show this help message. --help-np forcefully disables the use of
49              a pager for displaying the help message
50
51       -d DATASET, --dataset DATASET
52              "specify the dataset to  save.  Constraints:  Value  must  be  a
53              Dataset or a valid identifier of a Dataset (e.g. a path) or val‐
54              ue must be NONE
55
56       --annex ANNEX
57              DEPRECATED. Use the 'dataset' parameter instead.
58
59       --add-archive-leading-dir
60              place extracted content under a directory which would correspond
61              to the archive name with all suffixes stripped. E.g. the content
62              of `archive.tar.gz` will be extracted under `archive/`.
63
64       --strip-leading-dirs
65              remove one or more leading directories from the  archive  layout
66              on extraction.
67
68       --leading-dirs-depth LEADING_DIRS_DEPTH
69              maximum  depth of leading directories to strip. If not specified
70              (None), no limit.
71
72       --leading-dirs-consider LEADING_DIRS_CONSIDER
73              regular expression(s) for directories to consider to strip away.
74              Constraints: value must be a string or value must be NONE
75
76       --use-current-dir
77              extract  the archive under the current directory, not the direc‐
78              tory where the archive is located. This parameter is applied au‐
79              tomatically if --key was used.
80
81       -D, --delete
82              delete original archive from the filesystem/Git in current tree.
83              Note that it will be of no effect if --key is given.
84
85       --key  signal if provided archive is not actually a filename on its own
86              but  an  annex key. The archive will be extracted in the current
87              directory.
88
89       -e EXCLUDE, --exclude EXCLUDE
90              regular expressions for filenames which to  exclude  from  being
91              added to annex. Applied after --rename if that one is specified.
92              For exact matching, use anchoring. Constraints: value must be  a
93              string or value must be NONE
94
95       -r RENAME, --rename RENAME
96              regular  expressions  to rename files before added them under to
97              Git. The first defines how to split  provided  string  into  two
98              parts:  Python regular expression (with groups), and replacement
99              string. Constraints: value must be a string  or  value  must  be
100              NONE
101
102       --existing {fail, overwrite, archive-suffix, numeric-suffix}
103              what  operation  to  perform  if a file from an archive tries to
104              overwrite an existing file with the same name. 'fail'  (default)
105              leads to an error result, 'overwrite' silently replaces existing
106              file, 'archive-suffix' instructs to add a suffix (prefixed  with
107              a '-') matching archive name from which file gets extracted, and
108              if that one is present as well, 'numeric-suffix' is in effect in
109              addition,  when incremental numeric suffix (prefixed with a '.')
110              is added until no name collision is longer  detected.  [Default:
111              'fail']
112
113       -o ANNEX_OPTIONS, --annex-options ANNEX_OPTIONS
114              additional options to pass to git-annex. Constraints: value must
115              be a string or value must be NONE
116
117       --copy copy the content of the archive instead of moving.
118
119       --no-commit
120              don't commit upon completion.
121
122       --allow-dirty
123              flag that operating on a dirty repository  (uncommitted  or  un‐
124              tracked content) is ok.
125
126       --stats STATS
127              ActivityStats instance for global tracking.
128
129       --drop-after
130              drop extracted files after adding to annex.
131
132       --delete-after
133              extract  under  a temporary directory, git-annex add, and delete
134              afterwards. To be used to "index" files within annex without ac‐
135              tually  creating corresponding files under git. Note that `annex
136              dropunused` would later remove that load.
137
138       --version
139              show the module and its version which provides the command
140

AUTHORS

142        datalad is developed by The DataLad Team and Contributors <team@datal‐
143       ad.org>.
144
145
146
147datalad add-archive-content 0.19.32023-08-11    datalad add-archive-content(1)
Impressum