README.md - transferwee - Download/upload file via wetransfer.com
 (HTM) git clone https://github.com/iamleot/transferwee
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
       README.md (3209B)
       ---
            1 [![Build Status](https://travis-ci.com/iamleot/transferwee.svg?branch=master)](https://travis-ci.com/iamleot/transferwee)
            2 
            3 # transferwee
            4 
            5 transferwee is a simple Python 3 script to download/upload files via
            6 [wetransfer.com](https://wetransfer.com/).
            7 
            8 
            9 ## Usage
           10 
           11 ```
           12 % transferwee -h
           13 usage: transferwee [-h] {download,upload} ...
           14 
           15 Download/upload files via wetransfer.com
           16 
           17 positional arguments:
           18   {download,upload}  action
           19     download         download files
           20     upload           upload files
           21 
           22 optional arguments:
           23   -h, --help         show this help message and exit
           24 ```
           25 
           26 ### Upload files
           27 
           28 `upload` subcommand uploads all the files and then print the shorten
           29 URL corresponding the transfer.
           30 
           31 If both `-f` option and `-t` option are passed the email upload
           32 will be used (in that way the sender will get an email after the
           33 upload and after every recipient will download the file, please
           34 also note that because `-t` option accepts several fields a `--`
           35 is needed to separate it with the file arguments).
           36 Otherwise the link upload will be used.
           37 
           38 ```
           39 % transferwee upload -h
           40 usage: transferwee upload [-h] [-m message] [-f from] [-t to [to ...]]
           41                           file [file ...]
           42 
           43 positional arguments:
           44   file            files to upload
           45 
           46 optional arguments:
           47   -h, --help      show this help message and exit
           48   -m message      message description for the transfer
           49   -f from         sender email
           50   -t to [to ...]  recipient emails
           51 ```
           52 
           53 The following example creates an `hello` text file with just `Hello world!` and
           54 then upload it with the message passed via `-m` option:
           55 
           56 ```
           57 % echo 'Hello world!' > hello
           58 % md5 hello
           59 MD5 (hello) = 59ca0efa9f5633cb0371bbc0355478d8
           60 % transferwee upload -m 'Just a text file with the mandatory message...' hello
           61 https://we.tl/o8mGUXnxyZ
           62 ```
           63 
           64 ### Download file
           65 
           66 `download` subcommand download all the files from the given
           67 we.tl/wetransfer.com URLs.
           68 
           69 If the `-g` option is used it will just print the direct link
           70 corresponding each URLs without downloading files.
           71 
           72 The URL supported are the ones in the form:
           73 
           74  - `https://we.tl/<short_url_id>`: 
           75     received via link upload, via email to the sender and printed by
           76     `upload` action
           77  - `https://wetransfer.com/<transfer_id>/<security_hash>`:
           78     directly not shared in any ways but the short URLs actually redirect to
           79     them
           80  - `https://wetransfer.com/<transfer_id>/<recipient_id>/<security_hash>`: 
           81     received via email by recipients when the files are shared via email
           82     upload
           83 
           84 ```
           85 % transferwee download -h
           86 usage: transferwee download [-h] [-g] url [url ...]
           87 
           88 positional arguments:
           89   url         URL (we.tl/... or wetransfer.com/downloads/...)
           90 
           91 optional arguments:
           92   -h, --help  show this help message and exit
           93   -g          only print the direct link (without downloading it)
           94 ```
           95 
           96 The following example download the `hello` text file that was uploaded in the
           97 previous example for `upload` subcommand. Please note that if any file with the
           98 same name already exists it will be overwritten!:
           99 
          100 ```
          101 % transferwee download https://we.tl/o8mGUXnxyZ
          102 % cat hello
          103 Hello world!
          104 % md5 hello
          105 MD5 (hello) = 59ca0efa9f5633cb0371bbc0355478d8
          106 ```
          107 
          108 ## Dependencies
          109 
          110 transferwee needs [requests](http://python-requests.org/) package.