Top Level Namespace

Defined Under Namespace

Modules: Dbox

Constant Summary collapse

ROOT_PATH =
File.expand_path(File.join(File.dirname(__FILE__), ".."))

Instance Method Summary collapse

Instance Method Details



34
# File 'bin/dbox', line 34

def print_usage_and_quit; puts usage; exit 1; end

#usageObject

usage line



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'bin/dbox', line 7

def usage
  <<_EOF
Usage: dbox <command> [<args>]

Commands:
  authorize                             Generate auth keys
  create <remote_path> [<local_path>]   Create a new Dropbox folder
  clone <remote_path> [<local_path>]    Clone an existing Dropbox folder
  pull [<local_path>]                   Pull chonges from Dropbox
  push [<local_path>]                   Push changes to Dropbox
  sync [<local_path>]                   Sync changes to Dropbox
  move <new_remote_path> [<local_path>] Move the remote Dropbox folder to a new location
  delete <remote_path> [<local_path>]   Delete a Dropbox folder (local path optional, it will be deleted too if provided)
  clone_or_pull <remote_path> [<local_path>] Clone an existing Dropbox folder, or pull if it already exists locally

Environment varables needed for everything:
  export DROPBOX_APP_KEY=cmlrrjd3j0gbend
  export DROPBOX_APP_SECRET=uvuulp75xf9jffl

Environment varables needed for everything other than authorize:
  export DROPBOX_AUTH_KEY=v4d7l1rez1czksn
  export DROPBOX_AUTH_SECRET=pqej9rmnj0i1gcxr4
  export DROPBOX_ACCESS_TYPE=dropbox || app_folder (defaults to dropbox)

See http://github.com/kenpratt/dbox for examples and more information
_EOF
end