App-dropboxapi

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

- syntax

    dropbox-api help \[<command>\]

### Example

```perl
> 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
    du    disk usage statistics
    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)

Common Options
    -e enable env_proxy ( HTTP_PROXY, NO_PROXY )
    -D enable debug
    -v verbose
    -s sandbox mode, but this option has been removed.

See 'dropbox-api help <command>' for more information on a specific command.
```

### Example ( command help )

```
> 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 )
        %i ... id
        %n ... name
        %p ... path_display
        %P ... path_lower
        %b ... bytes
        %s ... size (e.g., 1K 234M 2G)
        %t ... server_modified
        %c ... client_modified
        %r ... rev
        %Tk ... DateTime 'strftime' function (server_modified)
        %Ck ... DateTime 'strftime' function (client_modified)
```

[http://search.cpan.org/dist/DateTime/lib/DateTime.pm#strftime\_Patterns](http://search.cpan.org/dist/DateTime/lib/DateTime.pm#strftime_Patterns)

## ls

file list view.

- alias

    list

- syntax

    dropbox-api ls &lt;dropbox\_path>

### Example

```
> 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
```

### human readable option ( -h )

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
```

### printf option ( -p )

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 )
    %i ... id
    %n ... name
    %p ... path_display
    %P ... path_lower
    %b ... bytes
    %s ... size (e.g., 1K 234M 2G)
    %t ... server_modified
    %c ... client_modified
    %r ... rev
    %Tk ... DateTime 'strftime' function (server_modified)
    %Ck ... DateTime 'strftime' function (client_modified)
```

[http://search.cpan.org/dist/DateTime/lib/DateTime.pm#strftime\_Patterns](http://search.cpan.org/dist/DateTime/lib/DateTime.pm#strftime_Patterns)

## find

recursive file list view.

- syntax

    dropbox-api find &lt;dropbox\_path> \[options\]

### Example

```
> 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
```

### printf option ( -p )

see also list command's printf option.

## du

display disk usage statistics.

- syntax

    dropbox-api du &lt;dropbox\_path> \[options\]

### Example

```
> dropbox-api du /product -h -d 1
1.1M    /product
1.1M    /product/chrome-extensions
  0B    /product/work
```

### human readable option ( -h )

print sizes in human readable format (e.g., 1K 234M 2G)

### depth option ( -d )

Display an entry for all files and directories depth directories deep.

## sync ( rsync )

recursive file synchronization.



( run in 0.861 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )