.TH git-annex-addurl 1 .SH NAME git-annex-addurl \- add urls to annex .PP .SH SYNOPSIS git annex addurl \fB[url ...]\fP .PP .SH DESCRIPTION Downloads each url to its own file, which is added to the annex. .PP When \fByt\-dlp\fP is installed, it can be used to check for a video embedded in a web page at the url, and that is added to the annex instead. (However, this is disabled by default as it can be a security risk. See the documentation of annex.security.allowed\-ip\-addresses in git-annex(1) for details.) .PP Special remotes can add other special handling of particular urls. For example, the bittorrent special remotes makes urls to torrent files (including magnet links) download the content of the torrent, using \fBaria2c\fP. .PP Normally the filename is based on the full url, so will look like "www.example.com_dir_subdir_bigfile". In some cases, addurl is able to come up with a better filename based on other information. Options can also be used to get better filenames. .PP .SH OPTIONS .IP "\fB\-\-fast\fP" .IP Avoid immediately downloading the url. The url is still checked (via HEAD) to verify that it exists, and to get its size if possible. .IP .IP "\fB\-\-relaxed\fP" Don't immediately download the url, and avoid storing the size of the url's content. This makes git-annex accept whatever content is there at a future point. .IP This is the fastest option, but it still has to access the network to check if the url contains embedded media. When adding large numbers of urls, using \fB\-\-relaxed \-\-raw\fP is much faster. .IP .IP "\fB\-\-raw\fP" Prevent special handling of urls by yt\-dlp, bittorrent, and other special remotes. This will for example, make addurl download the .torrent file and not the contents it points to. .IP .IP "\fB\-\-no\-raw\fP" Require content pointed to by the url to be downloaded using yt\-dlp or a special remote, rather than the raw content of the url. if that cannot be done, the add will fail. .IP .IP "\fB\-\-file=name\fP" Use with a filename that does not yet exist to add a new file with the specified name and the content downloaded from the url. .IP If the file already exists, addurl will record that it can be downloaded from the specified url(s). .IP .IP "\fB\-\-preserve\-filename\fP" When the web server (or torrent, etc) provides a filename, use it as\-is, avoiding sanitizing unusual characters, or truncating it to length, or any other modifications. .IP git-annex will still check the filename for safety, and if the filename has a security problem such as path traversal or a control character, it will refuse to add it. .IP .IP "\fB\-\-pathdepth=N\fP" Rather than basing the filename on the whole url, this causes a path to be constructed, starting at the specified depth within the path of the url. .IP For example, adding the url http://www.example.com/dir/subdir/bigfile with \fB\-\-pathdepth=1\fP will use "dir/subdir/bigfile", while \fB\-\-pathdepth=3\fP will use "bigfile". .IP It can also be negative; \fB\-\-pathdepth=\-2\fP will use the last two parts of the url. .IP .IP "\fB\-\-prefix=foo\fP \fB\-\-suffix=bar\fP" Use to adjust the filenames that are created by addurl. For example, \fB\-\-suffix=.mp3\fP can be used to add an extension to the file. .IP .IP "\fB\-\-no\-check\-gitignore\fP" By default, gitignores are honored and it will refuse to download an url to a file that would be ignored. This makes such files be added despite any ignores. .IP .IP "\fB\-\-jobs=N\fP \fB\-JN\fP" Enables parallel downloads when multiple urls are being added. For example: \fB\-J4\fP .IP Setting this to "cpus" will run one job per CPU core. .IP .IP "\fB\-\-batch\fP" Enables batch mode, in which lines containing urls to add are read from stdin. .IP .IP "\fB\-z\fP" Makes the \fB\-\-batch\fP input be delimited by nulls instead of the usual newlines. .IP .IP "\fB\-\-with\-files\fP" When batch mode is enabled, makes it parse lines of the form: "$url $file" .IP That adds the specified url to the specified file, downloading its content if the file does not yet exist; the same as \fBgit annex addurl $url \-\-file $file\fP .IP .IP "\fB\-\-json\fP" Enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object. .IP .IP "\fB\-\-json\-progress\fP" Include progress objects in JSON output. .IP .IP "\fB\-\-json\-error\-messages\fP" Messages that would normally be output to standard error are included in the JSON instead. .IP .IP "\fB\-\-backend\fP" Specifies which key\-value backend to use. .IP .IP "Also the git-annex\-common\-options(1) can be used." .SH CAVEATS If annex.largefiles is configured, and does not match a file, git annex addurl will add the non\-large file directly to the git repository, instead of to the annex. However, this is not done when \-\-fast or \-\-relaxed is used. .PP .SH SEE ALSO git-annex(1) .PP git-annex\-rmurl(1) .PP git-annex\-registerurl(1) .PP git-annex\-importfeed(1) .PP .SH AUTHOR Joey Hess .PP .PP