App::dropboxapi - command line interface to access Dropbox API
dropbox-api put /tmp/foo.txt dropbox:/Public/
Run dropbox-api help for more options.
dropbox-api help
dropbox-api is a command line interface to access Dropbox API.
has many sub-commands ... ls, find, sync, cp, mv, rm, mkdir, get, put, uid
disp help.
dropbox-api help [<command>]
> dropbox-api help Usage: dropbox-api <command> [args] [options] Available commands: setup get access_key and access_secret ls list directory contents find walk a file hierarchy cp copy file or directory mv move file or directory mkdir make directory (Create intermediate directories as required) rm remove file or directory (Attempt to remove the file hierarchy rooted in each file argument) put upload file get download file sync sync directory (local => dropbox or dropbox => local) uid get accound uid See 'dropbox-api help <command>' for more information on a specific command.
> dropbox-api help ls Name dropbox-api-ls - list directory contents SYNOPSIS dropbox-api ls <dropbox_path> [options] Example dropbox-api ls Public dropbox-api ls Public -h dropbox-api ls Public -p "%d\t%s\t%TY/%Tm/%Td %TH:%TM:%TS\t%p\n" Options -h print sizes in human readable format (e.g., 1K 234M 2G) -p print format. %d ... is_dir ( d: dir, -: file ) %p ... path %b ... bytes %s ... size (e.g., 1K 234M 2G) %i ... icon %e ... thumb_exists %M ... mime_type %t ... modified time %r ... revision %Tk ... DateTime 'strftime' function
file list view.
list
dropbox-api ls <dropbox_path>
> dropbox-api list /product d - Thu, 24 Feb 2011 06:58:00 +0000 /product/chrome-extentions - 294557 Sun, 26 Dec 2010 21:55:59 +0000 /product/ex.zip
print sizes in human readable format (e.g., 1K 234M 2G)
> dropbox-api ls /product -h d - Thu, 24 Feb 2011 06:58:00 +0000 /product/chrome-extentions - 287.7KB Sun, 26 Dec 2010 21:55:59 +0000 /product/ex.zip
print format.
> dropbox-api ls /product -p "%d\t%s\t%TY/%Tm/%Td %TH:%TM:%TS\t%p\n" d - 2011/02/24 06:58:00 /product/chrome-extentions - 287.7KB 2010/12/26 21:55:59 /product/ex.zip %d ... is_dir ( d: dir, -: file ) %p ... path %b ... bytes %s ... size (e.g., 1K 234M 2G) %i ... icon %e ... thumb_exists %M ... mime_type %t ... modified time %r ... revision %Tk ... DateTime 'strftime' function <http://search.cpan.org/dist/DateTime/lib/DateTime.pm#strftime_Patterns>
recursive file list view.
dropbox-api find <dropbox_path> [options]
> dropbox-api find /product/google-tasks-checker-plus /product/chrome-extentions/google-tasks-checker-plus/README.md /product/chrome-extentions/google-tasks-checker-plus/src /product/chrome-extentions/google-tasks-checker-plus/src/background.html /product/chrome-extentions/google-tasks-checker-plus/src/external.png /product/chrome-extentions/google-tasks-checker-plus/src/icon-32.png /product/chrome-extentions/google-tasks-checker-plus/src/icon-128.png /product/chrome-extentions/google-tasks-checker-plus/src/icon.gif /product/chrome-extentions/google-tasks-checker-plus/src/jquery-1.4.2.min.js /product/chrome-extentions/google-tasks-checker-plus/src/main.js /product/chrome-extentions/google-tasks-checker-plus/src/manifest.json /product/chrome-extentions/google-tasks-checker-plus/src/options.html /product/chrome-extentions/google-tasks-checker-plus/src/popup.html /product/chrome-extentions/google-tasks-checker-plus/src/reset.css
see also list command's printf option.
recursive file synchronization.
dropbox-api sync dropbox:<source_dir> <target_dir> [options]
> dropbox-api sync dropbox:/product/google-tasks-checker-plus/src /tmp/product download /private/tmp/product/external.png download /private/tmp/product/icon-32.png download /private/tmp/product/icon-128.png
dropbox-api sync <source_dir> dropbox:<target_dir> [options]
> dropbox-api sync /tmp/product dropbox:/work/src upload background.html /work/src/background.html upload external.png /work/src/external.png upload icon-128.png /work/src/icon-128.png
> dropbox-api sync dropbox:/product/google-tasks-checker-plus/src /tmp/product -d download /private/tmp/product/external.png download /private/tmp/product/icon-32.png download /private/tmp/product/icon-128.png remove background.html.tmp
> dropbox-api sync dropbox:/product/google-tasks-checker-plus/src /tmp/product -dn !! enable dry run !! download /private/tmp/product/external.png download /private/tmp/product/icon-32.png download /private/tmp/product/icon-128.png remove background.html.tmp
> dropbox-api sync dropbox:/product/google-tasks-checker-plus/src /tmp/product -dnv remote_base: /product/chrome-extentions/google-tasks-checker-plus/src local_base: /private/tmp/product ** download ** skip background.html download /private/tmp/product/external.png download /private/tmp/product/icon-32.png download /private/tmp/product/icon-128.png skip icon.gif skip jquery-1.4.2.min.js skip main.js skip manifest.json skip options.html skip popup.html skip reset.css ** delete ** skip background.html remove background.html.tmp skip icon.gif skip jquery-1.4.2.min.js skip main.js skip manifest.json skip options.html skip popup.html skip reset.css
copy file or directory.
copy
dropbox-api cp <source_file> <target_file>
dropbox-api cp memo.txt memo.txt.bak
move file or directory.
move
dropbox-api mv <source_file> <target_file>
dropbox-api mv memo.txt memo.txt.bak
make directory.
*no error if existing, make parent directories as needed.*
mkpath
dropbox-api mkdir <directory>
dropbox-api mkdir product/src
remove file or directory.
*remove the contents of directories recursively.*
rmtree
dropbox-api rm <file_or_directory>
dropbox-api rm product/src
download file from dropbox.
dl, download
dropbox-api get dropbox:<dropbox_file> <file>
dropbox-api get dropbox:/Public/foo.txt /tmp/foo.txt
upload file to dropbox.
up, upload
dropbox-api put <file> dropbox:<dropbox_dir>
A progress bar is displayed.
dropbox-api put /tmp/1GB.dat dropbox:/Public/ 100% [=====================================================================================>]
Get your accound UID
dropbox-api uid
Copyright 2012- Shinichiro Aska
The standalone executable contains the following modules embedded.
Released under the MIT license. http://creativecommons.org/licenses/MIT/
To install App::dropboxapi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::dropboxapi
CPAN shell
perl -MCPAN -e shell install App::dropboxapi
For more information on module installation, please visit the detailed CPAN module installation guide.