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-ip-addresses in
18 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 Setting this to "cpus" will run one job per CPU core.
77
78 --batch
79 Enables batch mode, in which lines containing urls to add are
80 read from stdin.
81
82 -z Makes the --batch input be delimited by nulls instead of the
83 usual newlines.
84
85 --with-files
86 When batch mode is enabled, makes it parse lines of the form:
87 "$url $file"
88
89 That adds the specified url to the specified file, downloading
90 its content if the file does not yet exist; the same as git
91 annex addurl $url --file $file
92
93 --json Enable JSON output. This is intended to be parsed by programs
94 that use git-annex. Each line of output is a JSON object.
95
96 --json-progress
97 Include progress objects in JSON output.
98
99 --json-error-messages
100 Messages that would normally be output to standard error are
101 included in the json instead.
102
104 If annex.largefiles is configured, and does not match a file, git annex
105 addurl will add the non-large file directly to the git repository,
106 instead of to the annex. However, this is not done when --fast or
107 --relaxed is used.
108
110 git-annex(1)
111
112 git-annex-rmurl(1)
113
114 git-annex-registerurl(1)
115
116 git-annex-importfeed(1)
117
119 Joey Hess <id@joeyh.name>
120
121 git-annex-addurl(1)