Skip to content

hartez/PneumaticTube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PneumaticTube

Command line Dropbox uploader for Windows

Prague Pneumatic Post

Usage

pneumatictube -f <file> -p <path>

Uploads the specified file to the specified path in Dropbox. The -f option can also point to a folder, in which case each file in the folder will be uploaded to Dropbox. Currently only the files in specified folder are uploaded - child folders are ignored.

For example:

pneumatictube -f .\report.txt -p /docs

would upload report.txt to the docs folder in the Dropbox account.

Options

  • -f (required) The location of the file to upload
  • -p The destination path in Dropbox (if left blank, will default to your Dropbox root)
  • -r Force re-authorization with Dropbox
  • -c Force chunked uploading
  • -b Display progress in bytes instead of percentage when using chunked uploading
  • -q Suppress all output (except errors)
  • -n Suppress progress reporting during chunked uploading
  • -k Chunk size (in kilobytes) to use during chunked uploading
  • -t Timeout (in seconds) for HTTP connections

Authorization

The first time you run PneumaticTube it will open a browser and ask you to authorize it for your Dropbox account.

If you ever want to deauthorize it (for example, to authorize it for a different account), you can run it with the -r (reset) option.

Chunked Uploading

Dropbox requires chunked uploading (uploading the file in many small parts, instead of one big blob) for files above 150 MB. Pneumatictube will automatically use chunked uploading for files which require it. For smaller files, you can specify the -c option to force chunked uploading. This is useful if you want a progress indicator during the upload.

If you specify the -c option, you can also use the -b option to specify that you want your progress updates in bytes instead of percentage (the default), or -n to suppress progress reporting.

The -k option allows you to specify the chunk size (in kilobytes) to use during chunked uploading. The default is 1024, and the minimum is 128. If you are uploading very large files, you may find a significant speed boost by increasing the chunk size so the file is uploaded in fewer chunks.

Installation

If you're not into building the project from source, you can download the latest release as a .zip. Or, if you're a chocolatey user, it's also available as a package. Just run choco install pneumatictube.portable and you should be good to go.

Notes

This is built on the .NET SDK for the Dropbox API v2 and on Command Line Parser. I basically just needed an easy way for a TeamCity server to push artifacts out to a Dropbox folder, and I didn't like all the awkward "run Dropbox as a service" hacks out there.


Image Credit: By Serych at cs.wikipedia [Public domain], from Wikimedia Commons