]> Cypherpunks.ru repositories - nncp.git/blob - doc/integration/download.texi
c4ca2acc562db491b0c55a1c59986d2af851dc9c
[nncp.git] / doc / integration / download.texi
1 @node DownloadService
2 @section Downloading service
3
4 Previous sections tell about manual downloading and sending results to
5 remote node. But one wish to remotely initiate downloading. That can be
6 easily solved with @ref{CfgExec, exec} handles.
7
8 @verbatim
9 exec: {
10   warcer: ["/bin/sh", "/path/to/warcer.sh"]
11   wgeter: ["/bin/sh", "/path/to/wgeter.sh"]
12   aria2c: [
13     "/usr/local/bin/aria2c",
14     "--on-download-complete", "aria2-downloaded.sh",
15     "--on-bt-download-complete", "aria2-downloaded.sh"
16   ]
17 }
18 @end verbatim
19
20 @file{warcer.sh} contents:
21
22 @verbatiminclude warcer.sh
23
24 @file{wgeter.sh} contents:
25
26 @verbatiminclude wgeter.sh
27
28 Now you can queue that node to send you some website's page, file or
29 BitTorrents:
30
31 @example
32 $ echo http://www.nncpgo.org/Postfix.html |
33     nncp-exec remote.node warcer postfix-whole-page
34 $ echo http://www.nncpgo.org/Postfix.html |
35     nncp-exec remote.node wgeter postfix-html-page
36 $ echo \
37     http://www.nncpgo.org/download/nncp-0.11.tar.xz
38     http://www.nncpgo.org/download/nncp-0.11.tar.xz.sig |
39     nncp-exec remote.node aria2c
40 @end example