1git-annex-addurl(1) General Commands Manual git-annex-addurl(1)
2
3
4
6 git-annex-addurl - add urls to annex
7
9 git annex addurl [url ...]
10
12 Downloads each url to its own file, which is added to the annex.
13
14 When youtube-dl is installed, it can be used to check for a video
15 embedded in a web page at the url, and that is added to the annex
16 instead. (However, this is disabled by default as it can be a security
17 risk. See the documentation of annex.security.allowed-http-addresses
18 in git-annex(1) for details.)
19
20 Urls to torrent files (including magnet links) will cause the content
21 of the torrent to be downloaded, using aria2c.
22
23 Normally the filename is based on the full url, so will look like
24 "www.example.com_dir_subdir_bigfile". In some cases, addurl is able to
25 come up with a better filename based on other information. Options can
26 also be used to get better filenames.
27
29 --fast
30
31 Avoid immediately downloading the url. The url is still checked
32 (via HEAD) to verify that it exists, and to get its size if pos‐
33 sible.
34
35 --relaxed
36 Don't immediately download the url, and avoid storing the size
37 of the url's content. This makes git-annex accept whatever con‐
38 tent is there at a future point.
39
40 This is the fastest option, but it still has to access the net‐
41 work to check if the url contains embedded media. When adding
42 large numbers of urls, using --relaxed --raw is much faster.
43
44 --raw Prevent special handling of urls by youtube-dl, bittorrent, and
45 other special remotes. This will for example, make addurl down‐
46 load the .torrent file and not the contents it points to.
47
48 --file=name
49 Use with a filename that does not yet exist to add a new file
50 with the specified name and the content downloaded from the url.
51
52 If the file already exists, addurl will record that it can be
53 downloaded from the specified url(s).
54
55 --pathdepth=N
56 Rather than basing the filename on the whole url, this causes a
57 path to be constructed, starting at the specified depth within
58 the path of the url.
59
60 For example, adding the url http://www.example.com/dir/sub‐
61 dir/bigfile with --pathdepth=1 will use "dir/subdir/bigfile",
62 while --pathdepth=3 will use "bigfile".
63
64 It can also be negative; --pathdepth=-2 will use the last two
65 parts of the url.
66
67 --prefix=foo --suffix=bar
68 Use to adjust the filenames that are created by addurl. For
69 example, --suffix=.mp3 can be used to add an extension to the
70 file.
71
72 --jobs=N -JN
73 Enables parallel downloads when multiple urls are being added.
74 For example: -J4
75
76 --batch
77 Enables batch mode, in which lines containing urls to add are
78 read from stdin.
79
80 -z Makes the --batch input be delimited by nulls instead of the
81 usual newlines.
82
83 --with-files
84 When batch mode is enabled, makes it parse lines of the form:
85 "$url $file"
86
87 That adds the specified url to the specified file, downloading
88 its content if the file does not yet exist; the same as git
89 annex addurl $url --file $file
90
91 --json Enable JSON output. This is intended to be parsed by programs
92 that use git-annex. Each line of output is a JSON object.
93
94 --json-progress
95 Include progress objects in JSON output.
96
97 --json-error-messages
98 Messages that would normally be output to standard error are
99 included in the json instead.
100
102 If annex.largefiles is configured, and does not match a file, git annex
103 addurl will add the non-large file directly to the git repository,
104 instead of to the annex. However, this is not done when --fast or
105 --relaxed is used.
106
108 git-annex(1)
109
110 git-annex-rmurl(1)
111
112 git-annex-registerurl(1)
113
114 git-annex-importfeed(1)
115
117 Joey Hess <id@joeyh.name>
118
119 git-annex-addurl(1)