TelePress
语言 / Language: 中文 · English
向 Telegraph 发布文本、图片与档案的 Python 库与 CLI。
TelePress 把 Markdown、纯文本、图片和富媒体内容发布为 Telegraph 页面, 不关心内容来自哪个平台。
- 纯文本 / Markdown:自动分页并生成上一页、下一页导航
- 图片 / ZIP 图集:压缩后发布为 Telegra.ph 相册
- 富媒体(REST):通过
/publish/rich-novel发布 Markdown + 本地图 - 图片可在「上传图床」与「通用 CDN 代理」两条路径间选择
安装
pip install telepress
# 可选:REST API 服务
pip install "telepress[api]"
# 可选:S3 / R2 / OSS / MinIO 等 S3 兼容图床
pip install "telepress[s3]"
# 可选:YAML 配置
pip install "telepress[yaml]"
30 秒快速开始
pip install telepress
telepress article.md --title "我的文章"
# 或者显式子命令
telepress publish article.md --title "我的文章"
发布图片 / ZIP 图集前先配置一个图床:
telepress configure
telepress check
telepress photo.jpg --title "照片"
telepress gallery.zip --title "图集"
需要服务化时:
pip install "telepress[api]"
telepress-server --host 127.0.0.1 --port 8000
# OpenAPI 交互文档:http://127.0.0.1:8000/docs
运行时首次使用会自动创建并保存 Telegraph token(默认 ~/.telegraph_token)。
文档
README 不是全量文档;稳定契约放在 docs/:
- 快速开始与配置:getting-started.md · configuration.md
- REST API:docs/api/README.md
- 图片与媒体:docs/media/README.md
- Python API / CLI:python-api.md · cli.md
- 架构:architecture/publishing-plane.md
- 运维与当前状态:operations/current-state.md
License
致谢
TelePress 建立在这些项目之上:
- Python-Markdown:Markdown 解析与扩展。
- Pillow:图集压缩。
- requests:HTTP 客户端。
- telegraph(python-telegram-bot 团队的 Telegraph 封装):Telegraph 页面发布。
- 可选 REST 发布层:FastAPI · Uvicorn。
接口与规范参考:Telegraph API。
Release files for telepress 0.15.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| telepress-0.15.0.tar.gz | 115.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| telepress-0.15.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 165.3 kB
Release files / telepress-0.15.0.tar.gz
| Download URL | telepress-0.15.0.tar.gz |
|---|---|
| Size | 115.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0529ace862ba4286a0f5187f9336cf8a6ec436f7254c420babdc2ecb7e98c68b
|
|
BLAKE2b-256 checksum How to use checksums |
2e379b659a9977194682eb27f26a36759a6699905d559a29e9e8a3cec8e74255
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / telepress-0.15.0-py3-none-any.whl
| Download URL | telepress-0.15.0-py3-none-any.whl |
|---|---|
| Size | 50.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
210c67bfa433e16b5f0b9b4b876cd477cafeab57c978142e6d83545d55af5dda
|
|
BLAKE2b-256 checksum How to use checksums |
4d29f1797664b06017527085a54b419f60152112f2ec80dd98feaab49f8dfc5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency log