App-dropboxapi

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - Remove interpolation in printf format arguments. (thefloweringash)
        - Ignore stty errors when stdin isn't a terminal. (thefloweringash)

1.12    Jun 21, 2013
        - Dropbox are case insensitive. (zenoamaro)

1.11    Jun 20, 2013
        - Dropbox are case insensitive.

1.10    Jun 20, 2013
        - Use lowercase for HTTP_PROXY envvar (mathstuf)

1.09    Jan  8, 2013
        - fix "list" and "find" utf8 path bug.

1.08    Jan  8, 2013
        - added print option. ( %R ... rev, %c %Ck ... client_mtime )
        - fix print option bug.

1.07    Jan  8, 2013
        - binmode STDERR, ":utf8"

1.06    Jan  8, 2013
        - added -e option, it is "HTTP_PROXY" and "NO_PROXY" environment variable support.
        - fix UTF-8-mac filename bug

1.05    Aug 28, 2012
        - added ProgressBar. ( need -v option )

1.04    Aug 27, 2012
        - large file support. ( over 150 MB )

1.03    Aug 14, 2012
        - set modification time.

README.md  view on Meta::CPAN

success! try
> dropbox-api ls
> dropbox-api find /
```

## 4. How to use Proxy

Please use -e option.

```
> HTTP_PROXY="http://127.0.0.1:8888" dropbox-api setup -e
```

# Sub Commands

## help

disp help.

- syntax

README.md  view on Meta::CPAN

    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 )

```

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

    1. Open the Login URL: https://www.dropbox.com/oauth2/authorize?client_id=*****&response_type=code
    2. Input code and press Enter: ***************
    success! try
    > dropbox-api ls
    > dropbox-api find /

=head2 4. How to use Proxy

Please use -e option.

    > HTTP_PROXY="http://127.0.0.1:8888" dropbox-api setup -e

=head1 Sub Commands

=head2 help

disp help.

=over 4

=item syntax

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

        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.

=head3 Example ( command help )

    > dropbox-api help ls
    Name

script/dropbox-api  view on Meta::CPAN

        if ($y =~ qr{ [yY] }xms) {
            delete $config->{access_level};
            $config_file->openw->print(encode_json($config));
            warn "=> Suucess.";
        } else {
            die "cancelled.";
        }
    }
}

$ENV{HTTP_PROXY} = $ENV{http_proxy} if !$ENV{HTTP_PROXY} && $ENV{http_proxy};
$ENV{NO_PROXY} = $ENV{no_proxy} if !$ENV{NO_PROXY} && $ENV{no_proxy};

my $box = WebService::Dropbox->new($config);
$box->env_proxy if $env_proxy;

my $strp = new DateTime::Format::Strptime( pattern => '%Y-%m-%dT%T' );
my $strpz = new DateTime::Format::Strptime( pattern => '%Y-%m-%dT%TZ' );

my $format = {
    i => 'id',

script/dropbox-api  view on Meta::CPAN

            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

        See 'dropbox-api help <command>' for more information on a specific command.
        };
    }
    $help =~ s|^ {8}||mg;
    $help =~ s|^\s*\n||;
    print "\n$help\n";
}



( run in 2.093 seconds using v1.01-cache-2.11-cpan-483215c6ad5 )