WgetSettings Class

Summary

Class holding configuration items for Wget Cake alias.
Assembly
Cake.Wget.dll
Namespace
Cake.Wget
Base Types
  • ToolSettings
graph BT Type-->Base0["ToolSettings"] Type["WgetSettings"] class Type type-node

Syntax

public class WgetSettings : ToolSettings

Remarks

For detailed reference of available command options see Wget manual pages Additional parameters you can define via ArgumentCustomization.
var settings = new WgetSettings {
    ArgumentCustomization = args => args.Append("YOUR_PARAM_HERE")
};

Constructors

Name Summary
WgetSettings()

Fields

Name Constant Value Summary
SwitchSeparator =
Separator character between Wget parameter switch and its value.
static

Properties

Name Value Summary
AppendOutput string
Append to logfile. This is the same as -o, only it appends to logfile instead of overwriting the old log file. If logfile does not exist, a new file is created.
Background bool
Go to background immediately after startup. If no output file is specified via the , output is redirected to wget-log.
Base string
Resolves relative links using URL as the point of reference, when reading links from an HTML file specified via the option (together with , or when the input file was fetched remotely from a server describing it as HTML). This is equivalent to the presence of a BASE tag in the HTML input file, with URL as the value for the href attribute.
ConnectTimeout Nullable<TimeSpan>
Set the connect timeout to seconds seconds. TCP connections that take longer to establish will be aborted. By default, there is no connect timeout, other than that implemented by system libraries.
Continue bool
Continue getting a partially-downloaded file. This is useful when you want to finish up a download started by a previous instance of Wget, or by another program.
Debug bool

Turn on debug output, meaning various information important to the developers of Wget if it does not work properly.

Your system administrator may have chosen to compile Wget without debug support, in which case Debug will not work. Please note that compiling with debug support is always safe. Wget compiled with the debug support will not print any debug info unless requested with Debug.

DirectoryPrefix string
Set directory prefix to prefix.
DnsTimeout Nullable<TimeSpan>
Set the DNS lookup timeout to seconds seconds. DNS lookups that don’t complete within the specified time will fail. By default, there is no timeout on DNS lookups, other than that implemented by system libraries.
ForceHtml bool
When input is read from a file, force it to be treated as an HTML file. This enables you to retrieve relative links from existing HTML files on your local disk, by adding to HTML, or using the Base command-line option.
FtpPassword string
Specify the password on an FTP server. Without this, or the corresponding startup option, the password defaults to -wget@, normally used for anonymous FTP.
FtpUser string
Specify the username on an FTP server. Without this, or the corresponding startup option, the password defaults to -wget@, normally used for anonymous FTP.
Help bool
Print a help message describing all of Wget’s command-line options.
HttpPassword string
Specify the password on an HTTP server. According to the type of the challenge, Wget will encode them using either the basic (insecure), the digest, or the Windows NTLM authentication scheme.
HttpUser string
Specify the username on an HTTP server. According to the type of the challenge, Wget will encode them using either the basic (insecure), the digest, or the Windows NTLM authentication scheme.
InputFile string
Read URLs from a local or external file. If - is specified as file, URLs are read from the standard input. (Use ./- to read from a file literally named -.)
Level uint
Specify recursion maximum depth level depth (see Recursive Download).
LimitRate WgetLimitRateArgument
Limit the download speed to amount bytes per second. Amount may be expressed in bytes, kilobytes or megabytes. This is useful when, for whatever reason, you don’t want Wget to consume the entire available bandwidth.
LimitRate = new WgetLimitRateArgument(300, LimitRateUnitEnum.Kilobytes);
NoVerbose bool
Turn off verbose without being completely quiet (use Quiet for that), which means that error messages and basic information still get printed.
OutputDocument string
The documents will not be written to the appropriate files, but all will be concatenated together and written to file. If - is used as file, documents will be printed to standard output, disabling link conversion. (Use ./- to print to a file literally named -.)
OutputFile string
Log all messages to logfile. The messages are normally reported to standard error.
Password string
Specify the password for both FTP and HTTP file retrieval. This parameter can be overridden using the option for FTP connections and the option for HTTP connections.
Quiet bool
Turn off Wget’s output.
RandomWait bool
Some web sites may perform log analysis to identify retrieval programs such as Wget by looking for statistically significant similarities in the time between requests. This option causes the time between requests to vary between 0.5 and 1.5 * wait seconds, where wait was specified using the option, in order to mask Wget’s presence from such analysis.
ReadTimeout Nullable<TimeSpan>
Set the read (and write) timeout to seconds seconds. The “time” of this timeout refers to idle time: if, at any point in the download, no data is received for more than the specified number of seconds, reading fails and the download is restarted. This option does not directly affect the duration of the entire download.
Recursive bool
Turn on recursive retrieving.
RejectedLog string
Logs all URL rejections to logfile as comma separated values. The values include the reason of rejection, the URL and the parent URL it was found in.
RetryConnectionRefused bool
Consider connection refused a transient error and try again.
Timeout Nullable<TimeSpan>
Set the network timeout to seconds seconds. This is equivalent to specifying , and , all at the same time.
Tries uint
Set number of tries to number.
Url Uri
URL to be downloaded.
User string
Specify the username for both FTP and HTTP file retrieval. This parameter can be overridden using the option for FTP connections and the option for HTTP connections.
Verbose bool
Turn on verbose output, with all the available data. The default output is verbose.
Version bool
Display the version of Wget.
Wait Nullable<TimeSpan>
Wait the specified number of seconds between the retrievals. Use of this option is recommended, as it lightens the server load by making the requests less frequent.
WaitRetry Nullable<TimeSpan>
If you don’t want Wget to wait between every retrieval, but only between retries of failed downloads, you can use this option. Wget will use linear back-off, waiting 1 second after the first failure on a given file, then waiting 2 seconds after the second failure on that file, up to the maximum number of seconds you specify.

Extension Methods

Name Value Summary
Dump<WgetSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
GetArgumentName(string) string
Reads a value of WgetArgumentNameAttribute.
Requires the Cake.Wget addin
IsIn<WgetSettings>(WgetSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<WgetSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<WgetSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<WgetSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<WgetSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin