0.3.2 • Published 1 year ago
piclist-mas v0.3.2
PicList-Core
A tool for picture uploading. Both CLI & api supports. It also supports plugin system, please check Awesome-PicGo to find powerful plugins.
Based on Picgo-Core and add some features.
Typora support natively.
修改列表
- 增加了水印添加、图片压缩和图片格式转换功能
- CLI命令下通过
picgo set buildin watermark
和picgo set buildin compress
设置水印和压缩参数 - 图片处理位于beforeTransform之前,不与任何插件冲突
- CLI命令下通过
- smms, imgur和github图床增加hash返回参数,配合piclist的删除功能
- 增加了webdav内置支持
- axios等依赖升级到最新版本
Installation
PicList should be installed with node.js >= 12 (v1.5.0-alpha.4 and small) & node.js >= 16 (since v1.5.0-alpha.5).
before install
As PicList depends on sharp, you need to install sharp before install PicList.
npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
npm config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips"
npm install sharp
Global install
npm install piclist -g
# or
yarn global add piclist
Local install
npm install piclist -D
# or
yarn add piclist -D
Usage
Use in CLI
PicGo uses
SM.MS
as the default upload pic-bed.
Show help:
$ picgo -h
Usage: picgo [options] [command]
Options:
-v, --version output the version number
-d, --debug debug mode
-s, --silent silent mode
-c, --config <path> set config path
-h, --help output usage information
Commands:
install|add <plugins...> install picgo plugin
uninstall|rm <plugins...> uninstall picgo plugin
update <plugins...> update picgo plugin
set|config <module> [name] configure config of picgo modules
upload|u [input...] upload, go go go
use [module] use modules of picgo
init [options] <template> [project] create picgo plugin\'s development templates
Upload a picture from path
picgo upload /xxx/xx/xx.jpg
Upload a picture from clipboard
picture from clipboard will be converted to
png
picgo upload
Thanks to vs-picgo && Spades-S for providing the method to upload picture from clipboard.
Use in node project
Common JS
const { PicGo } = require('piclist')
ES Module
import { PicGo } from 'piclist'
API usage example
const picgo = new PicGo()
// upload a picture from path
picgo.upload(['/xxx/xxx.jpg'])
// upload a picture from clipboard
picgo.upload()
Documentation
For more details, you can checkout documentation.
0.3.2
1 year ago