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