1
2plowdown(1)                  Plowshare for Bash 4                  plowdown(1)
3
4
5

NAME

7       plowdown - Simple download manager for file sharing websites
8
9

SYNOPSIS

11       plowdown [OPTIONS]...  [MODULE_OPTIONS]...  URL|FILE...
12
13

DESCRIPTION

15       plowdown  is  a  command-line  tool  designed for automatic download on
16       file-sharing websites.  It acts like a web  browser,  retrieving  pages
17       and filling HTML forms (including captchas).
18
19       Currently supported hosting sites list is available in README file.
20
21

OPTIONS

23   Common options
24       -i, --interface=IFACE
25              If  your  machine  has  several  network interfaces, force using
26              IFACE interface.
27
28       -m, --mark-downloaded
29              Mark downloaded links in (regular) file arguments.
30
31       -o, --output-directory=DIRECTORY
32              Directory where files will be saved. Default is  current  direc‐
33              tory.
34
35       -r, --max-retries=N
36              Set  maximum retries for download failures. Apply on module exit
37              status: 3 (network error), 7 (captcha  error).   Default  option
38              value  is  2 (i.e. 3 tries) and applies for one single URL down‐
39              load.
40
41       -t, --timeout=SECS
42              Cancel download after SECS seconds of  waits.  Apply  on  module
43              exit  status:  10 (temporary unavailable error).  This error can
44              be returned in various cases: unallowed parallel download, daily
45              downloads  limit  reached,  remote  hoster  overloaded.  Default
46              option value is disabled (no timeout, infinite) and applies  for
47              one single URL download.
48
49       -x, --no-overwrite
50              Do not overwrite existing files. Existing file will be preserved
51              and filename will be suffixed with .1, .2, and so on.
52
53           --cache=METHOD
54              Cache policy regarding module storage  space.   Each  module  is
55              able  to  save  data  (credentials,  authentication  session, or
56              tokens) in order to be reused later.  Available values:
57              none : module storage file is deleted before each  URL  process‐
58              ing.  Temporary directory is used.
59              session (default) : module storage file is deleted at the end of
60              plowdown execution.  Temporary directory is used.
61              shared : module storage file is global and located  (in  ~/.con‐
62              fig/plowshare/storage/).   It  can  be  accessed  by  any  other
63              instance of plow* scripts.  Warning: There is no  atomicity  (or
64              file locking) on concurrent access.
65
66              Example:  Multiple  links  download using a premium account.  If
67              supported by module, login stage could be performed once.
68
69   Captcha options
70           --9kweu=KEY
71              Use 9kw.eu service to solve captchas.
72
73           --antigate=KEY
74              Use Antigate.com service to solve captchas.
75
76           --captchabhood=USER:PASSWORD
77              Use Captcha Brotherhood service to solve captchas.
78
79           --captchacoin=KEY
80              Use CaptchaCoin service to solve captchas.
81
82           --deathbycaptcha=USER:PASSWORD
83              Use Death by Captcha service to solve captchas.
84
85           --captchamethod=METHOD
86              Force specific captcha solving method. Available values:
87              imgur : upload image to Imgur.com service, print  image  url  in
88              console  and  prompt  for  manual  entering.  Useful for NAS and
89              embedded devices.
90              none : abort if captcha solving is requested (even if  automatic
91              solving service is available).
92              online  :  use  captcha  solving  website only (9kweu, Antigate,
93              CaptchaBrotherhood,  CaptchaCoin   or   DeathByCaptcha   account
94              required).
95              fb  : display image in framebuffer console and prompt for manual
96              entering. Looks for framebuffer viewers: fbi, fim.   FRAMEBUFFER
97              environment   variable  can  contain  device  file.  Default  is
98              /dev/fb0.
99              nox : display image in console  (text)  and  prompt  for  manual
100              entering. Looks for ascii viewers: img2txt, aview, tiv.
101              x11  :  display  image  in  an  X11 window and prompt for manual
102              entering. Looks for viewers: display, feh, sxiv, qiv.
103
104           --captchaprogram=PROGRAM
105              Call external program or script for solving  captchas.  Provided
106              executable can be located in PATH environment variable.
107
108              Three arguments are given:
109              $1 module name (lowercase). For example: mediafire.
110              $2 image filename (with full path).
111              $3 hint or captcha type (string). For example: recaptcha, solve‐
112              media or digits-4.
113
114              Return value (on stdout) and exit status:
115              0 : solving success. Captcha Word(s) must be echo'ed.
116              2 : external solver is not able to solve requested captcha.  Let
117              plowdown   continue   solving   it   normally   (will   consider
118              --captchamethod if specified).
119              7 : external solver failed.  Note: this exit  code  is  eligible
120              with retry policy (-r/--max-retries).
121
122              Note:  plowdown  legacy  exit  errors  can also be returned, for
123              example: 1 (fatal) or 3 (network).
124
125   Tuning settings
126           --min-space=LIMIT
127              Define threshold amount of available disk space before  quitting
128              plowdown.  You must specify a suffix.  Suffixes are:
129              M  for megabytes (MB i.e. 1000^2),
130              G  for gigabytes (GB i.e. 1000^3),
131              Mi or m  for mebibytes (MiB i.e. 1024^2),
132              Gi  for gibibytes (GiB i.e. 1024^3).
133
134           --max-rate=SPEED
135              Limit download speed in bytes per second. Suffixes are:
136              k  for kilobytes (kB i.e. 1000),
137              M  for megabytes (MB i.e. 1000^2),
138              K or Ki  for kibibytes (KB or KiB i.e. 1024),
139              m or Mi  for mebibytes (mB or MiB i.e. 1024^2).
140
141           --temp-directory=DIRECTORY
142              Directory  for  temporary  files:  final link download, cookies,
143              images, ...
144
145           --temp-rename
146              Append .part suffix to filename while file is being  downloaded.
147              Download resume will not work with this option.
148
149           --skip-final
150              Don't process final link (returned by module download function),
151              just skip it. This is applied for each input URL.   If  you  are
152              using this option, you should need --run-after or --printf too.
153
154           --run-before=PROGRAM
155              Call external program or script before new link processing. Pro‐
156              vided executable can be located in  PATH  environment  variable.
157              Messages can be sent to stderr, stdout is trashed.
158
159              Three arguments are given:
160              $1 module name (lowercase). For example: mediafire.
161              $2 download URL.
162              $3 cookie (empty) file given to download module function.
163
164              Exit status:
165              0 : script success. plowdown continue normally.
166              2 : script explicitily requests skipping current link.
167
168              Note: Any other script exit status like 1 (fatal) or 3 (network)
169              will be ignored (an error message will be reported).
170
171           --run-after=PROGRAM
172              Call external program or  script  after  final  link  successful
173              download. Provided executable can be located in PATH environment
174              variable.  Messages can be sent to stderr, stdout is trashed.
175
176              Five arguments are given:
177              $1 module name (lowercase). For example: mediafire.
178              $2 download URL.
179              $3 cookie file fulfilled by download module function.
180              $4 final URL.
181              $5 final filename.
182
183              Exit status:
184              0 : script success. plowdown continue normally.
185
186              Note: Any other (non zero) exit status will be ignored (an error
187              message will be reported).
188
189           --printf=FORMAT
190              Print results (on stdout) in a given format (for each successful
191              download).  Default  format  string   is   "%F%n".   Interpreted
192              sequences are:
193
194              %%     raw % character
195
196              %c     final  cookie  filename  (with output directory if speci‐
197                     fied). Name template is plowdown-cookies-NNNN.txt.
198
199              %C     %c or empty string if module does not require it
200
201              %d     download (final) url
202
203              %D     same as %d but url is escaped for JSON usage
204
205              %f     destination (local) filename
206
207              %F     destination (local) filename (with  output  directory  if
208                     specified)
209
210              %m     module name
211
212              %n     newline
213
214              %s     destination  (local)  file  size  (positive  interger  in
215                     bytes).   Important:  Empty  string  is   returned   when
216                     --skip-final switch is specified.
217
218              %t     tabulation character
219
220              %u     download (source) url
221
222              %U     same as %u but url is escaped for JSON usage
223
224   Logging options
225       -v, --verbose=LEVEL
226              Set output verbosity level:
227              0  none,
228              1  errors,
229              2  notice (default behavior),
230              3  debug,
231              4  report (very noisy, log HTML pages).
232
233       -q, --quiet
234              Alias for -v0. Do not print any debug messages.
235
236   Miscellaneous options
237           --no-color
238              Disables log messages (stderr only) output coloring.
239
240           --fallback
241              If no module is found for link, simply download it (HTTP GET).
242
243           --no-curlrc
244              Do not use curl config file (~/.curlrc).
245
246           --curlrc=FILE
247              Force  using  an  alternate  curl  configuration  file. Replaces
248              ~/.curlrc  if  it  exists.   This  option  has  no  effect  when
249              --no-curlrc is defined.
250
251           --no-plowsharerc
252              Do not consider any configuration file.
253
254           --plowsharerc=FILE
255              Force using an alternate configuration file (instead of per-user
256              or systemwide plowshare.conf).  This option has no  effect  when
257              --no-plowsharerc is defined.
258
259           --modules
260              Display all supported module names (one per line) and exit. Use‐
261              ful for wrappers.
262
263   Generic program information
264       -h, --help
265              Display main help and exit.
266
267       -H, --longhelp
268              Display complete help (with module options) and exit.
269
270           --version
271              Output version information and exit.
272
273

MODULE OPTIONS

275   Common options
276       -a, --auth=USER:PASSWORD
277              Use premium account.
278
279       -b, --auth-free=USER:PASSWORD
280              Use free account.
281
282       -p, --link-password=PASSWORD
283              Used for password-protected files.
284
285       All switches are not implemented nor required  for  all  modules.   See
286       long help message for detailed modules option list.
287
288

NOTES

290   Command line authentication string format
291       Complete  login  must  have  USER:PASSWORD format. The first semi-colon
292       character is the separator. So, PASSWORD can contain a semi-colon char‐
293       acter without any trouble.
294
295       Don't  forget  to  single-quote  string  if your password contain shell
296       expandable characters (like space, $ or &).
297
298

EXAMPLES

300   1) Download one or several files
301       $ plowdown http://www.rapidshare.com/files/12345678/foo.rar
302
303       # Downloads are successive (not parallel)
304       $ plowdown http://depositfiles.com/files/fv2u9xqya \
305           http://rapidgator.net/file/49b1b874
306
307       # Download a password-protected file from mediafire
308       $ plowdown -p somepassword http://www.mediafire.com/?mt0egmhietj60iy
309
310       # Download using an account (free or premium, not supported by all modules)
311       $ plowdown -a 'myuser:mypassword' http://rapidgator.net/file/49b1b874
312
313   2) Download a list of links (one link per line)  commenting  out  (with  #)
314       those successfully downloaded
315       $ plowdown -m file_with_links.txt
316
317   3) Download with restrictions
318       $ plowdown --max-rate 900K -i eth1 http://depositfiles.com/files/fv2u9xqya
319
320   4) Download with a proxy (3128 is the default port)
321       $ export http_proxy=http://192.168.0.20:80
322       $ plowdown http://www.rapidshare.com/files/12345678/foo.rar
323
324   5)  Don't  download  file  but only display final download URL (alternative
325       HTTP retriever can be used).
326       # Depending hosters, cookie file might be required.
327       $ plowdown -v1 --skip-final --printf '# %f%n%d%n' \
328           http://www.sendspace.com/file/5njdw7
329
330   6) Safe download. Each URL will be limited in the number of tries and  wait
331       delays.
332       $ alias plowdown='plowdown --no-overwrite --max-retries=10 --timeout=3600'
333       $ plowdown -m file_with_links.txt
334
335

FILES

337       /etc/plowshare.conf
338              Systemwide configuration file.
339
340       ~/.config/plowshare/plowshare.conf
341              This is the per-user configuration file.
342
343       The file format is described in plowshare.conf(5).
344
345       ~/.config/plowshare/exec/
346              Additional  directory  considered when searching for executable.
347              See --captchaprogram, --run-before and --run-after switches.
348
349       ~/.config/plowshare/modules/
350              User directory considered when searching for modules at  startup
351              (plowdown  will try to open ~/.config/plowshare/modules/config).
352              One file per module (hoster).
353
354       ~/.config/plowshare/storage/
355              Directory used for storing data (one file per module) among ses‐
356              sions.  See --cache=shared switch.
357
358

EXIT CODES

360       Possible exit codes are:
361
362       0      Success.
363
364       1      Fatal error. Upstream site updated or unexpected result.
365
366       2      No available module (provided URL is not supported).
367
368       3      Network error. Mostly curl related.
369
370       4      Authentication failed (bad login/password).
371
372       5      Timeout reached (refer to -t/--timeout command-line option).
373
374       6      Maximum  tries  reached  (refer to -r/--max-retries command-line
375              option).
376
377       7      Captcha generic error.
378
379       8      System generic error.
380
381       10     Link alive but temporarily unavailable.
382
383       11     Link alive but requires a password.
384
385       12     Link alive but requires some authentication (private or  premium
386              link).
387
388       13     Link is dead.
389
390       14     Can't download link because file is too big (need permissions).
391
392       15     Unknown command line parameter or incompatible options.
393
394       If  plowdown  is invoked with multiple links or link-list files and one
395       or several errors occur, the first error code is  returned  added  with
396       100.
397
398

AUTHORS

400       Plowshare  was initially written by Arnau Sanchez. See the AUTHORS file
401       for a list of some of the many other contributors.
402
403       Plowshare is (C) 2010-2015 The Plowshare Team
404

SEE ALSO

406       plowup(1), plowdel(1), plowlist(1), plowprobe(1), plowshare.conf(5).
407
408
409
410GPL                            February 5, 2015                    plowdown(1)
Impressum