Skip to content

为typecho增加api支持;一键从typora发布到typecho

Notifications You must be signed in to change notification settings

lwabish/typecho-api

Repository files navigation

Typecho-api

Go Report Card

  • 提供http api,直接对接操作typecho数据库
  • 基于typora的自定义导出功能,实现从typora一键发布到typecho

Roadmap

basic

further

  • 插件化【高优先级】,为其他各类修改文章的功能提供框架和接口设计
  • 文章字数更新
  • 其他高级功能
    • 自动添加TOC
    • 自动添加文章摘要(调用AI服务生成)
    • 自动添加文章封面(调用AI服务生成)
    • 自动拼写检查(调用AI服务实现)
    • 自动添加文末原文链接,防采集
    • 统一文章中所有英文的风格,比如自动将首字母大写
    • 基于LLM,实现文字语气的统一
    • 统一句号
    • 鉴权

Usage

  -h string
    	database host (default "localhost")
  -n string
    	database name (default "typecho")
  -p int
    	database port (default 3306)
  -pd string
    	database password (default "root")
  -t string
    	database type <mysql> (default "mysql")
  -u string
    	database user (default "root")

Use-with-typora[WIP]

目前client目录中的typora exporter仅用作开发阶段测试,未来考虑把typora exporter独立到单独的仓库维护

文档

接口文档

新建文章

curl --location --request PUT 'http://localhost:8080/contents' \
--header 'Content-Type: application/json' \
--data '{
    "content": {
        "title": "title",
        "slug": "slug-1709260916102",
        "text": "content"
    },
    "meta": {
        "categories": ["计算机", "其他", "7CWZo"],
        "tags": ["a","b","7CWZo"]
    }
}'

更新文章

curl --location --request PUT 'http://localhost:8080/contents' \
--header 'Content-Type: application/json' \
--data '{
    "content": {
        "cid": 302,
        "title": "title",
        "slug": "slug",
        "text": "content1111111"
    }
}'

About

为typecho增加api支持;一键从typora发布到typecho

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published