Common options
- -i,
--interface=IFACE
- If your machine has several network interfaces, force using IFACE
interface.
- -m,
--mark-downloaded
- Mark downloaded links in (regular) file arguments.
- -o,
--output-directory=DIRECTORY
- Directory where files will be saved. Default is current directory.
- -r,
--max-retries=N
- Set maximum retries for download failures. Apply on module exit status:
3 (network error), 7 (captcha error). Default option value
is 2 (i.e. 3 tries) and applies for one single URL download.
- -t,
--timeout=SECS
- Cancel download after SECS seconds of waits. Apply on module exit
status: 10 (temporary unavailable error). This error can be
returned in various cases: unallowed parallel download, daily downloads
limit reached, remote hoster overloaded. Default option value is disabled
(no timeout, infinite) and applies for one single URL download.
- -x, --no-overwrite
- Do not overwrite existing files. Existing file will be preserved and
filename will be suffixed with .1, .2, and so on. Default option value is
disabled: files are overwritten (whatever their size) or resumed (if
module supports it).
- --cache=METHOD
- Cache policy regarding module storage space. Each module is able to save
data (credentials, authentication session, or tokens) in order to be
reused later. Available values:
none: module storage file is deleted before each
URL processing. Temporary directory is used.
session (default): module storage file is deleted
at the end of plowdown execution. Temporary directory is used.
shared: module storage file is global and located
(in
~/.config/plowshare/storage/). It can be accessed by any other
instance of plow* scripts. Warning: There is no atomicity (or file locking) on
concurrent access.
Example: Multiple links download using a premium account. If
supported by module, login stage could be performed once.
- --9kweu=KEY
- Use 9kw.eu service to solve captchas.
- --antigate=KEY
- Use Antigate.com service to solve captchas.
- --captchabhood=USER:PASSWORD
- Use Captcha Brotherhood service to solve captchas.
- --captchacoin=KEY
- Use CaptchaCoin service to solve captchas.
- --deathbycaptcha=USER:PASSWORD
- Use Death by Captcha service to solve captchas.
- --captchamethod=METHOD
- Force specific captcha solving method (if unspecified it is autodetected).
Available values:
imgur: upload image to Imgur.com service, print
image url in console and prompt for manual entering. Useful for NAS and
embedded devices.
none: abort if captcha solving is requested (even
if automatic solving service is available).
online: use captcha solving website only (9kweu,
Antigate, CaptchaBrotherhood, CaptchaCoin or DeathByCaptcha account
required).
fb: display image in framebuffer console and
prompt for manual entering. Looks for framebuffer viewers: fbi, fim.
FRAMEBUFFER environment variable can contain device file. Default is
/dev/fb0.
nox: display image in console (text) and prompt
for manual entering. Looks for ascii viewers: img2txt, aview, tiv.
x11: display image in an X11 window and prompt for
manual entering. Looks for viewers: display, feh, sxiv, qiv. DISPLAY
environment variable must not be empty.
- --captchaprogram=PROGRAM
- Call external program or script for solving captchas. Provided executable
can be located in PATH environment variable.
Three arguments are given:
$1 module name (lowercase). For example:
mediafire.
$2 image filename (with full path).
$3 hint or captcha type (string). For example:
recaptcha,
solvemedia or
digits-4.
Return value (on stdout) and exit status:
0: solving success. Captcha Word(s) must be
echo'ed.
2: external solver is not able to solve requested
captcha. Let plowdown continue solving it normally (will consider
--captchamethod if specified).
7: external solver failed. Note: this exit code is
eligible with retry policy (
-r/
--max-retries).
Note: plowdown legacy exit errors can also be returned, for
example: 1 (fatal) or 3 (network).
- --min-space=LIMIT
- Define threshold amount of available disk space before quitting plowdown.
You must specify a suffix. Suffixes are:
M for megabytes (MB i.e. 1000^2),
G for gigabytes (GB i.e. 1000^3),
Mi or m for mebibytes (MiB i.e.
1024^2),
Gi for gibibytes (GiB i.e. 1024^3).
- --max-rate=SPEED
- Limit download speed in bytes per second. Suffixes are:
k for kilobytes (kB i.e. 1000),
M for megabytes (MB i.e. 1000^2),
K or Ki for kibibytes (KB or KiB i.e.
1024),
m or Mi for mebibytes (mB or MiB i.e.
1024^2).
- --min-rate=SPEED
- Limit download minimum speed in bytes per second (for a delay of 30
seconds). Suffixes are the same than --max-rate.
- --temp-directory=DIRECTORY
- Directory for temporary files: final link download, cookies, images,
...
-
--temp-rename
- Append .part suffix to filename while file is being downloaded. Download
resume will not work with this option.
-
--skip-final
- Don't process final link (returned by module download function), just skip
it. This is applied for each input URL. If you are using this option, you
should need --run-after or --printf too.
Note: Depending hosters, final (generated) link may have
restrictions: validity timeout (few hours), access limitation (usually
one unique HTTP GET request for anonymous users), same IP address,
etc.
- --run-before=PROGRAM
- Call external program or script before new link processing (before calling
module download function). Provided executable can be located in
PATH environment variable. Messages can be sent to stderr, stdout
is trashed.
Three arguments are given:
$1 module name (lowercase). For example:
mediafire.
$2 download URL.
$3 cookie (empty) file given to download module
function.
Exit status:
0: script success. plowdown continue
normally.
2: script explicitly requests skipping current
link.
Note: Any other script exit status like 1 (fatal) or
3 (network) will be ignored (an error message will be reported).
- --run-after=PROGRAM
- Call external program or script after final link successful download.
Provided executable can be located in PATH environment variable.
Messages can be sent to stderr, stdout is trashed.
Five arguments are given:
$1 module name (lowercase). For example:
mediafire.
$2 download URL.
$3 cookie file fulfilled by download module
function.
$4 final URL.
$5 final filename.
Exit status:
0: script success. plowdown continue normally.
Note: Any other (non zero) exit status will be ignored (an error
message will be reported).
- --printf=FORMAT
- Print results (on stdout) in a given format (for each successful
download). Default format string is "%F%n". Interpreted
sequences are:
- %%
- raw % character
- %c
- final cookie filename (with output directory if specified). Name template
is plowdown-cookies-NNNN.txt.
- %C
- %c or empty string if module does not require it
- %d
- download (final) url
- %D
- same as %d but url is escaped for JSON usage
- %f
- destination (local) filename
- %F
- destination (local) filename (with output directory if specified)
- %m
- module name
- %n
- newline
- %s
- destination (local) file size (positive integer in bytes). Important:
Empty string is returned when --skip-final switch is
specified.
- %t
- tabulation character
- %u
- download (source) url
- %U
- same as %u but url is escaped for JSON usage