uper
v0.2.2
Published
A command-line tool for uploading images.
Downloads
8
Readme
uper
A command-line tool for uploading images.
Features
- Out of the box, uper can automatically upload local images to the cloud and add the URL to clipboard.
- Automatically parse Markdown file and replace local image reference to remote URL reference.
- More the images, you can upload your files to cdn server, now supports aliyun, qiniuyun.
Installation
The tool is based on Node.js
, so your have to install it first.
# install
npm install -g uper
# if successed
uper --help
Now you can use it!
Usage
Thanks to sm.ms, we can use it without and configuration. sm.ms as the default image stock, only support images, and upload same image twice will rise a error.
Upload one file
uper <FILE_PATH>
It's queitly easy to use uper, just run command uper <FILE_PATH>
, the file will be uploaded and return an URL witch will be add to clipboard automatically.
Multiple files
uper <GLOB_PATTERN>
uper supports globing pattern so that you can upload multiple files a time。For example, run uper test/*
can upload all files in test directory:
# upload all files in test
uper test/*
# upload cat1.jpg、cat2.jpg、cat3.jpg...
uper test/cat?.jpg
# only images
uper test/*.{jpg,png,gif}
Check bash_globbing_tutorial for more about globing pattern。
You can alse use uper test/* > output.txt
to persist the results.
Parse Markdown
Uper is very useful when writing Markdown files. By replacing local image references to remote URLs automatically, you can share your Markdown anywhere.
# parse Markdown
uper -m <MARKDOWN_FILE>
Changes after run uper -m README-CN.md
: