Giter Club home page Giter Club logo

baidu_pcs's Introduction

BaiduPcs

Try baidu pcs using ruby!

docs: http://developer.baidu.com/wiki/index.php?title=docs/pcs

Installation

Add this line to your application's Gemfile:

gem 'baidu_pcs'

And then execute:

$ bundle

Or install it yourself as:

$ gem install baidu_pcs

Usage

WARNING: in development, just try this, 另一个C语言实现的命令行工具

Steps:

  • create a baidu PCS app and enable pcs api permissions!
  • baidupcs setup _app_name _api_key _secret_key
  • baidupcs config to get an access token
  • get help by baidupcs --help at any time

List remote files:

cao@tj-desktop:~/dev/baidu_pcs$ baidupcs ls
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1291  100  1291    0     0   3721      0 --:--:-- --:--:-- --:--:--  4332
627065058                  books/                     0                          2013-09-10 15:29:08 +0800
3837173268                 img/                       0                          2013-09-10 15:45:35 +0800
2118772017                 personal/                  0                          2013-09-10 15:31:12 +0800
1827382386                 pkg/                       0                          2013-09-10 15:32:36 +0800
3885218819                 dns.jpg                    28253                      2013-09-13 08:41:59 +0800
2730525873                 Gemfile                    127                        2013-09-11 16:29:39 +0800
3974115712                 head.jpg                   17888                      2013-09-11 08:31:41 +0800
2311496999                 MongoDB-manual.pdf         8735748                    2013-09-11 18:55:55 +0800
1319250694                 Note.md                    71                         2013-09-11 18:11:46 +0800

TODO

  • Typhoeus优化及客户端模拟
  • 分享文件列表,如何自动化完成分享和获取分享链接?
  • 对log的支持
  • 错误体系构建
  • 应用拓广
    • DB备份
    • 静态资源存储支持

Test and Running

  • platform: ubuntu
  • ruby: 1.9.3, 2.0.0

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

baidu_pcs's People

Contributors

cao7113 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mobiwolf jackting

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.