MacOS set MarkText and PicGo2023-02-25

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:~ xxxpic 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:~ xxxpicgo 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
</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="(~/.npm-global/bin/picgo u1)"echoimg|awk'{printNF}'

picgo u $1

source /etc/profile
export LANG="en_US.UTF-8"
img="(picgo u1)"
echo img | awk '{printNF}'
</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="(~/.npm-global/bin/picgo u1)"echoimg|awk'{printNF}'

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容