Github: https://github.com/Brx86/AyaMark
Demo: https://mark.aya1.pro
示例:
- 上传uname命令的标准输出
❯ uname -a | curl -sF "c=@-" "https://mark.aya1.pro/f"
- 上传文件main.py
❯ curl -sF "c=@-" "https://mark.aya1.pro/f" < main.py
- 上传图片 ~/Pictures/aya4.jpg
❯ curl -sF "c=@-" "https://mark.aya1.pro/f" < ~/Pictures/aya4.jpg
返回值示例:
{
"code": 0,
"message": "上传成功!",
"url": "https://mark.aya1.pro/f/ZuMj",
"short": "ZuMj"
}
如:https://mark.aya1.pro/f/main/info
如:https://mark.aya1.pro/f/main.py
如:https://mark.aya1.pro/f/main/py
使用参数 style=xxx
可以更换指定主题
如:https://mark.aya1.pro/f/main/py?style=nord-darker
可用主题:main default emacs friendly friendly_grayscale colorful autumn murphy manni material monokai perldoc pastie borland trac native fruity bw vim vs tango rrt xcode igor paraiso-light paraiso-dark lovelace algol algol_nu arduino rainbow_dash abap solarized-dark solarized-light sas staroffice stata stata-light stata-dark inkpot zenburn gruvbox-dark gruvbox-light dracula one-dark lilypond nord nord-darker github-dark
如 .zshrc
里可以这样写:
# 简单alias
alias clip='curl -sF "c=@-" "https://mark.aya1.pro/f"'
# 写成函数,直接使用jq解析返回url并输出
clip2(){curl -sF "c=@-" "https://mark.aya1.pro/f"|jq -r ".url"}
使用时:
fcitx5-diagnose | clip2
clip2 < /etc/pacman.conf