summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-11-16 08:06:56 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-11-16 08:06:56 +0000
commit3c154144207cb5a403926872a2194eb5c61e18e6 (patch)
treeac9e92bbb4a4da2199623d388deb2d59cc16b18b
parentadb4ef2168934c1f6223172768ba2218dc475765 (diff)
2008-11-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added -V for the short form of --check-integrity option. Now the argument of --check-integrity option is optional: if it is omitted, it is evaluated as true. * doc/aria2c.1.txt * src/option_processing.cc * src/usage_text.h
-rw-r--r--ChangeLog9
-rw-r--r--doc/aria2c.114
-rw-r--r--doc/aria2c.1.html18
-rw-r--r--doc/aria2c.1.txt26
-rw-r--r--src/option_processing.cc10
-rw-r--r--src/usage_text.h4
6 files changed, 45 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index 7795a058..979649dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2008-11-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
+ Added -V for the short form of --check-integrity option.
+ Now the argument of --check-integrity option is optional:
+ if it is omitted, it is evaluated as true.
+ * doc/aria2c.1.txt
+ * src/option_processing.cc
+ * src/usage_text.h
+
+2008-11-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
+
Made the default value of --ftp-pasv option set to true and it can take
true/false values.
* src/OptionHandlerFactory.cc
diff --git a/doc/aria2c.1 b/doc/aria2c.1
index fa0289fe..19012251 100644
--- a/doc/aria2c.1
+++ b/doc/aria2c.1
@@ -54,9 +54,9 @@ option\&. Default:
\fI5\fR
.RE
.PP
-\fB\-\-check\-integrity\fR=\fItrue\fR|\fIfalse\fR
+\fB\-V\fR, \fB\-\-check\-integrity\fR[=\fItrue\fR|\fIfalse\fR]
.RS 4
-Check file integrity by validating piece hash\&. This option only affects in BitTorrent downloads and Metalink downloads with chunk checksums\&. Use this option to re\-download a damaged portion of a file\&. Default:
+Check file integrity by validating piece hashes\&. This option has effect only in BitTorrent and Metalink downloads with chunk checksums\&. Use this option to re\-download a damaged portion of a file\&. Default:
\fIfalse\fR
.RE
.PP
@@ -1310,12 +1310,12 @@ aria2c \-\-max\-download\-limit=100K file\&.metalink
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
-Repair a damaged download using --check-integrity option
+Repair a damaged download using -V option
.RS
.sp
.RS 4
.nf
-aria2c \-\-check\-integrity=true file\&.metalink
+aria2c \-V file\&.metalink
.fi
.RE
.sp
@@ -1422,15 +1422,15 @@ aria2 uses a control file to keep track the progress of download\&. A control fi
.sp
Usually a control file is deleted once download completed\&. If aria2 decides that download cannot be resumed(for example, when downloading a file from a HTTP server which doesn\'t support resume), a control file is not created\&.
.sp
-Normally if you lose a control file, you cannot resume download\&. But if you have a torrent or metalink with chunk checksums for the file, you can resume the download without a control file by giving \-\-check\-integrity=true option to aria2c in command\-line\&.
+Normally if you lose a control file, you cannot resume download\&. But if you have a torrent or metalink with chunk checksums for the file, you can resume the download without a control file by giving \-V option to aria2c in command\-line\&.
.sp
.SH "SEEDING DOWNLOADED FILE IN BITTORRENT"
-You can seed downloaded file using \-\-check\-integrity=true option\&.
+You can seed downloaded file using \-V option\&.
.sp
.sp
.RS 4
.nf
-aria2c \-\-check\-integrity=true file\&.torrent
+aria2c \-V file\&.torrent
.fi
.RE
.SH "INPUT FILE"
diff --git a/doc/aria2c.1.html b/doc/aria2c.1.html
index e3278fb0..48f4736d 100644
--- a/doc/aria2c.1.html
+++ b/doc/aria2c.1.html
@@ -424,12 +424,12 @@ ARIA2C(1) Manual Page
</p>
</dd>
<dt>
-<strong>--check-integrity</strong>=<em>true</em>|<em>false</em>
+<strong>-V</strong>, <strong>--check-integrity</strong>[=<em>true</em>|<em>false</em>]
</dt>
<dd>
<p>
- Check file integrity by validating piece hash.
- This option only affects in BitTorrent downloads and Metalink downloads with
+ Check file integrity by validating piece hashes.
+ This option has effect only in BitTorrent and Metalink downloads with
chunk checksums.
Use this option to re-download a damaged portion of a file.
Default: <em>false</em>
@@ -1732,10 +1732,10 @@ encrypted one is given is undefined.</td>
<div class="content">
<pre><tt>aria2c --max-download-limit=100K file.metalink</tt></pre>
</div></div>
-<h4 id="_repair_a_damaged_download_using_check_integrity_option">Repair a damaged download using --check-integrity option</h4>
+<h4 id="_repair_a_damaged_download_using_v_option">Repair a damaged download using -V option</h4>
<div class="listingblock">
<div class="content">
-<pre><tt>aria2c --check-integrity=true file.metalink</tt></pre>
+<pre><tt>aria2c -V file.metalink</tt></pre>
</div></div>
<div class="admonitionblock">
<table><tr>
@@ -1812,14 +1812,14 @@ not created.</p></div>
<div class="para"><p>Normally if you lose a control file, you cannot resume download.
But if you have a torrent or metalink with chunk checksums for the file,
you can resume the download without a control file by giving
---check-integrity=true option to aria2c in command-line.</p></div>
+-V option to aria2c in command-line.</p></div>
</div>
<h2 id="_seeding_downloaded_file_in_bittorrent">SEEDING DOWNLOADED FILE IN BITTORRENT</h2>
<div class="sectionbody">
-<div class="para"><p>You can seed downloaded file using --check-integrity=true option.</p></div>
+<div class="para"><p>You can seed downloaded file using -V option.</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>aria2c --check-integrity=true file.torrent</tt></pre>
+<pre><tt>aria2c -V file.torrent</tt></pre>
</div></div>
</div>
<h2 id="_input_file">INPUT FILE</h2>
@@ -2021,7 +2021,7 @@ files in the program, then also delete it here.</p></div>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2008-11-16 13:40:15 JST
+Last updated 2008-11-16 13:49:20 JST
</div>
</div>
</body>
diff --git a/doc/aria2c.1.txt b/doc/aria2c.1.txt
index 2ff669f2..e31889c8 100644
--- a/doc/aria2c.1.txt
+++ b/doc/aria2c.1.txt
@@ -39,9 +39,9 @@ Basic Options
torrent and metalink. See also *-s* and *-C* option.
Default: '5'
-*--check-integrity*='true'|'false'::
- Check file integrity by validating piece hash.
- This option only affects in BitTorrent downloads and Metalink downloads with
+*-V*, *--check-integrity*[='true'|'false']::
+ Check file integrity by validating piece hashes.
+ This option has effect only in BitTorrent and Metalink downloads with
chunk checksums.
Use this option to re-download a damaged portion of a file.
Default: 'false'
@@ -791,11 +791,11 @@ Throttle download speed
aria2c --max-download-limit=100K file.metalink
-------------------------------------------------
-Repair a damaged download using --check-integrity option
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-----------------------------------------------
-aria2c --check-integrity=true file.metalink
-----------------------------------------------
+Repair a damaged download using -V option
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------
+aria2c -V file.metalink
+-----------------------
[NOTE]
This option is only available used with BitTorrent or metalink with chunk
checksums.
@@ -867,14 +867,14 @@ not created.
Normally if you lose a control file, you cannot resume download.
But if you have a torrent or metalink with chunk checksums for the file,
you can resume the download without a control file by giving
---check-integrity=true option to aria2c in command-line.
+-V option to aria2c in command-line.
SEEDING DOWNLOADED FILE IN BITTORRENT
-------------------------------------
-You can seed downloaded file using --check-integrity=true option.
----------------------------------------------
-aria2c --check-integrity=true file.torrent
----------------------------------------------
+You can seed downloaded file using -V option.
+----------------------
+aria2c -V file.torrent
+----------------------
INPUT FILE
----------
diff --git a/src/option_processing.cc b/src/option_processing.cc
index 822a0b49..ce304ad3 100644
--- a/src/option_processing.cc
+++ b/src/option_processing.cc
@@ -140,7 +140,7 @@ Option* option_processing(int argc, char* const argv[])
{ PREF_FILE_ALLOCATION.c_str(), required_argument, 0, 'a' },
{ PREF_ALLOW_OVERWRITE.c_str(), required_argument, &lopt, 202 },
#ifdef ENABLE_MESSAGE_DIGEST
- { PREF_CHECK_INTEGRITY.c_str(), required_argument, &lopt, 203 },
+ { PREF_CHECK_INTEGRITY.c_str(), optional_argument, 0, 'V' },
{ PREF_REALTIME_CHUNK_CHECKSUM.c_str(), required_argument, &lopt, 204 },
#endif // ENABLE_MESSAGE_DIGEST
{ PREF_CONTINUE.c_str(), no_argument, 0, 'c' },
@@ -229,7 +229,7 @@ Option* option_processing(int argc, char* const argv[])
{ 0, 0, 0, 0 }
};
c = getopt_long(argc, argv,
- "Dd:o:l:s:pt:m:vh::ST:M:C:a:cU:ni:j:Z::P::q::R::",
+ "Dd:o:l:s:pt:m:vh::ST:M:C:a:cU:ni:j:Z::P::q::R::V::",
longOpts, &optIndex);
if(c == -1) {
break;
@@ -369,9 +369,6 @@ Option* option_processing(int argc, char* const argv[])
case 202:
cmdstream << PREF_ALLOW_OVERWRITE << "=" << optarg << "\n";
break;
- case 203:
- cmdstream << PREF_CHECK_INTEGRITY << "=" << optarg << "\n";
- break;
case 204:
cmdstream << PREF_REALTIME_CHUNK_CHECKSUM << "=" << optarg << "\n";
break;
@@ -541,6 +538,9 @@ Option* option_processing(int argc, char* const argv[])
case 'R':
cmdstream << PREF_REMOTE_TIME << "=" << toBoolArg(optarg) << "\n";
break;
+ case 'V':
+ cmdstream << PREF_CHECK_INTEGRITY << "=" << toBoolArg(optarg) << "\n";
+ break;
case 'v':
showVersion();
exit(EXIT_SUCCESS);
diff --git a/src/usage_text.h b/src/usage_text.h
index 54358f42..be9e7d57 100644
--- a/src/usage_text.h
+++ b/src/usage_text.h
@@ -156,8 +156,8 @@ _(" --enable-http-keep-alive[=true|false] Enable HTTP/1.1 persistent connection.
#define TEXT_ENABLE_HTTP_PIPELINING \
_(" --enable-http-pipelining[=true|false] Enable HTTP/1.1 pipelining.")
#define TEXT_CHECK_INTEGRITY \
-_(" --check-integrity=true|false Check file integrity by validating piece hash.\n"\
- " This option only affects in BitTorrent downloads\n"\
+_(" -V, --check-integrity[=true|false] Check file integrity by validating piece\n"\
+ " hashes. This option has effect only in BitTorrent\n"\
" and Metalink downloads with chunk checksums.\n"\
" Use this option to re-download a damaged portion\n"\
" of a file.")