MacOS set MarkText and PicGo
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n7" mdtype="fences" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; background-color: rgb(51, 51, 51); padding: 10px 10px 10px 30px; width: inherit; caret-color: rgb(184, 191, 198); color: rgb(184, 191, 198); position: relative !important;">
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 picgo use uploader
? Use an uploader aliyun
[PicGo SUCCESS]: Configure config successfully!
192:~ xxx
</pre>
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n28" mdtype="fences" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; background-color: rgb(51, 51, 51); padding: 10px 10px 10px 30px; width: inherit; caret-color: rgb(184, 191, 198); color: rgb(184, 191, 198); position: relative !important;">192:~ xxx$ cat picgo_upload.sh
!/bin/bash
source /etc/profile
picgo u
!/bin/bashsource/etc/profileexportLANG="en_US.UTF-8"img="
1)"echo
NF}'
picgo u $1
source /etc/profile
export LANG="en_US.UTF-8"
img="1)"
echo NF}'
</pre>
[图片上传失败...(image-ff2e03-1677335896896)]
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="
1)"echo
NF}'
作者:阿广本尊 链接:https://www.jianshu.com/p/e44d288d5020 来源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。