Skip to content
/ qncli Public

七牛云命令行管理小工具/QiNiu Command Line Interface

Notifications You must be signed in to change notification settings

evilpan/qncli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qncli

README(English Version)

qncli是七牛云存储的命令行封装, 使用类似ls,stat,mv,cp,rm等命令来方便快捷地管理云空间.

$ ./qncli.py -h
usage: qncli [-h] [-c CONFIG] {ls,stat,mv,cp,rm,upload,fetch,edit} ...

QiNiu Command Line Interface

positional arguments:
  {ls,stat,mv,cp,rm,upload,fetch,edit}
                        available commands. qncli <command> -h to see more
                        help messages
    ls                  list remote files
    stat                show detail of remote file
    mv                  move file
    cp                  copy file
    rm                  remove file in remote bucket
    upload              upload local file to remote bucket
    fetch               fetch network file to remote bucket
    edit                edit network file MIME type and/or storage type

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        path to qiniu configuration. (default: ~/.qiniu.json)

asciicast

使用示例

上传本地文件到云空间:

qncli.py upload /home/pan/screenshot.png

上传网络文件到云空间:

qncli.py fetch "http://example.com/background.jpg" -d img/example.jpg

查看云空间的所有文件:

qncli.py ls

查看云空间以image为前缀的文件:

qncli.py ls image

查看文件详细信息:

qncli.py stat screenshot.png

修改文件MIME格式:

encli.py edit screenshot.png --mime 'text/plain'

移动/重命名空间文件:

qncli.py mv screenshot.png img/screenshot.png

删除文件:

qncli.py rm img/screenshot.png

配置

七牛的 access_key/secret_key等配置在~/.config/qncli.json文件中, 可以参考conf/example.json

About

七牛云命令行管理小工具/QiNiu Command Line Interface

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages