1.0.2 • Published 5 years ago

alioss-image-hosting v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

Aliyun OSS image hosting

A tool for uploading image from clipboard to aliyun oss service and save image url to clipboard.

Requirements

  • MACOS
  • nodejs >= 8.0.0
  • pngpaste
brew install pngpaste

Install

npm install alioss-image-hosting -g

Usage

  1. configure
    You just need to initialize configuration once, unless you want to change your aliyun oss identities.
~ ossih-config
~ ossih-config
? Input aliyun oss AccessKeyId: your_access_key_id
? Input aliyun oss AccessKeySecret: your_access_key_secret
? Choose a region:  your_regin
? Choose a bucket to save images:  your_bucket_name
? Choose image url output format:  url
config saved:
{
    "oss": {
        "accessKeyId": "your_access_key_id",
        "accessKeySecret": "your_access_key_secret",
        "region": "your_region",
        "bucket": "your_bucket_name"
    },
    "temp": "temp_dir",
    "output": "url"
}
  1. upload
    Make sure you have taken screen shoot and save the image data to clipboard via a screenshoot tool, then run command
~ ossih-upload
Save clipboard content as image:  /your/tmp/folder/2019_1_16_2_7_13.png
Execute cmd: pngpaste /your/tmp/folder/2019_1_16_2_7_13.png
upload file /your/tmp/folder/2019_1_16_2_7_13.png aliyun oss
upload success
copy image url to clipboard success

The image url will replace the image data on clipboard, just paste it to wherever you like.The output format will be url/markdown as you configured.

Alfred Workflow

Available keywork is ih, which means image hosting. When keyword matches, ossih-upload will run in background, then you will get the image url on clipborad.

License

MIT

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago