scost (simple cos table)
A simple command line tool to manage objects with same names across multiple buckets (for Tencent Cloud COS only).
Usage
Run
scost # (default: -c $HOME/.scost.toml)
or
scost -c config.toml
into an interactive shell.
Commands
cp <from_bucket> [<to_bucket>|*] <path>. Copy an existing object from one bucket to another bucket (or all buckets).ls [<bucket>|*] <path>. List objects under a path in a bucket (or all buckets).rm [<bucket>|*] <path>. Remove an object from a bucket (or all buckets).sign [<bucket>|*] <path>. Sign a url for an object in a bucket (or all buckets).
P.S. '*' represents all buckets.
Configuration
Just put your authentication information (secret id and secret key) and used buckets in an toml file.
An example is in config/config.toml:
[]
= "secret id"
= "secret key"
[[]]
= "b1"
= "bucket1"
= "ap-shanghai"
[[]]
= "b2"
= "bucket2"
= "ap-beijing"
TODO
cpsupports copying a directory recursively.