Glanote

API 文档

你可以通过 HTTP 发布和修改。下面是简短示例。请把 example.com 换成你的站点。

REST

curl -X POST https://example.com/api/articles \
  -H 'content-type: application/json' \
  -d '{"title":"Hello","content":"Markdown here"}'

返回里有 url、edit_url 和 edit_key。修改用 PUT /api/articles/:slug,删除用 DELETE,都需要 edit_key。

curl -X PUT https://example.com/api/articles/your-slug \
  -H 'content-type: application/json' \
  -d '{"edit_key":"YOUR_KEY","title":"Hello","content":"Updated text"}'

CLI

curl -X POST -d 'text=Hello' https://example.com/api/new
cat file.md | curl -F 'text=<-' https://example.com/api/new

?format=json

Telegraph 兼容子集

把现有脚本指到 /telegraph。已支持 createAccount、createPage、editPage、getPage、getPageList、getAccountInfo。这不是官方接口的完整复制。

Telegram 机器人

发送标题、一行 ---,然后是正文。若开启了图片上传,也可以发照片。

浏览器插件

在 Chrome 或 Edge 加载未打包的 extension/ 目录,填入站点地址即可。