Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

XRSec/bitiful-typora-upload-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

29 Commits

Repository files navigation

Bitiful Typora 图片上传 命令行工具

show1

show2

安装与使用

  1. 发布版下载
bitiful # 需要配置文件
bitiful "/example/example.png"
bitiful "https://example.com/example.png"
bitiful /path/to/1.png /path/to/2.jpg # 支持多文件批量上传
  1. 开发构建
git clone https://github.com/XRSec/bitiful-typora-upload-cli.git
cd bitiful-typora-upload-cli
# 编辑 bitifulUrl 变量
CGO_ENABLED=0 go build -o bitiful
# mv bitiful /usr/local/bin
# cd .. && rm -rf bitiful-typora-upload-cli
  1. 打开 Typora,偏好设置 -> 图片 -> 上传图片 -> 自定义命令 -> /home/xxx/bitiful

配置文件

配置文件路径:~/Library/Application\ Support/bitiful.yml

配置文件示例

Endpoint: s3.bitiful.net
Region: cn-east-1
AccessKeyID: "xxxxxxxxxxx"
AccessKeySecret: "xxxxxxxxxxxxxxxx"
BucketName: "xxxxxxxxxx"
Path: "/xxxxxxxx/"

指定文件名(覆盖上传)

如需自定义上传后的文件名(如封面图),可用 -n 参数:

bitiful -n "20220903.jpg" https://example.com/20220903.jpg
bitiful -n Test.png /Users/xxx/xxx.png
  • 仅当指定 -n 时,才会用该名字覆盖同名文件。
  • 未指定 -n 时,自动生成唯一文件名,绝不覆盖。

多文件批量上传

直接在命令行追加多个文件或URL即可:

bitiful /path/to/1.png /path/to/2.jpg

日志与调试

-v 参数可显示详细日志,便于排查问题:

bitiful -v /path/to/1.png

功能进度

  • 本地文件上传
  • URL 上传
  • [?] ftp/smb/afs

About

Bitful Typora Upload Tools

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /