picgo
- 地址 : /home/zhu/software/node/node-v14.15.0-linux-x64/bin
- 文件内容
1#!/usr/bin/env /home/zhu/software/node/node-v14.15.0-linux-x64/bin/node
2const path = require('path')
3const minimist = require('minimist')
4const argv = minimist(process.argv.slice(2))
5let configPath = argv.c || argv.config || ''
6if (configPath !== true && configPath !== '') {
7 configPath = path.resolve(configPath)
8} else {
9 configPath = ''
10}
11const PicGo = require('../dist/src/index')
12const picgo = new PicGo(configPath)
13picgo.registerCommands()
14
15try {
16 picgo.cmd.program.parse(process.argv)
17} catch (e) {
18 picgo.log.error(e)
19 if (process.argv.includes('--debug')) {
20 Promise.reject(e)
21 }
22}
安装插件
- picgo install gitee-uploader super-prefix web-uploader
配置插件
-
/home/zhu/.picgo
-
1zhu@zhu-PC:~/.picgo$ cat config.json 2{ 3 "picBed": { 4 "current": "web-uploader", 5 "uploader": "web-uploader", 6 "smms": { 7 "token": "" 8 }, 9 "web-uploader": { 10 "customBody": null, 11 "customHeader": null, 12 "jsonPath": null, 13 "paramName": "file", 14 "url": "http://our.dongshanxia.top:56789/img/upload/fileUpload" 15 } 16 }, 17 "picgoPlugins": { 18 "picgo-plugin-web-uploader": true, 19 "picgo-plugin-gitee-uploader": true, 20 "picgo-plugin-super-prefix": true 21 } 22}