App-dropboxapi

 view release on metacpan or  search on metacpan

lib/App/dropboxapi.pm  view on Meta::CPAN

=item syntax

dropbox-api ls <dropbox_path>

=back

=head3 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

=head3 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

=head3 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)

L<http://search.cpan.org/dist/DateTime/lib/DateTime.pm#strftime_Patterns>

=head2 find

recursive file list view.

=over 4

=item syntax

dropbox-api find <dropbox_path> [options]

=back

=head3 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

=head3 printf option ( -p )

see also list command's printf option.

=head2 du

display disk usage statistics.

=over 4

=item syntax

dropbox-api du <dropbox_path> [options]

=back

=head3 Example

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

=head3 human readable option ( -h )

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

=head3 depth option ( -d )

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

=head2 sync ( rsync )

recursive file synchronization.

=head3 sync from dropbox

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

=head3 sync to dropbox

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

=head3 delete option ( -d )

    > 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

=head3 dry run option ( -n )

    > 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

=head3 verbose option ( -v )

    > 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

=head2 cp

copy file or directory.

=over 4

=item alias

copy

=item syntax

dropbox-api cp <source_file> <target_file>

=back

=head3 Example

    dropbox-api cp memo.txt memo.txt.bak

=head2 mv

move file or directory.

=over 4

=item alias

move

=item syntax

dropbox-api mv <source_file> <target_file>

=back

=head3 Example

    dropbox-api mv memo.txt memo.txt.bak

=head2 mkdir

make directory.

*no error if existing, make parent directories as needed.*

=over 4

=item alias

mkpath



( run in 1.969 second using v1.01-cache-2.11-cpan-f56aa216473 )