comparison toolboxes/wget/wget.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function [ out ] = wget(url, options)
2 %WGET Summary of this function goes here
3 % Detailed explanation goes here
4 %
5 % GNU Wget 1.11.4, a non-interactive network retriever.
6 % Usage: wget [OPTION]... [URL]...
7 %
8 % Mandatory arguments to long options are mandatory for short options too.
9 %
10 % Startup:
11 % -V, --version display the version of Wget and exit.
12 % -h, --help print this help.
13 % -b, --background go to background after startup.
14 % -e, --execute=COMMAND execute a `.wgetrc'-style command.
15 %
16 % Logging and input file:
17 % -o, --output-file=FILE log messages to FILE.
18 % -a, --append-output=FILE append messages to FILE.
19 % -d, --debug print lots of debugging information.
20 % -q, --quiet quiet (no output).
21 % -v, --verbose be verbose (this is the default).
22 % -nv, --no-verbose turn off verboseness, without being quiet.
23 % -i, --input-file=FILE download URLs found in FILE.
24 % -F, --force-html treat input file as HTML.
25 % -B, --base=URL prepends URL to relative links in -F -i file.
26 %
27 % Download:
28 % -t, --tries=NUMBER set number of retries to NUMBER (0 unlimits).
29 % --retry-connrefused retry even if connection is refused.
30 % -O, --output-document=FILE write documents to FILE.
31 % -nc, --no-clobber skip downloads that would download to
32 % existing files.
33 % -c, --continue resume getting a partially-downloaded file.
34 % --progress=TYPE select progress gauge type.
35 % -N, --timestamping don't re-retrieve files unless newer than
36 % local.
37 % -S, --server-response print server response.
38 % --spider don't download anything.
39 % -T, --timeout=SECONDS set all timeout values to SECONDS.
40 % --dns-timeout=SECS set the DNS lookup timeout to SECS.
41 % --connect-timeout=SECS set the connect timeout to SECS.
42 % --read-timeout=SECS set the read timeout to SECS.
43 % -w, --wait=SECONDS wait SECONDS between retrievals.
44 % --waitretry=SECONDS wait 1..SECONDS between retries of a retrieval.
45 % --random-wait wait from 0...2*WAIT secs between retrievals.
46 % --no-proxy explicitly turn off proxy.
47 % -Q, --quota=NUMBER set retrieval quota to NUMBER.
48 % --bind-address=ADDRESS bind to ADDRESS (hostname or IP) on local host.
49 % --limit-rate=RATE limit download rate to RATE.
50 % --no-dns-cache disable caching DNS lookups.
51 % --restrict-file-names=OS restrict chars in file names to ones OS allows.
52 % --ignore-case ignore case when matching files/directories.
53 % --user=USER set both ftp and http user to USER.
54 % --password=PASS set both ftp and http password to PASS.
55 %
56 % Directories:
57 % -nd, --no-directories don't create directories.
58 % -x, --force-directories force creation of directories.
59 % -nH, --no-host-directories don't create host directories.
60 % --protocol-directories use protocol name in directories.
61 % -P, --directory-prefix=PREFIX save files to PREFIX/...
62 % --cut-dirs=NUMBER ignore NUMBER remote directory components.
63 %
64 % HTTP options:
65 % --http-user=USER set http user to USER.
66 % --http-password=PASS set http password to PASS.
67 % --no-cache disallow server-cached data.
68 % -E, --html-extension save HTML documents with `.html' extension.
69 % --ignore-length ignore `Content-Length' header field.
70 % --header=STRING insert STRING among the headers.
71 % --max-redirect maximum redirections allowed per page.
72 % --proxy-user=USER set USER as proxy username.
73 % --proxy-password=PASS set PASS as proxy password.
74 % --referer=URL include `Referer: URL' header in HTTP request.
75 % --save-headers save the HTTP headers to file.
76 % -U, --user-agent=AGENT identify as AGENT instead of Wget/VERSION.
77 % --no-http-keep-alive disable HTTP keep-alive (persistent connections).
78 % --no-cookies don't use cookies.
79 % --load-cookies=FILE load cookies from FILE before session.
80 % --save-cookies=FILE save cookies to FILE after session.
81 % --keep-session-cookies load and save session (non-permanent) cookies.
82 % --post-data=STRING use the POST method; send STRING as the data.
83 % --post-file=FILE use the POST method; send contents of FILE.
84 % --content-disposition honor the Content-Disposition header when
85 % choosing local file names (EXPERIMENTAL).
86 % --auth-no-challenge Send Basic HTTP authentication information
87 % without first waiting for the server's
88 % challenge.
89 %
90 % HTTPS (SSL/TLS) options:
91 % --secure-protocol=PR choose secure protocol, one of auto, SSLv2,
92 % SSLv3, and TLSv1.
93 % --no-check-certificate don't validate the server's certificate.
94 % --certificate=FILE client certificate file.
95 % --certificate-type=TYPE client certificate type, PEM or DER.
96 % --private-key=FILE private key file.
97 % --private-key-type=TYPE private key type, PEM or DER.
98 % --ca-certificate=FILE file with the bundle of CA's.
99 % --ca-directory=DIR directory where hash list of CA's is stored.
100 % --random-file=FILE file with random data for seeding the SSL PRNG.
101 % --egd-file=FILE file naming the EGD socket with random data.
102 %
103 % FTP options:
104 % --ftp-user=USER set ftp user to USER.
105 % --ftp-password=PASS set ftp password to PASS.
106 % --no-remove-listing don't remove `.listing' files.
107 % --no-glob turn off FTP file name globbing.
108 % --no-passive-ftp disable the "passive" transfer mode.
109 % --retr-symlinks when recursing, get linked-to files (not dir).
110 % --preserve-permissions preserve remote file permissions.
111 %
112 % Recursive download:
113 % -r, --recursive specify recursive download.
114 % -l, --level=NUMBER maximum recursion depth (inf or 0 for infinite).
115 % --delete-after delete files locally after downloading them.
116 % -k, --convert-links make links in downloaded HTML point to local files.
117 % -K, --backup-converted before converting file X, back up as X.orig.
118 % -m, --mirror shortcut for -N -r -l inf --no-remove-listing.
119 % -p, --page-requisites get all images, etc. needed to display HTML page.
120 % --strict-comments turn on strict (SGML) handling of HTML comments.
121 %
122 % Recursive accept/reject:
123 % -A, --accept=LIST comma-separated list of accepted extensions.
124 % -R, --reject=LIST comma-separated list of rejected extensions.
125 % -D, --domains=LIST comma-separated list of accepted domains.
126 % --exclude-domains=LIST comma-separated list of rejected domains.
127 % --follow-ftp follow FTP links from HTML documents.
128 % --follow-tags=LIST comma-separated list of followed HTML tags.
129 % --ignore-tags=LIST comma-separated list of ignored HTML tags.
130 % -H, --span-hosts go to foreign hosts when recursive.
131 % -L, --relative follow relative links only.
132 % -I, --include-directories=LIST list of allowed directories.
133 % -X, --exclude-directories=LIST list of excluded directories.
134 % -np, --no-parent don't ascend to the parent directory.
135 %
136 % Mail bug reports and suggestions to <bug-wget@gnu.org>.
137
138 cmd=sprintf('%s %s %s','wget', options, url);
139 out = system(cmd);
140 end
141