MacOS set MarkText and PicGo

文章详细描述了如何在MacOS操作系统中设置和使用PicGo这款工具,包括安装、配置阿里云作为图片上传的存储器,以及创建和使用上传脚本picgo_upload.sh。同时,提到了解决MarkText提示缺少PicGo安装的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

MacOS set MarkText and PicGo



192:~ xxx$ picgo -h
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                           display help for command

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
  i18n [lang]                          change picgo language
  help [command]                       display help for command
192:~ xxx$ picgo set uploader
? Choose a(n) uploader aliyun
? accessKeyId: xxxxxxxxxxx
? accessKeySecret: [hidden]
? bucket: image-zxl
设定存储区域 例如:oss-cn-beijing oss-cn-hangzhou
设定存储路径 例如:test/ pico/imgs/
设定自定义域名 例如:https://test.com https://ixxxx.oss-cn-hangzhou.aliyuncs设定网址后缀 例如:?x-oss-process=xxx 
[PicGo SUCCESS]: Configure config successfully!
[PicGo INFO]: If you want to use this config, please run 'picgo use uploader'

192:~ xxx$ pic use uploader
pic:fatal error: can't open `use': No such file or directory
192:~ xxx$ picgo use uploader
? Use an uploader aliyun
[PicGo SUCCESS]: Configure config successfully!


192:~ xxx$ picgo u 
[PicGo INFO]: Before transform
[PicGo INFO]: Transforming... Current transformer is [path]
[PicGo INFO]: Before upload
[PicGo INFO]: Uploading... Current uploader is [aliyun]
[PicGo SUCCESS]: 
https://xxxl.oss-cn-hangzhou.aliyuncs.com/pxxx0225204856.png
192:~ xxx$ 

192:~ xxx$ cat picgo_upload.sh 
#!/bin/bash
#source /etc/profile
#picgo u
#!/bin/bashsource/etc/profileexportLANG="en_US.UTF-8"img="$(~/.npm-global/bin/picgo u$1)"echo$img|awk'{print $NF}'

#picgo u $1


source /etc/profile
export LANG="en_US.UTF-8" 
img="$(picgo u $1)"
echo $img | awk '{print $NF}' 

picshell

Ref:

MarkText提示“your system does not have picgo installed”解决办法

第五步:准备一个sh脚本,比如我的picgo_upload.sh,并给执行权限,如chmod 755 picgo_upload.sh

#!/bin/bashsource/etc/profileexportLANG=“en_US.UTF-8"img=”$(~/.npm-global/bin/picgo u 1 ) " e c h o 1)"echo 1)"echoimg|awk’{print $NF}’

作者:阿广本尊
链接:https://www.jianshu.com/p/e44d288d5020
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值