PicGo / flutter-picgo

🚀 A simple & beautiful mobile tool for pictures uploading built by flutter
MIT License
447 stars 30 forks source link

二维码扫描填充配置信息 #3

Closed hackycy closed 4 years ago

hackycy commented 4 years ago

@hackycy

@upupming

这个手动填写配置是不是有点麻烦,可不可以扫描二维码,类似于 ssr 和 v2ray 那种,感觉可能会比较方便~

二维码方式操作如何操作?虽然我也觉得麻烦,但是目前是跟PicGo的操作方式,就是换做在手机上比较麻烦,Github配置的填写也不少呀

我其实是想在PC和手机之间转换的话,会需要。如果只用手机端的话,应该不需要这个功能。

PicGo的配置就是 JSON 文件,可以使用类似Chrome插件Quick QR 来把 JSON 转成二维码,手机扫描一下就好。

Originally posted by @upupming in https://github.com/hackycy/flutter-picgo/issues/1#issuecomment-649229269

Molunerfinn commented 4 years ago

对此,picgo将会开发一个插件用于转换和显示配置二维码,这样flutter-picgo要导入配置信息就方便了

hackycy commented 4 years ago

@Molunerfinn

还需要考虑如何将配置转化成flutter-picgo格式的配置

而且PicGo还有灵活的插件化。应该只能把PicGo默认支持的图床配置来进行转化。

Molunerfinn commented 4 years ago

@Molunerfinn

还需要考虑如何将配置转化成flutter-picgo格式的配置

而且PicGo还有灵活的插件化。应该只能把PicGo默认支持的图床配置来进行转化。

转成flutter-picgo的格式这个应该是要flutter这边来自己做了,因为如果日后有别的app也能导入picgo的配置,那么picgo这边肯定是要导出原始的配置。

导出原始的配置,你需要哪些就从那堆JSON里提取即可,我理解就算有多余的信息也不影响,毕竟不是完全导入,flutter那边肯定也需要做一下提取字段

Molunerfinn commented 4 years ago

所以如果趁现在flutter配置不多的情况下可以做配置统一,日后就不用太麻烦。

picgo的插件一般都是在额外的字段里配置的,所以不太影响。重要的图床配置都在picBed下,所以导入应该不难

hackycy commented 4 years ago
{
  "uploaded": [],
  "picBed": {
    "current": "upyun",
    "smms": {
      "token": ""
     },
    "tcyun": {
      "appId": "asdasd",
      "area": "asdasd",
      "bucket": "asdasd",
      "customUrl": "asdsad",
      "path": "asdasd",
      "secretId": "asdasd",
      "secretKey": "asdasd",
      "version": "v4"
    },
    "github": {
      "branch": "asdasd",
      "customUrl": "asdasd",
      "path": "asdas",
      "repo": "asdasd",
      "token": "asdasd"
    },
    "upyun": {
      "bucket": "asdasd",
      "operator": "asdasd",
      "options": "asdas",
      "password": "asdasd",
      "path": "asdas",
      "url": "asdasd"
    },
    "gitee": {
      "message": "asdasd",
      "owner": "asdas",
      "path": "asdasd",
      "repo": "asdasd",
      "token": "asdasd"
    },
    "aliyun": {
      "accessKeyId": "asdasd",
      "accessKeySecret": "asdas",
      "area": "asdas",
      "bucket": "asdasd",
      "customUrl": "asdasd",
      "options": "asdasd",
      "path": "asdasd"
    },
    "imgur": {
      "clientId": "asdasd",
      "proxy": "asdasda"
    },
    "qiniu": {
      "accessKey": "asdasdasd",
      "area": "asdasd",
      "bucket": "asdasd",
      "options": "asdasdasd",
      "path": "asdasdas",
      "secretKey": "asdasd",
      "url": "asdasdasd"
    }
  },
  "settings": {
    "shortKey": {
      "picgo:upload": {
        "enable": true,
        "key": "CommandOrControl+Shift+P",
        "name": "upload",
        "label": "快捷上传"
      }
    },
    "server": {
      "port": 36678,
      "host": "127.0.0.1",
      "enable": true
    },
    "showUpdateTip": true,
    "miniWindowOntop": false
  },
  "picgoPlugins": {
    "picgo-plugin-gitee": true
  },
  "debug": true,
  "PICGO_ENV": "GUI",
  "needReload": false
}

picgo配置

Molunerfinn commented 4 years ago

这里面你只需要关注picBed下的就行了(只关心图床配置即可我理解),其他的其实用不到或者是flutter-picgo自己的配置就行。

比如 shortKey 这个是快捷键配置,手机上明显没有这个东西...

hackycy commented 4 years ago

@Molunerfinn 这个我了解的,主要是我拷贝出来我方便通过issues看

hackycy commented 4 years ago

@Molunerfinn 目前支持将picBed的配置直接转换成flutter-picgo的配置。 所需格式就是将picBed单独提取出来再转化成二维码即可。现在Flutter-PicGo支持的图床不多,以后同步支持PicGo的图床后也会同步支持转换配置。

Molunerfinn commented 4 years ago

赞效率,本体近期会在在beta版本上做一个配置导出二维码的功能