返回顶部
x

x-to-kindle推特推送到Kindle

Send X/Twitter posts to Kindle for distraction-free reading. Use when user shares an X/Twitter link and wants to read it on Kindle, or asks to send a tweet/thread to their Kindle device.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.1
安全检测
已通过
1,304
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

x-to-kindle

X to Kindle

将X/Twitter帖子通过电子邮件转换为Kindle可阅读的文档。

前提条件

  • - 拥有应用专用密码的Gmail账户(或其他SMTP设置)
  • Kindle电子邮件地址(可在亚马逊账户设置中找到)

工作流程

当用户分享X链接时:

  1. 1. 通过fxtwitter API提取内容:

https://api.fxtwitter.com/status/<推文ID>

从URL中提取:twitter.com//status/ 或 x.com//status/

  1. 2. 格式化为HTML文件(保存至/tmp):
html {标题}

@{作者昵称}

{推文内容}

{时间戳}

在X上查看

  1. 3. 通过SMTP发送HTML附件(Kindle需要附件,而非内嵌HTML):
python from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.base import MIMEBase from email import encoders

msg = MIMEMultipart()
msg[Subject] = 来自@handle的推文
msg[From] = 发件邮箱
msg[To] = kindle邮箱

# 纯文本正文(非内容)
msg.attach(MIMEText(附件为文章。, plain))

# HTML文件作为附件 - 此为必需
with open(/tmp/article.html, rb) as f:
attachment = MIMEBase(text, html)
attachment.set_payload(f.read())
encoders.encode_base64(attachment)
attachment.add_header(Content-Disposition, attachment, filename=article.html)
msg.attach(attachment)

工具

  • - sendtokindle:将本地文件发送至配置的Kindle邮箱。

配置

在Clawdbot配置(或.env文件)中设置以下环境变量:

  • - SMTPEMAIL:您的发件邮箱(例如gmail)
  • SMTPPASSWORD:您的应用专用密码
  • KINDLEEMAIL:您的Kindle邮箱地址
  • SMTPSERVER:(可选)默认值:smtp.gmail.com
  • SMTP_PORT:(可选)默认值:587

工具定义

sendtokindle

将本地文件(PDF、HTML、TXT)发送至Kindle。
  • - 运行: python3 skills/x-to-kindle/sendtokindle.py <文件路径>

配置

存储于TOOLS.md中:
markdown

Kindle


  • - 地址:user@kindle.com

邮箱(Gmail SMTP)

  • - 发件人:your@gmail.com
  • 应用专用密码:xxxx xxxx xxxx xxxx
  • 主机:smtp.gmail.com
  • 端口:587

示例

用户发送:https://x.com/elonmusk/status/1234567890

  1. 1. 获取 https://api.fxtwitter.com/status/1234567890
  2. 提取作者、文本、时间戳
  3. 发送HTML邮件至Kindle地址
  4. 确认:已发送至Kindle 📚

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 x-to-kindle-1776348737 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 x-to-kindle-1776348737 技能

通过命令行安装

skillhub install x-to-kindle-1776348737

下载

⬇ 下载 x-to-kindle v0.1.1(免费)

文件大小: 3.26 KB | 发布时间: 2026-4-17 14:05

v0.1.1 最新 2026-4-17 14:05
x-to-kindle 0.1.1 Changelog

- Initial release: Send X/Twitter posts and threads to Kindle devices for distraction-free reading.
- Fetches tweet content via fxtwitter API and formats as Kindle-compatible HTML attachment.
- Supports sending via Gmail SMTP with configurable variables for ease of setup.
- Includes example workflow and configuration instructions for rapid deployment.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部