Procházet zdrojové kódy

2009-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

	Documented about BitTorrent Magnet URI in man page.
	* doc/aria2c.1.txt
Tatsuhiro Tsujikawa před 16 roky
rodič
revize
4ede925ce3
4 změnil soubory, kde provedl 277 přidání a 27 odebrání
  1. 5 0
      ChangeLog
  2. 42 5
      doc/aria2c.1
  3. 204 18
      doc/aria2c.1.html
  4. 26 4
      doc/aria2c.1.txt

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2009-11-25  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
+
+	Documented about BitTorrent Magnet URI in man page.
+	* doc/aria2c.1.txt
+
 2009-11-25  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 
 	Fixed the bug that trackers in BitTorrent Magnet URI are not

+ 42 - 5
doc/aria2c.1

@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: aria2c
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
-.\"      Date: 10/27/2009
+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+.\"      Date: 11/25/2009
 .\"    Manual: Aria2 Manual
 .\"    Source: Aria2
 .\"  Language: English
 .\"
-.TH "ARIA2C" "1" "10/27/2009" "Aria2" "Aria2 Manual"
+.TH "ARIA2C" "1" "11/25/2009" "Aria2" "Aria2 Manual"
 .\" -----------------------------------------------------------------
 .\" * set default formatting
 .\" -----------------------------------------------------------------
@@ -22,7 +22,7 @@
 aria2c \- The ultra fast download utility
 .SH "SYNOPSIS"
 .sp
-aria2c [\fIOPTIONS\fR] [\fIURL\fR | \fITORRENT_FILE\fR | \fIMETALINK_FILE\fR]\&...
+aria2c [\fIOPTIONS\fR] [\fIURI\fR | \fITORRENT_FILE\fR | \fIMETALINK_FILE\fR]\&...
 .SH "DESCRIPTION"
 .sp
 aria2 is a utility for downloading files\&. The supported protocols are HTTP(S), FTP, BitTorrent, and Metalink\&. aria2 can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth\&. It supports downloading a file from HTTP(S)/FTP and BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP is uploaded to the BitTorrent swarm\&. Using Metalink\(cqs chunk checksums, aria2 automatically validates chunks of data while downloading a file like BitTorrent\&.
@@ -1069,10 +1069,12 @@ Print the version number, copyright and the configuration information and exit\&
 .SS "Options That Take An Optional Argument"
 .sp
 The options that have its argument surrounded by square brackets([]) take an optional argument\&. Usually omiting the argument is evaluated to \fItrue\fR\&. If you use short form of these options(such as \fI\-V\fR) and give an argument, then the option name and its argument should be concatenated(e\&.g\&. \fI\-Vfalse\fR)\&. If any spaces are inserted between the option name and the argument, the argument will be treated as URI and usually this is not what you expect\&.
-.SS "URL, TORRENT_FILE, METALINK_FILE"
+.SS "URI, TORRENT_FILE, METALINK_FILE"
 .sp
 You can specify multiple URLs in command\-line\&. Unless you specify \fB\-Z\fR option, all URLs must point to the same file or downloading will fail\&.
 .sp
+You can specify arbitrary number of BitTorrent Magnet URI\&. Please note that they are always treated as a separate download\&. Both hex encoded 40 characters Info Hash and Base32 encoded 32 characters Info Hash are supported\&. The multiple "tr" paramters are supported\&. Because BitTorrent Magnet URI is likely to contain "&" character, it is highly recommended to always quote URI with single(\') or double(") quotation\&. See http://www\&.bittorrent\&.org/beps/bep_0009\&.html for more details about BitTorrent Magnet URI\&.
+.sp
 You can also specify arbitrary number of torrent files and metalink files stored on a local drive\&. Please note that they are always treated as a separate download\&.
 .sp
 You can specify both torrent file with \-T option and URLs\&. By doing this, you can download a file from both torrent swarm and HTTP(S)/FTP server at the same time, while the data from HTTP(S)/FTP are uploaded to the torrent swarm\&. For single file torrents, URL can be a complete URL pointing to the resource or if URL ends with /, name in torrent file in torrent is added\&. For multi\-file torrents, name and path are added to form a URL for each file\&.
@@ -2778,6 +2780,41 @@ To pause a download, press Ctrl\-C\&. You can resume the transfer by running ari
 .nr an-break-flag 1
 .br
 .ps +1
+\fBDownload using BitTorrent Magnet URI\fR
+.RS 4
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+aria2c "magnet:?xt=urn:btih:248d0a1cd08284299de78d5c1ed359bb46717d8c&dn=aria2"
+.fi
+.if n \{\
+.RE
+.\}
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+Don\(cqt forget to quote BitTorrent Magnet URI which includes "&" character with single(\') or double(") quotation\&.
+.sp .5v
+.RE
+.RE
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
 \fBDownload 2 torrents\fR
 .RS 4
 .sp

+ 204 - 18
doc/aria2c.1.html

@@ -3,7 +3,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.4.4" />
+<meta name="generator" content="AsciiDoc 8.5.1" />
 <title>ARIA2C(1)</title>
 <style type="text/css">
 /* Debug borders */
@@ -91,7 +91,7 @@ span#author {
 }
 span#email {
 }
-span#revision {
+span#revnumber, span#revdate, span#revremark {
   font-family: sans-serif;
 }
 
@@ -118,7 +118,7 @@ div#preamble {
 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
 div.admonitionblock {
-  margin-top: 1.5em;
+  margin-top: 0.25em;
   margin-bottom: 1.5em;
 }
 div.admonitionblock {
@@ -209,8 +209,8 @@ div.exampleblock > div.content {
 }
 
 div.imageblock div.content { padding-left: 0; }
-div.imageblock img { border: 1px solid silver; }
 span.image img { border-style: none; }
+a.image:visited { color: white; }
 
 dl {
   margin-top: 0.8em;
@@ -310,6 +310,34 @@ div.hdlist.compact tr {
   background: yellow;
 }
 
+.footnote, .footnoteref {
+  font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+  vertical-align: super;
+}
+
+#footnotes {
+  margin: 20px 0 20px 0;
+  padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+  margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+  border: none;
+  border-top: 1px solid silver;
+  height: 1px;
+  text-align: left;
+  margin-left: 0;
+  width: 20%;
+  min-width: 100px;
+}
+
+
 @media print {
   div#footer-badges { display: none; }
 }
@@ -399,6 +427,138 @@ div.exampleblock-content {
 /* IE6 sets dynamically generated links as visited. */
 div#toc a:visited { color: blue; }
 </style>
+<script type="text/javascript">
+/*<![CDATA[*/
+window.onload = function(){asciidoc.footnotes();}
+var asciidoc = {  // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+  function getText(el) {
+    var text = "";
+    for (var i = el.firstChild; i != null; i = i.nextSibling) {
+      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+        text += i.data;
+      else if (i.firstChild != null)
+        text += getText(i);
+    }
+    return text;
+  }
+
+  function TocEntry(el, text, toclevel) {
+    this.element = el;
+    this.text = text;
+    this.toclevel = toclevel;
+  }
+
+  function tocEntries(el, toclevels) {
+    var result = new Array;
+    var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+    // Function that scans the DOM tree for header elements (the DOM2
+    // nodeIterator API would be a better technique but not supported by all
+    // browsers).
+    var iterate = function (el) {
+      for (var i = el.firstChild; i != null; i = i.nextSibling) {
+        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+          var mo = re.exec(i.tagName);
+          if (mo)
+            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+          iterate(i);
+        }
+      }
+    }
+    iterate(el);
+    return result;
+  }
+
+  var toc = document.getElementById("toc");
+  var entries = tocEntries(document.getElementById("content"), toclevels);
+  for (var i = 0; i < entries.length; ++i) {
+    var entry = entries[i];
+    if (entry.element.id == "")
+      entry.element.id = "_toc_" + i;
+    var a = document.createElement("a");
+    a.href = "#" + entry.element.id;
+    a.appendChild(document.createTextNode(entry.text));
+    var div = document.createElement("div");
+    div.appendChild(a);
+    div.className = "toclevel" + entry.toclevel;
+    toc.appendChild(div);
+  }
+  if (entries.length == 0)
+    toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+  var cont = document.getElementById("content");
+  var noteholder = document.getElementById("footnotes");
+  var spans = cont.getElementsByTagName("span");
+  var refs = {};
+  var n = 0;
+  for (i=0; i<spans.length; i++) {
+    if (spans[i].className == "footnote") {
+      n++;
+      // Use [\s\S] in place of . so multi-line matches work.
+      // Because JavaScript has no s (dotall) regex flag.
+      note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+      noteholder.innerHTML +=
+        "<div class='footnote' id='_footnote_" + n + "'>" +
+        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+        n + "</a>. " + note + "</div>";
+      spans[i].innerHTML =
+        "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+        "' title='View footnote' class='footnote'>" + n + "</a>]";
+      var id =spans[i].getAttribute("id");
+      if (id != null) refs["#"+id] = n;
+    }
+  }
+  if (n == 0)
+    noteholder.parentNode.removeChild(noteholder);
+  else {
+    // Process footnoterefs.
+    for (i=0; i<spans.length; i++) {
+      if (spans[i].className == "footnoteref") {
+        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+        href = href.match(/#.*/)[0];  // Because IE return full URL.
+        n = refs[href];
+        spans[i].innerHTML =
+          "[<a href='#_footnote_" + n +
+          "' title='View footnote' class='footnote'>" + n + "</a>]";
+      }
+    }
+  }
+}
+
+}
+/*]]>*/
+</script>
 </head>
 <body>
 <div id="header">
@@ -412,9 +572,10 @@ ARIA2C(1) Manual Page
 </p>
 </div>
 </div>
-<h2>SYNOPSIS</h2>
+<div id="content">
+<h2 id="_synopsis">SYNOPSIS</h2>
 <div class="sectionbody">
-<div class="paragraph"><p>aria2c [<em>OPTIONS</em>] [<em>URL</em> | <em>TORRENT_FILE</em> | <em>METALINK_FILE</em>]&#8230;</p></div>
+<div class="paragraph"><p>aria2c [<em>OPTIONS</em>] [<em>URI</em> | <em>TORRENT_FILE</em> | <em>METALINK_FILE</em>]&#8230;</p></div>
 </div>
 <h2 id="_description">DESCRIPTION</h2>
 <div class="sectionbody">
@@ -521,7 +682,7 @@ downloading a file like BitTorrent.</p></div>
   You can override this setting and specify a proxy server for a particular
   protocol using <strong>--http-proxy</strong>, <strong>--https-proxy</strong> and <strong>--ftp-proxy</strong> options.
   This affects all URLs.
-  The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
+  The format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
 </p>
 </dd>
 <dt class="hdlist1">
@@ -794,7 +955,7 @@ aria2c -o myfile.zip "http://mirror1/file.zip" "http://mirror2/file.zip"</td>
 <p>
   Use this proxy server for HTTP. See also <strong>--all-proxy</strong> option.
   This affects all URLs.
-  The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
+  The format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
 </p>
 </dd>
 <dt class="hdlist1">
@@ -804,7 +965,7 @@ aria2c -o myfile.zip "http://mirror1/file.zip" "http://mirror2/file.zip"</td>
 <p>
   Use this proxy server for HTTPS. See also <strong>--all-proxy</strong> option.
   This affects all URLs.
-  The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
+  The format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
 </p>
 </dd>
 <dt class="hdlist1">
@@ -944,7 +1105,7 @@ aria2c -o myfile.zip "http://mirror1/file.zip" "http://mirror2/file.zip"</td>
 <p>
   Use this proxy server for FTP. See also <strong>--all-proxy</strong> option.
   This affects all URLs.
-  The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
+  The format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
 </p>
 </dd>
 <dt class="hdlist1">
@@ -1748,9 +1909,18 @@ If you use short form of these options(such as <em>-V</em>) and give
 an argument, then the option name and its argument should be concatenated(e.g.
 <em>-Vfalse</em>). If any spaces are inserted between the option name and the argument,
 the argument will be treated as URI and usually this is not what you expect.</p></div>
-<h3 id="_url_torrent_file_metalink_file">URL, TORRENT_FILE, METALINK_FILE</h3><div style="clear:left"></div>
-<div class="paragraph"><p>You can specify multiple URLs in command-line.
-Unless you specify <strong>-Z</strong> option, all URLs must point to the same file or downloading will fail.</p></div>
+<h3 id="_uri_torrent_file_metalink_file">URI, TORRENT_FILE, METALINK_FILE</h3><div style="clear:left"></div>
+<div class="paragraph"><p>You can specify multiple URLs in command-line.  Unless you specify
+<strong>-Z</strong> option, all URLs must point to the same file or downloading will
+fail.</p></div>
+<div class="paragraph"><p>You can specify arbitrary number of BitTorrent Magnet URI. Please note
+that they are always treated as a separate download.  Both hex encoded
+40 characters Info Hash and Base32 encoded 32 characters Info Hash are
+supported. The multiple "tr" paramters are supported.  Because
+BitTorrent Magnet URI is likely to contain "&amp;" character, it is highly
+recommended to always quote URI with single(') or double(") quotation.
+See <a href="http://www.bittorrent.org/beps/bep_0009.html">http://www.bittorrent.org/beps/bep_0009.html</a> for more details
+about BitTorrent Magnet URI.</p></div>
 <div class="paragraph"><p>You can also specify arbitrary number of torrent files and metalink files
 stored on a local drive. Please note that they are always treated as a
 separate download.</p></div>
@@ -1868,7 +2038,7 @@ as exit status.</td>
 <div class="paragraph"><p>aria2 recognizes the following environment variables.</p></div>
 <div class="dlist"><dl>
 <dt class="hdlist1">
-http_proxy [http://][USER:PASSWORD@]HOST[:PORT]
+http_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
 </dt>
 <dd>
 <p>
@@ -1878,7 +2048,7 @@ http_proxy [http://][USER:PASSWORD@]HOST[:PORT]
 </p>
 </dd>
 <dt class="hdlist1">
-https_proxy [http://][USER:PASSWORD@]HOST[:PORT]
+https_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
 </dt>
 <dd>
 <p>
@@ -1888,7 +2058,7 @@ https_proxy [http://][USER:PASSWORD@]HOST[:PORT]
 </p>
 </dd>
 <dt class="hdlist1">
-ftp_proxy [http://][USER:PASSWORD@]HOST[:PORT]
+ftp_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
 </dt>
 <dd>
 <p>
@@ -1898,7 +2068,7 @@ ftp_proxy [http://][USER:PASSWORD@]HOST[:PORT]
 </p>
 </dd>
 <dt class="hdlist1">
-all_proxy [http://][USER:PASSWORD@]HOST[:PORT]
+all_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
 </dt>
 <dd>
 <p>
@@ -2995,6 +3165,20 @@ directory.</td>
 <td class="content">To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory.</td>
 </tr></table>
 </div>
+<h4 id="_download_using_bittorrent_magnet_uri">Download using BitTorrent Magnet URI</h4>
+<div class="listingblock">
+<div class="content">
+<pre><tt>aria2c "magnet:?xt=urn:btih:248d0a1cd08284299de78d5c1ed359bb46717d8c&amp;dn=aria2"</tt></pre>
+</div></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">Don&#8217;t forget to quote BitTorrent Magnet URI which includes "&amp;"
+character with single(') or double(") quotation.</td>
+</tr></table>
+</div>
 <h4 id="_download_2_torrents">Download 2 torrents</h4>
 <div class="listingblock">
 <div class="content">
@@ -3226,9 +3410,11 @@ do not wish to do so, delete this exception statement from your
 version.  If you delete this exception statement from all source
 files in the program, then also delete it here.</p></div>
 </div>
+</div>
+<div id="footnotes"><hr /></div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2009-10-27 22:02:41 JST
+Last updated 2009-11-25 01:17:09 JST
 </div>
 </div>
 </body>

+ 26 - 4
doc/aria2c.1.txt

@@ -10,7 +10,7 @@ aria2c - The ultra fast download utility
 
 SYNOPSIS
 --------
-aria2c ['OPTIONS'] ['URL' | 'TORRENT_FILE' | 'METALINK_FILE']...
+aria2c ['OPTIONS'] ['URI' | 'TORRENT_FILE' | 'METALINK_FILE']...
 
 DESCRIPTION
 -----------
@@ -736,10 +736,21 @@ an argument, then the option name and its argument should be concatenated(e.g.
 '-Vfalse'). If any spaces are inserted between the option name and the argument,
 the argument will be treated as URI and usually this is not what you expect.
 
-URL, TORRENT_FILE, METALINK_FILE
+URI, TORRENT_FILE, METALINK_FILE
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-You can specify multiple URLs in command-line.
-Unless you specify *-Z* option, all URLs must point to the same file or downloading will fail.
+
+You can specify multiple URLs in command-line.  Unless you specify
+*-Z* option, all URLs must point to the same file or downloading will
+fail.
+
+You can specify arbitrary number of BitTorrent Magnet URI. Please note
+that they are always treated as a separate download.  Both hex encoded
+40 characters Info Hash and Base32 encoded 32 characters Info Hash are
+supported. The multiple "tr" paramters are supported.  Because
+BitTorrent Magnet URI is likely to contain "&" character, it is highly
+recommended to always quote URI with single(') or double(") quotation.
+See http://www.bittorrent.org/beps/bep_0009.html for more details
+about BitTorrent Magnet URI.
 
 You can also specify arbitrary number of torrent files and metalink files
 stored on a local drive. Please note that they are always treated as a
@@ -1500,6 +1511,17 @@ aria2c --max-upload-limit=40K file.torrent
 [NOTE]
 To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory.
 
+Download using BitTorrent Magnet URI
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+------------------------------------------------------------------------------
+aria2c "magnet:?xt=urn:btih:248d0a1cd08284299de78d5c1ed359bb46717d8c&dn=aria2"
+------------------------------------------------------------------------------
+
+[NOTE]
+Don't forget to quote BitTorrent Magnet URI which includes "&"
+character with single(') or double(") quotation.
+
 Download 2 torrents
 ^^^^^^^^^^^^^^^^^^^
 --------------------------------------