summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-18 14:46:53 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-18 14:46:53 +0000
commit5d8864caedd849ed98fbdb86282124b2b47e6090 (patch)
tree1b4a5bba02d9e4ee12feb3a0270b02d47f78daad
parent2e4bccb567413bba59f74683e4632a15fc33b1e3 (diff)
2010-01-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added XML-RPC client sample code in Python. * doc/aria2c.1.txt
-rw-r--r--ChangeLog5
-rw-r--r--doc/aria2c.121
-rw-r--r--doc/aria2c.1.html13
-rw-r--r--doc/aria2c.1.txt12
4 files changed, 48 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 277891df..1b8486cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
+
+ Added XML-RPC client sample code in Python.
+ * doc/aria2c.1.txt
+
2010-01-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated po templates.
diff --git a/doc/aria2c.1 b/doc/aria2c.1
index b2063428..765b6ea1 100644
--- a/doc/aria2c.1
+++ b/doc/aria2c.1
@@ -2,12 +2,12 @@
.\" Title: aria2c
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 01/17/2010
+.\" Date: 01/18/2010
.\" Manual: Aria2 Manual
.\" Source: Aria2 1.8.1
.\" Language: English
.\"
-.TH "ARIA2C" "1" "01/17/2010" "Aria2 1\&.8\&.1" "Aria2 Manual"
+.TH "ARIA2C" "1" "01/18/2010" "Aria2 1\&.8\&.1" "Aria2 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -2543,6 +2543,23 @@ pp result
.if n \{\
.RE
.\}
+.sp
+If you are a Python lover, you can use xmlrpclib(for Python3\&.x, use xmlrpc\&.client instead) to interact with aria2\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+import xmlrpclib
+from pprint import pprint
+
+s = xmlrpclib\&.ServerProxy("http://localhost:6800/rpc")
+r = s\&.aria2\&.addUri(["http://localhost/aria2\&.tar\&.bz2"], {"dir":"/downloads"})
+pprint(r)
+.fi
+.if n \{\
+.RE
+.\}
.SH "EXAMPLE"
.SS "HTTP/FTP Segmented Download"
.sp
diff --git a/doc/aria2c.1.html b/doc/aria2c.1.html
index 1b0018c9..0c13629c 100644
--- a/doc/aria2c.1.html
+++ b/doc/aria2c.1.html
@@ -3229,6 +3229,17 @@ result=client.call("aria2.addUri", [ "http://localhost/aria2.tar.bz2" ], options
pp result</tt></pre>
</div></div>
+<div class="paragraph"><p>If you are a Python lover, you can use xmlrpclib(for Python3.x, use
+xmlrpc.client instead) to interact with aria2.</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><tt>import xmlrpclib
+from pprint import pprint
+
+s = xmlrpclib.ServerProxy("http://localhost:6800/rpc")
+r = s.aria2.addUri(["http://localhost/aria2.tar.bz2"], {"dir":"/downloads"})
+pprint(r)</tt></pre>
+</div></div>
</div>
<h2 id="_example">EXAMPLE</h2>
<div class="sectionbody">
@@ -3637,7 +3648,7 @@ files in the program, then also delete it here.</p></div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2010-01-17 23:01:25 JST
+Last updated 2010-01-18 23:42:25 JST
</div>
</div>
</body>
diff --git a/doc/aria2c.1.txt b/doc/aria2c.1.txt
index c39db431..f100ca13 100644
--- a/doc/aria2c.1.txt
+++ b/doc/aria2c.1.txt
@@ -1563,6 +1563,18 @@ result=client.call("aria2.addUri", [ "http://localhost/aria2.tar.bz2" ], options
pp result
----------------------------------------------
+If you are a Python lover, you can use xmlrpclib(for Python3.x, use
+xmlrpc.client instead) to interact with aria2.
+
+----------------------------------------------
+import xmlrpclib
+from pprint import pprint
+
+s = xmlrpclib.ServerProxy("http://localhost:6800/rpc")
+r = s.aria2.addUri(["http://localhost/aria2.tar.bz2"], {"dir":"/downloads"})
+pprint(r)
+----------------------------------------------
+
EXAMPLE
-------