ubuntu下typora的gitee图床配置-----基于picgo
ubuntu下typora的gitee图床配置
前情回顾,why
- 因为
picgo
的GUI软件PicGo-2.3.0-beta.0.AppImage
对typora支持有bug,md中无法变文件名,命令行工具可以。 - 但是
picgo-core
命令行配置只支持通用部分,插件配置只能人肉编辑。 - 所以可以先用
picgo
的GUI软件配置好插件,然后在命令行粘贴配置文件。
安装过程
安装picgo,GUI获取配置文件
- 安装
typora
:略,看官网 - 下载安装
picgo
:https://github.com/Molunerfinn/PicGo
去release里面下 - 运行picgo,配置gitee图床,参见
https://blog.csdn.net/qq_28540443/article/details/106167623
- 配置好以后,可以点击打开文件:
PicGo设置-打开配置文件
安装picgo-core,给typora用
- 安装
node
:略,下载二进制解压即可 - 配置
cnpm
:npm install -g cnpm --registry=https://registry.npm.taobao.org
- 安装
pic-core
:cnpm install picgo -g
- 安装插件
picgo-plugin-gitee-uploader
:picgo install gitee-uploader
picgo-core配置文件
文中最后是用picgo的GUI配置的gitee图床,测试成功后打开配置文件的原文。可以copy部分段落到picgo-core命令行工具的配置文件~/.picgo/config.json
中去。
配置typora集成picgo-core
文件-偏好设置-图像-上传服务设定里面
选择自定义命令,输入类似/xxx/node-v12.16.3-linux-x64/bin/node /xxx/node-v12.16.3-linux-x64/bin/picgo upload
即可
附录,我个人的GUI生成的config.json
{
"uploaded": [ ],
"picBed": {
"current": "gitee",
"list": [
{
"name": "SM.MS图床",
"type": "smms",
"visible": false
},
{
"name": "腾讯云COS",
"type": "tcyun",
"visible": false
},
{
"name": "GitHub图床",
"type": "github",
"visible": false
},
{
"name": "七牛图床",
"type": "qiniu",
"visible": false
},
{
"name": "Imgur图床",
"type": "imgur",
"visible": false
},
{
"name": "阿里云OSS",
"type": "aliyun",
"visible": false
},
{
"name": "又拍云图床",
"type": "upyun",
"visible": false
},
{
"name": "gitee",
"type": "gitee",
"visible": true
}
],
"gitee": {
"branch": "master",
"customPath": "",
"customUrl": "",
"path": "xxxxxxxxxxxxxxx/",
"repo": "xxxxxx/xxxxxxx",
"token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
},
"settings": {
"shortKey": {
"picgo:upload": {
"enable": true,
"key": "CommandOrControl+Shift+P",
"name": "upload",
"label": "快捷上传"
}
},
"server": {
"port": 36677,
"host": "127.0.0.1",
"enable": true
},
"showUpdateTip": true,
"rename": true,
"autoStart": true,
"autoRename": false,
"uploadNotification": true,
"pasteStyle": "markdown"
},
"picgoPlugins": {
"picgo-plugin-gitee-uploader": true
},
"debug": true,
"PICGO_ENV": "GUI",
"needReload": false,
"picgo-plugin-gitee-uploader": {
"lastSync": "2020-05-18 01:14:50"
}
}
https://picgo.github.io/PicGo-Doc/zh/guide/config.html#picgo设置
https://picgo.github.io/PicGo-Core-Doc/zh/guide/commands.html#use
https://blog.csdn.net/qq_28540443/article/details/106167623