Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myxvisual/ossr
📂 An OSS object selector for CLI.
https://github.com/myxvisual/ossr
Last synced: 4 days ago
JSON representation
📂 An OSS object selector for CLI.
- Host: GitHub
- URL: https://github.com/myxvisual/ossr
- Owner: myxvisual
- License: mit
- Created: 2019-05-07T11:06:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T03:42:03.000Z (over 1 year ago)
- Last Synced: 2024-04-27T01:03:00.933Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 412 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OSSR
[![npm package](https://img.shields.io/npm/v/ossr.svg?style=flat-square)](https://www.npmjs.org/package/ossr)
[![PeerDependencies](https://img.shields.io/david/peer/myxvisual/ossr.svg?style=flat-square)](https://david-dm.org/myxvisual/ossr#info=peerDependencies&view=list)
[![Dependencies](https://img.shields.io/david/myxvisual/ossr.svg?style=flat-square)](https://david-dm.org/myxvisual/ossr)
[![DevDependencies](https://img.shields.io/david/dev/myxvisual/ossr.svg?style=flat-square)](https://david-dm.org/myxvisual/react-uwp#info=devDependencies&view=list)
## Inistall
`npm i -g ossr`## Config
**Simplify**
`ossr -i -s -b `
**Advance**
`ossr -i -s -b -e -r -t `
## CLI Usage
### Graph
`ossr`
`ossr -l`
`ossr -l folder/`
![list](https://raw.githubusercontent.com/myxvisual/ossr/master/images//list.gif)### Upload
#### Upload file to root pat
`ossr ./localFile.jpg` ------> `https://xxxx/localFile.jpg`#### Upload folder to root path
`ossr ./localFolder` ------> `https://xxxx/onlineFolder/`#### Upload file with rename
`ossr ./localFile.jpg customFolder/renamedFile.jpg` ------> `https://xxxx/customFolder/renamedFile.jpg`#### Upload folder with rename
`ossr ./localFolder onlineFolder/` ------> `https://xxxx/onlineFolder/`
![upload](https://raw.githubusercontent.com/myxvisual/ossr/master/images//upload.gif)#### Delete
`ossr -d remoteFileOrFolder`
![delete](https://raw.githubusercontent.com/myxvisual/ossr/master/images//delete.gif)### Help
`ossr -h`## Module Usage
``` js
import * as ossr from "../bin/ossr";async function test() {
// ossr.setConfig({
// accessKeyId: "",
// accessKeySecret: ""
// });let existRes = false;
const uploadRes = await ossr.ossUpload("../bin", "ossr/");
// console.log(uploadRes);
existRes = await ossr.ossIsExist("ossr/ossr.js");
// console.log(existRes);
const deleteRes = await ossr.ossDelete("ossr/");
// console.log("deleteRes", deleteRes);
}test()
```