# PicGo(图床)安装使用全攻略

PicGo(图床)安装使用全攻略

绝佳的图床工具PicGo

官网:https://github.com/PicGo/PicGo-Core
插件:https://github.com/PicGo/Awesome-PicGo
图形客户端:https://github.com/Molunerfinn/PicGo/releases

1 准备 - 注册图床(选其一即可)

有很多选择,比如:smms 、tcyun 、github 、qiniu 、imgur 、aliyun 、upyun、gitee等等,通可以通过客户端查看支持哪些图床

smms

注册账号:https://sm.ms/register
生成token备用

gitee

注册账号:https://gitee.com/
新建一个项目仓库
生成token备用(仅给projects权限)

2 安装使用 - 命令行客户端

使用简单,逼格高

2.1 安装node

$ sudo apt install nodejs

2.2 安装npm

$ sudo apt install npm

2.3 安装picgo

$ npm install picgo -g  或 npm install picgo

2.4 安装picgo插件

官方有很多超棒的插件,请自行选择:https://github.com/PicGo/Awesome-PicGo
这里安装gitee(码云)插件,及命令行下自动拷贝链接插件

$ picgo install  picgo-plugin-gitee-uploader  #---需在当前用户下安装
$ picgo install  picgo-plugin-autocopy        #---自动拷贝链接

2.5 获取图床token

前面准备工作,可根据需要可以设置一个图床或多个图床
这里设置smms及gitee为例

2.6 设置图床服务器

# 设置smms
$ picgo set uploader
? Choose a(n) uploader smms
? api token xxxxxxxxxxxxxxx你的token
[PicGo SUCCESS]: Configure config successfully!

# 设置gitee
$ picgo set uploader
? Choose a(n) uploader gitee
? repo: yyyy/xxxx(gitee用户名/仓库名)
? branch: master
? token: xxxxxxxxxxxxxxx你的token
? path: img
? customPath: 年
? customUrl: 
[PicGo SUCCESS]: Configure config successfully!

2.7 设置默认图床服务器

# 根据提示选择(smms)
$ picgo use 
? Use an uploader smms
? Use a transformer path
? Use plugins (Press <space> to select, <a> to toggle all, <i> to invert selection)picgo-plugin-gitee-uploader
[PicGo SUCCESS]: Configure config successfully!

# 根据提示选择(gitee)
$ picgo use
? Use an uploader gitee
? Use a transformer path
? Use plugins picgo-plugin-autocopy, picgo-plugin-gitee-uploader
[PicGo SUCCESS]: Configure config successfully!

配置文件路径:~/.picgo/config.json

2.8 命令行上传图片

$ picgo upload  图片.jpg

image-20210503215424981

2.9 命令行帮助

$ picgo --help
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
  -p, --proxy <url>                    set proxy for uploading
  -h, --help                           output usage information

Commands:
  install|add [options] <plugins...>   install picgo plugin
  uninstall|rm <plugins...>            uninstall picgo plugin
  update [options] <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

可能会用到的选项:

-s, --silent
-p, --proxy
-c, --config

3 安装使用 - 图形客户端

安装简单,使用简单
https://github.com/Molunerfinn/PicGo/releases下载安装客户端
安装配置请参考https://www.bilibili.com/read/cv10288009/
配置文件路径:~/.config/picgo/data.json

如图:
image-20210503215122098
image-20210503215257922

4 安装使用 - Typora自动上传

使用简单、方便
安装优秀的markdown编辑器:Typora(自行百度)
他需要上面的【命令行客户端或者图形客户端】支持,安装配置请参考https://www.yht7.com/news/114454

如图:
image-20210503214953740
最后

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值