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:略,看官网
  • 下载安装picgohttps://github.com/Molunerfinn/PicGo 去release里面下
  • 运行picgo,配置gitee图床,参见https://blog.csdn.net/qq_28540443/article/details/106167623
  • 配置好以后,可以点击打开文件:PicGo设置-打开配置文件

安装picgo-core,给typora用

  • 安装node:略,下载二进制解压即可
  • 配置cnpmnpm install -g cnpm --registry=https://registry.npm.taobao.org
  • 安装pic-corecnpm install picgo -g
  • 安装插件picgo-plugin-gitee-uploaderpicgo 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

posted @ 2020-05-18 14:56  大树的博客  Views(1475)  Comments(2Edit  收藏  举报