brew安装mark-text和picgo-core并配置

本文涉及的产品
对象存储 OSS,20GB 3个月
对象存储 OSS,内容安全 1000次 1年
对象存储 OSS,恶意文件检测 1000次 1年
简介: brew安装mark-text和picgo-core并配置

在缺乏教养的人身上,勇敢就会成为粗暴,学识就会成为迂腐,机智就会成为逗趣,质朴就会成为粗鲁,温厚就会成为谄媚。——洛克

执行

achaodeMacBook-Pro:~ achao$ brew install --cask mark-text
==> Caveats
The Apple Silicon (arm) version of mark-text is not signed, and
will display an error stating it is damaged and can't be opened.
==> Downloading https://github.com/marktext/marktext/releases/download/v0.17.1/m
==> Downloading from https://objects.githubusercontent.com/github-production-rel
######################################################################### 100.0%
==> Installing Cask mark-text
==> Moving App 'MarkText.app' to '/Applications/MarkText.app'
  mark-text was successfully installed!

此时我们直接运行是打不开的,提示移到废纸篓或者取消,这是因为上面提示过了The Apple Silicon (arm) version of mark-text is not signed

执行:

xattr -cr /Applications/MarkText.app

即可打开

然后是picgo-core

GitHub - PicGo/PicGo-Core: ⚡A tool for pictures uploading. Both CLI & API supports.

此处用到的是阿里云oss,准备近期换掉,因为老是刷到被ddos攻击导致oss欠费大笔损失

https://zhuanlan.zhihu.com/p/411600294

阿里云oss的官方文档也只是提到了设置为私有Bucket访问或者接入WAF 3.0

如何避免OSS被盗刷_对象存储-阿里云帮助中心

但临时还用用,使用npm安装picgo-core

achaodeMacBook-Pro:~ achao$ npm install picgo -g
npm WARN deprecated @types/bson@4.2.0: This is a stub types definition. bson provides its own type definitions, so you do not need this installed.
added 339 packages in 47s
26 packages are looking for funding
  run `npm fund` for details
npm notice 
npm notice New minor version of npm available! 9.5.1 -> 9.7.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.7.2
npm notice Run npm install -g npm@9.7.2 to update!
npm notice 
achaodeMacBook-Pro:~ achao$ picgo u
[PicGo INFO]: Before transform
[PicGo INFO]: Transforming... Current transformer is [path]
[PicGo INFO]: Before upload
[PicGo INFO]: Uploading... Current uploader is [smms]
[PicGo WARN]: failed
[PicGo ERROR]: Error: Can not find smms config!
    at Object.We [as handle] (/Users/achao/.nvm/versions/node/v18.16.1/lib/node_modules/picgo/dist/index.cjs.js:1:20788)
    at je.doUpload (/Users/achao/.nvm/versions/node/v18.16.1/lib/node_modules/picgo/dist/index.cjs.js:1:19770)
    at je.start (/Users/achao/.nvm/versions/node/v18.16.1/lib/node_modules/picgo/dist/index.cjs.js:1:18529)
    at async $t.upload (/Users/achao/.nvm/versions/node/v18.16.1/lib/node_modules/picgo/dist/index.cjs.js:1:73022)
    at async /Users/achao/.nvm/versions/node/v18.16.1/lib/node_modules/picgo/dist/index.cjs.js:1:5730

这里用picgo u上传佳尼特版第一张图片失败,因为我们没配置

按照文档:配置文件 | PicGo-Core

设置图床,并使用picgo u上传

achaodeMacBook-Pro:~ achao$ picgo set uploader
? Choose a(n) uploader aliyun
? accessKeyId: [hidden]
? accessKeySecret: [hidden]
? bucket: waibi
设定存储区域 例如:oss-cn-beijing oss-cn-chengdu
设定存储路径 例如:test/ picGo/
设定自定义域名 例如:https://test.com 
设定网址后缀 例如:?x-oss-process=xxx 
[PicGo SUCCESS]: Configure config successfully!
achaodeMacBook-Pro:~ achao$ 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]: 
/imgs/oss/picGo/xxx.png

成功返回路径

相关实践学习
借助OSS搭建在线教育视频课程分享网站
本教程介绍如何基于云服务器ECS和对象存储OSS,搭建一个在线教育视频课程分享网站。
目录
打赏
0
0
1
0
29
分享
相关文章
|
3月前
|
node环境之Error: Cannot find module ‘chalk’ 报错无法解决的问题—-网上说让你npm install chalk 基本是没有用的-优雅草央千澈解决方案
node环境之Error: Cannot find module ‘chalk’ 报错无法解决的问题—-网上说让你npm install chalk 基本是没有用的-优雅草央千澈解决方案
154 13
node环境之Error: Cannot find module ‘chalk’ 报错无法解决的问题—-网上说让你npm install chalk 基本是没有用的-优雅草央千澈解决方案
Typora图床配置(用自带的 PicGo-Core(command line) 插件GitHub
Typora图床配置(用自带的 PicGo-Core(command line) 插件GitHub
9-14|npm install --global windows-build-tools 安装太慢了,能够指定国内源
9-14|npm install --global windows-build-tools 安装太慢了,能够指定国内源
|
10月前
Sublime Text3安装插件报错:There are no packages available for installation
Sublime Text3安装插件报错:There are no packages available for installation
118 0
Pycharm中VCS找不到check out from Version Control选项原因及绑定用户github
Pycharm中VCS找不到check out from Version Control选项原因及绑定用户github
813 0
Pycharm中VCS找不到check out from Version Control选项原因及绑定用户github
Mac电脑npm:Failed to download repo vuejs-templates/webpack: tunneling socket could not be established,
Mac电脑npm:Failed to download repo vuejs-templates/webpack: tunneling socket could not be established,
145 0
有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?
有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?
4133 0
 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等