|
@@ -71,6 +71,7 @@ extern int optind, opterr, optopt;
|
|
|
|
|
|
#ifdef ENABLE_METALINK
|
|
|
#include "MetalinkRequestInfo.h"
|
|
|
+#include "Xml2MetalinkProcessor.h"
|
|
|
#endif
|
|
|
|
|
|
#ifdef HAVE_LIBSSL
|
|
@@ -125,10 +126,10 @@ void showUsage() {
|
|
|
#endif // ENABLE_METALINK
|
|
|
cout << endl;
|
|
|
cout << _("Options:") << endl;
|
|
|
- cout << _(" -d, --dir=DIR The directory to store downloaded file.") << endl;
|
|
|
- cout << _(" -o, --out=FILE The file name for downloaded file.") << endl;
|
|
|
- cout << _(" -l, --log=LOG The file path to store log. If '-' is specified,\n"
|
|
|
- " log is written to stdout.") << endl;
|
|
|
+ cout << _(" -d, --dir=DIR The directory to store the downloaded file.") << endl;
|
|
|
+ cout << _(" -o, --out=FILE The file name of the downloaded file.") << endl;
|
|
|
+ cout << _(" -l, --log=LOG The file name of the log file. If '-' is\n"
|
|
|
+ " specified, log is written to stdout.") << endl;
|
|
|
#ifdef HAVE_DAEMON
|
|
|
cout << _(" -D, --daemon Run as daemon.") << endl;
|
|
|
#endif // HAVE_DAEMON
|
|
@@ -137,10 +138,10 @@ void showUsage() {
|
|
|
" Thus, aria2 connects to each URL with\n"
|
|
|
" N connections.\n"
|
|
|
" Default: 1") << endl;
|
|
|
- cout << _(" --retry-wait=SEC Set amount of time in second between requests\n"
|
|
|
- " for errors. Specify a value between 0 and 60.\n"
|
|
|
+ cout << _(" --retry-wait=SEC Set the seconds to wait to retry after an error\n"
|
|
|
+ " has occured. Specify a value between 0 and 60.\n"
|
|
|
" Default: 5") << endl;
|
|
|
- cout << _(" -t, --timeout=SEC Set timeout in second. Default: 60") << endl;
|
|
|
+ cout << _(" -t, --timeout=SEC Set timeout in seconds. Default: 60") << endl;
|
|
|
cout << _(" -m, --max-tries=N Set number of tries. 0 means unlimited.\n"
|
|
|
" Default: 5") << endl;
|
|
|
/*
|
|
@@ -149,22 +150,21 @@ void showUsage() {
|
|
|
" value must be greater than or equal to\n"
|
|
|
" 1024. Default: 1M") << endl;
|
|
|
*/
|
|
|
- cout << _(" --http-proxy=HOST:PORT Use HTTP proxy server. This affects to all\n"
|
|
|
- " URLs.") << endl;
|
|
|
- cout << _(" --http-user=USER Set HTTP user. This affects to all URLs.") << endl;
|
|
|
- cout << _(" --http-passwd=PASSWD Set HTTP password. This affects to all URLs.") << endl;
|
|
|
- cout << _(" --http-proxy-user=USER Set HTTP proxy user. This affects to all URLs") << endl;
|
|
|
- cout << _(" --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects to all URLs.") << endl;
|
|
|
+ cout << _(" --http-proxy=HOST:PORT Use HTTP proxy server. This affects all URLs.") << endl;
|
|
|
+ cout << _(" --http-user=USER Set HTTP user. This affects all URLs.") << endl;
|
|
|
+ cout << _(" --http-passwd=PASSWD Set HTTP password. This affects all URLs.") << endl;
|
|
|
+ cout << _(" --http-proxy-user=USER Set HTTP proxy user. This affects all URLs.") << endl;
|
|
|
+ cout << _(" --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects all URLs.") << endl;
|
|
|
cout << _(" --http-proxy-method=METHOD Set the method to use in proxy request.\n"
|
|
|
" METHOD is either 'get' or 'tunnel'.\n"
|
|
|
" Default: tunnel") << endl;
|
|
|
cout << _(" --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, basic\n"
|
|
|
" is the only supported scheme.\n"
|
|
|
" Default: basic") << endl;
|
|
|
- cout << _(" --referer=REFERER Set Referer. This affects to all URLs.") << endl;
|
|
|
- cout << _(" --ftp-user=USER Set FTP user. This affects to all URLs.\n"
|
|
|
+ cout << _(" --referer=REFERER Set Referer. This affects all URLs.") << endl;
|
|
|
+ cout << _(" --ftp-user=USER Set FTP user. This affects all URLs.\n"
|
|
|
" Default: anonymous") << endl;
|
|
|
- cout << _(" --ftp-passwd=PASSWD Set FTP password. This affects to all URLs.\n"
|
|
|
+ cout << _(" --ftp-passwd=PASSWD Set FTP password. This affects all URLs.\n"
|
|
|
" Default: ARIA2USER@") << endl;
|
|
|
cout << _(" --ftp-type=TYPE Set FTP transfer type. TYPE is either 'binary'\n"
|
|
|
" or 'ascii'.\n"
|
|
@@ -175,105 +175,103 @@ void showUsage() {
|
|
|
" Default: tunnel") << endl;
|
|
|
cout << _(" --lowest-speed-limit=SPEED Close connection if download speed is lower than\n"
|
|
|
" or equal to this value(bytes per sec).\n"
|
|
|
- " 0 means aria2 does not care lowest speed limit.\n"
|
|
|
+ " 0 means aria2 does not have a lowest speed limit.\n"
|
|
|
" You can append K or M(1K = 1024, 1M = 1024K).\n"
|
|
|
|
|
|
- " This option does not affect BitTorrent download.\n"
|
|
|
+ " This option does not affect BitTorrent downloads.\n"
|
|
|
" Default: 0") << endl;
|
|
|
cout << _(" --max-download-limit=SPEED Set max download speed in bytes per sec.\n"
|
|
|
" 0 means unrestricted.\n"
|
|
|
" You can append K or M(1K = 1024, 1M = 1024K).\n"
|
|
|
" Default: 0") << endl;
|
|
|
cout << _(" --file-allocation=METHOD Specify file allocation method. METHOD is either\n"
|
|
|
- " 'none' or 'prealloc'.\n"
|
|
|
- " 'none' doesn't pre-allocate file space. 'prealloc'\n"
|
|
|
- " pre-allocates file space before download begins.\n"
|
|
|
- " This may take some time depending on the size of\n"
|
|
|
- " file.\n"
|
|
|
+ " 'none' or 'prealloc'. 'none' doesn't pre-allocate\n"
|
|
|
+ " file space. 'prealloc' pre-allocates file space\n"
|
|
|
+ " before download begins. This may take some time\n"
|
|
|
+ " depending on the size of the file.\n"
|
|
|
" Default: none") << endl;
|
|
|
- cout << _(" --allow-overwrite=true|false If this option set to false, aria2 doesn't\n"
|
|
|
- " download a file which already exists in the file\n"
|
|
|
- " system but its corresponding .aria2 file doesn't\n"
|
|
|
- " exist.\n"
|
|
|
+ cout << _(" --allow-overwrite=true|false If false, aria2 doesn't download a file which\n"
|
|
|
+ " already exists but the corresponding .aria2 file\n"
|
|
|
+ " doesn't exist.\n"
|
|
|
" Default: false") << endl;
|
|
|
#ifdef ENABLE_MESSAGE_DIGEST
|
|
|
cout << _(" --check-integrity=true|false Check file integrity by validating piece hash.\n"
|
|
|
- " This option makes effect in BitTorrent download\n"
|
|
|
- " and Metalink with chunk checksums.\n"
|
|
|
- " Use this option to redownload a damaged portion of\n"
|
|
|
- " file.\n"
|
|
|
+ " This option only affects in BitTorrent downloads\n"
|
|
|
+ " and Metalink downloads with chunk checksums.\n"
|
|
|
+ " Use this option to re-download a damaged portion\n"
|
|
|
+ " of a file.\n"
|
|
|
" You may need to specify --allow-overwrite=true\n"
|
|
|
- " option if .aria2 file doesn't exist.\n"
|
|
|
+ " if the .aria2 file doesn't exist.\n"
|
|
|
" Default: false") << endl;
|
|
|
- cout << _(" --realtime-chunk-checksum=true|false Validate chunk checksum while downloading\n"
|
|
|
- " a file in Metalink mode. This option makes effect\n"
|
|
|
- " in Metalink with chunk checksums.\n"
|
|
|
+ cout << _(" --realtime-chunk-checksum=true|false Validate chunk checksum while\n"
|
|
|
+ " downloading a file in Metalink mode. This option\n"
|
|
|
+ " on affects Metalink mode with chunk checksums.\n"
|
|
|
" Default: true") << endl;
|
|
|
#endif // ENABLE_MESSAGE_DIGEST
|
|
|
cout << _(" -c, --continue Continue downloading a partially downloaded\n"
|
|
|
- " file. Use this option to resume a download started\n"
|
|
|
- " by web browsers or another programs\n"
|
|
|
- " which download files sequentially from the\n"
|
|
|
- " beginning. Currently this option is applicable to\n"
|
|
|
- " http(s)/ftp downloads.") << endl;
|
|
|
+ " file. Use this option to resume a download\n"
|
|
|
+ " started by a web browser or another program\n"
|
|
|
+ " which downloads files sequentially from the\n"
|
|
|
+ " beginning. Currently this option is only\n"
|
|
|
+ " applicable to http(s)/ftp downloads.") << endl;
|
|
|
cout << _(" -U, --user-agent=USER_AGENT Set user agent for http(s) downloads.") << endl;
|
|
|
cout << _(" -n, --no-netrc Disables netrc support.") << endl;
|
|
|
cout << _(" -i, --input-file=FILE Downloads URIs found in FILE. You can specify\n"
|
|
|
- " multiple URIs for a single entity: deliminate\n"
|
|
|
- " URIs by Tab in a single line.\n"
|
|
|
+ " multiple URIs for a single entity: separate\n"
|
|
|
+ " URIs on a single line using the TAB character.\n"
|
|
|
" Reads input from stdin when '-' is specified.") << endl;
|
|
|
cout << _(" -j, --max-concurrent-downloads=N Set maximum number of concurrent downloads.\n"
|
|
|
- " It should be used with -i option.\n"
|
|
|
+ " It should be used with the -i option.\n"
|
|
|
" Default: 5") << endl;
|
|
|
cout << _(" --load-cookies=FILE Load cookies from FILE. The format of FILE is\n"
|
|
|
- " one used by Netscape and Mozilla.") << endl;
|
|
|
+ " the same used by Netscape and Mozilla.") << endl;
|
|
|
#if defined ENABLE_BITTORRENT || ENABLE_METALINK
|
|
|
cout << _(" -S, --show-files Print file listing of .torrent or .metalink file\n"
|
|
|
" and exit.") << endl;
|
|
|
cout << _(" --select-file=INDEX... Set file to download by specifing its index.\n"
|
|
|
- " You can know file index through --show-files\n"
|
|
|
- " option. Multiple indexes can be specified by using\n"
|
|
|
- " ',' like \"3,6\".\n"
|
|
|
- " You can also use '-' to specify rangelike \"1-5\".\n"
|
|
|
+ " You can find the file index using the\n"
|
|
|
+ " --show-files option. Multiple indexes can be\n"
|
|
|
+ " specified by using ',', for example: \"3,6\".\n"
|
|
|
+ " You can also use '-' to specify a range: \"1-5\".\n"
|
|
|
" ',' and '-' can be used together.\n"
|
|
|
- " When used with -M option, index may vary depending\n"
|
|
|
- " on the query(see --metalink-* options).") << endl;
|
|
|
+ " When used with the -M option, index may vary\n"
|
|
|
+ " depending on the query(see --metalink-* options).") << endl;
|
|
|
#endif // ENABLE_BITTORRENT || ENABLE_METALINK
|
|
|
#ifdef ENABLE_BITTORRENT
|
|
|
- cout << _(" -T, --torrent-file=TORRENT_FILE The file path to .torrent file.") << endl;
|
|
|
- cout << _(" --follow-torrent=true|false Setting this option to false prevents aria2 to\n"
|
|
|
- " enter BitTorrent mode even if the filename of\n"
|
|
|
- " downloaded file ends with .torrent.\n"
|
|
|
+ cout << _(" -T, --torrent-file=TORRENT_FILE The path to the .torrent file.") << endl;
|
|
|
+ cout << _(" --follow-torrent=true|false Set to false to prevent aria2 from\n"
|
|
|
+ " entering BitTorrent mode even if the filename of\n"
|
|
|
+ " the downloaded file ends with .torrent.\n"
|
|
|
" Default: true") << endl;
|
|
|
cout << _(" --direct-file-mapping=true|false Directly read from and write to each file\n"
|
|
|
" mentioned in .torrent file.\n"
|
|
|
" Default: true") << endl;
|
|
|
- cout << _(" --listen-port=PORT Set port number to listen to for peer connection.\n"
|
|
|
+ cout << _(" --listen-port=PORT Set TCP port number for BitTorrent downloads.\n"
|
|
|
" Default: 6881-6999") << endl;
|
|
|
cout << _(" --max-upload-limit=SPEED Set max upload speed in bytes per sec.\n"
|
|
|
" 0 means unrestricted.\n"
|
|
|
" You can append K or M(1K = 1024, 1M = 1024K).\n"
|
|
|
" Default: 0") << endl;
|
|
|
- cout << _(" --seed-time=MINUTES Specify seeding time in minutes. See also\n"
|
|
|
+ cout << _(" --seed-time=MINUTES Specify seeding time in minutes. Also see the\n"
|
|
|
" --seed-ratio option.") << endl;
|
|
|
- cout << _(" --seed-ratio=RATIO Specify share ratio. Seed completed torrents until\n"
|
|
|
- " share ratio reaches RATIO. 1.0 is encouraged.\n"
|
|
|
- " If --seed-time option is specified along with\n"
|
|
|
- " this option, seeding ends when at least one of\n"
|
|
|
- " the conditions is satisfied.") << endl;
|
|
|
+ cout << _(" --seed-ratio=RATIO Specify share ratio. Seed completed torrents\n"
|
|
|
+ " until share ratio reaches RATIO. 1.0 is\n"
|
|
|
+ " encouraged. If --seed-time option is specified\n"
|
|
|
+ " along with this option, seeding ends when at\n"
|
|
|
+ " least one of the conditions is satisfied.") << endl;
|
|
|
#endif // ENABLE_BITTORRENT
|
|
|
#ifdef ENABLE_METALINK
|
|
|
- cout << _(" -M, --metalink-file=METALINK_FILE The file path to .metalink file.") << endl;
|
|
|
+ cout << _(" -M, --metalink-file=METALINK_FILE The file path to the .metalink file.") << endl;
|
|
|
cout << _(" -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n"
|
|
|
" simultaneously.\n"
|
|
|
" Default: 5") << endl;
|
|
|
- cout << _(" --metalink-version=VERSION The version of file to download.") << endl;
|
|
|
- cout << _(" --metalink-language=LANGUAGE The language of file to download.") << endl;
|
|
|
- cout << _(" --metalink-os=OS The operating system the file is targeted.") << endl;
|
|
|
+ cout << _(" --metalink-version=VERSION The version of the file to download.") << endl;
|
|
|
+ cout << _(" --metalink-language=LANGUAGE The language of the file to download.") << endl;
|
|
|
+ cout << _(" --metalink-os=OS The operating system of the file to download.") << endl;
|
|
|
cout << _(" --metalink-location=LOCATION The location of the prefered server.") << endl;
|
|
|
- cout << _(" --follow-metalink=true|false Setting this option to false prevents aria2 to\n"
|
|
|
- " enter Metalink mode even if the filename of\n"
|
|
|
- " downloaded file ends with .metalink.\n"
|
|
|
+ cout << _(" --follow-metalink=true|false Set to false to prevent aria2 from\n"
|
|
|
+ " entering Metalink mode even if the filename of\n"
|
|
|
+ " the downloaded file ends with .metalink.\n"
|
|
|
" Default: true") << endl;
|
|
|
#endif // ENABLE_METALINK
|
|
|
cout << _(" -v, --version Print the version number and exit.") << endl;
|
|
@@ -281,20 +279,20 @@ void showUsage() {
|
|
|
cout << endl;
|
|
|
cout << "URL:" << endl;
|
|
|
cout << _(" You can specify multiple URLs. All URLs must point to the same file\n"
|
|
|
- " or downloading fails.") << endl;
|
|
|
+ " or downloading will fail.") << endl;
|
|
|
cout << endl;
|
|
|
#ifdef ENABLE_BITTORRENT
|
|
|
cout << "FILE:" << endl;
|
|
|
- cout << _(" Specify files in multi-file torrent to download. Use conjunction with\n"
|
|
|
- " -T option. This arguments are ignored if you specify --select-file option.") << endl;
|
|
|
+ cout << _(" Specify files in multi-file torrent to download. Use in conjunction with the\n"
|
|
|
+ " -T option. This argument is ignored if you specify the --select-file option.") << endl;
|
|
|
cout << endl;
|
|
|
#endif // ENABLE_BITTORRENT
|
|
|
cout << _("Examples:") << endl;
|
|
|
- cout << _(" Download a file by 1 connection:") << endl;
|
|
|
+ cout << _(" Download a file using 1 connection:") << endl;
|
|
|
cout << " aria2c http://AAA.BBB.CCC/file.zip" << endl;
|
|
|
- cout << _(" Download a file by 2 connections:") << endl;
|
|
|
+ cout << _(" Download a file using 2 connections:") << endl;
|
|
|
cout << " aria2c -s 2 http://AAA.BBB.CCC/file.zip" << endl;
|
|
|
- cout << _(" Download a file by 2 connections, each connects to a different server:") << endl;
|
|
|
+ cout << _(" Download a file using 2 connections, each connects to a different server:") << endl;
|
|
|
cout << " aria2c http://AAA.BBB.CCC/file.zip http://DDD.EEE.FFF/GGG/file.zip" << endl;
|
|
|
cout << _(" You can mix up different protocols:") << endl;
|
|
|
cout << " aria2c http://AAA.BBB.CCC/file.zip ftp://DDD.EEE.FFF/GGG/file.zip" << endl;
|
|
@@ -302,7 +300,7 @@ void showUsage() {
|
|
|
cout << endl;
|
|
|
cout << _(" Download a torrent:") << endl;
|
|
|
cout << " aria2c -o test.torrent http://AAA.BBB.CCC/file.torrent" << endl;
|
|
|
- cout << _(" Download a torrent using local .torrent file:") << endl;
|
|
|
+ cout << _(" Download a torrent using a local .torrent file:") << endl;
|
|
|
cout << " aria2c -T test.torrent" << endl;
|
|
|
cout << _(" Download only selected files:") << endl;
|
|
|
cout << " aria2c -T test.torrent dir/file1.zip dir/file2.zip" << endl;
|