baidubce-cli
Advanced tools
Comparing version 0.0.6 to 0.0.7
{ | ||
"name": "baidubce-cli", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "baidu cloud engine command line tools", | ||
@@ -24,13 +24,17 @@ "main": "index.js", | ||
"contributors": [ | ||
{ "name": "leeight", "email": "leeight@gmail.com" } | ||
{ | ||
"name": "leeight", | ||
"email": "leeight@gmail.com" | ||
} | ||
], | ||
"license": "MIT", | ||
"dependencies": { | ||
"underscore": "^1.7.0", | ||
"yargs": "^1.3.3", | ||
"baidubce-sdk": "~0.0.2", | ||
"debug": "^2.1.3", | ||
"moment": "^2.8.4", | ||
"q": "^1.1.2", | ||
"text-table": "^0.2.0", | ||
"moment": "^2.8.4", | ||
"baidubce-sdk": "0.0.2" | ||
"underscore": "^1.7.0", | ||
"yargs": "^1.3.3" | ||
} | ||
} |
@@ -5,3 +5,3 @@ ## baidubce-cli | ||
Currently only support operations on BOS service. | ||
Currently support operations on BOS and Media service. | ||
@@ -14,4 +14,6 @@ ## Install | ||
## Configuration | ||
## BOS Usage | ||
### Configuration | ||
For first time, you should config the `ak`, `sk` and `endpoint`. | ||
@@ -33,4 +35,2 @@ | ||
## Usage | ||
### create a bucket | ||
@@ -69,4 +69,62 @@ | ||
## Media Usage | ||
### Configuration | ||
For first time, you should config the `ak`, `sk` and `endpoint`. | ||
``` | ||
baidubce media -c media.ak my_ak | ||
baidubce media -c media.sk my_sk | ||
# Optional | ||
# baidubce media -c media.endpoint http://10.105.97.15 | ||
# baidubce media -c media.region my_region | ||
``` | ||
### Create bucket | ||
``` | ||
baidubce bos --create-buckets media-test-in media-test-out | ||
``` | ||
### Upload Video | ||
``` | ||
baidubce bos --put-object a.mov bos://media-test-in/a.mov | ||
``` | ||
Or | ||
``` | ||
baidubce bos --put-superfile a.mov bos://media-test-in/a.mov | ||
[=== ] 27% | ||
``` | ||
### Create pipeline | ||
``` | ||
baidubce media --create-pipeline \ | ||
--pn leeight_test \ | ||
--pc '{"capacity": 1}' \ | ||
--sb media-test-in \ | ||
--tb media-test-out | ||
``` | ||
### Create job | ||
``` | ||
baidubce media --create-job --pn leeight_test --rn bce_video_mp4_854x480_800kbps --sk a.mov --tk b.mov | ||
``` | ||
### Check job status | ||
``` | ||
baidubce media --get-all-jobs --pn leeight_test | ||
``` | ||
## Others | ||
More usages please refer `baidubce bos -h`. Feedback is welcome, feel free to send me an email for any question. | ||
More usages please refer `baidubce bos -h` or `baidubce media -h`. Feedback is welcome, feel free to send me an email for any question. |
@@ -23,3 +23,3 @@ /** | ||
var cmdConfig = require('./cmd_config'); | ||
var cmdConfig = require('../config'); | ||
var cmdPut = require('./cmd_put'); | ||
@@ -26,0 +26,0 @@ |
@@ -18,4 +18,7 @@ /** | ||
var Q = require('q'); | ||
var debug = require('debug')('cmd_put'); | ||
exports.putRegularFile = function (client, bucket_name, key, filename) { | ||
debug('putRegularFile bucket_name = %j, key = %j, filename = %j', | ||
bucket_name, key, filename); | ||
client.putObjectFromFile(bucket_name, key, filename) | ||
@@ -22,0 +25,0 @@ .then(function () { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31998
10
749
127
7
7
+ Addeddebug@^2.1.3
+ Addedbaidubce-sdk@0.0.23(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addedms@2.0.0(transitive)
- Removedbaidubce-sdk@0.0.2(transitive)
Updatedbaidubce-sdk@~0.0.2