greader2kindle: Send RSS Articles from GReader to Your Kindle

Automate GReader to Kindle with greader2kindle — Step-by-Stepgreader2kindle is a small tool that helps you send read-it-later or RSS content from GReader-like sources to your Kindle as nicely formatted eBooks or documents. This guide walks through a complete, practical automation setup so you can receive daily digests on your Kindle without manual copying and pasting.


What you’ll achieve

By the end of this guide you will have:

  • An automated pipeline that fetches articles from GReader-style RSS/JSON sources.
  • Content processed and cleaned for readability (HTML cleaning, images handling, basic CSS).
  • Compiled eBook or MOBI/EPUB files compatible with Kindle.
  • Automatic delivery to your Kindle via its Send-to-Kindle email address or via other delivery methods (Calibre, Kindle personal documents service).

Requirements

  • A computer or server that can run scripts (Linux, macOS, or Windows).
  • Python 3.8+ installed.
  • Access to your GReader API or an RSS/Atom feed export. If you’re using another RSS reader, ensure it exposes feeds or an export (e.g., OPML, JSON).
  • A Kindle device or Kindle app with a Send-to-Kindle email address.
  • Optional: Calibre (for advanced conversion and delivery), Git (for installing greader2kindle if from source).

Overview of steps

  1. Obtain feed access (GReader or RSS).
  2. Install greader2kindle and dependencies.
  3. Configure feed selection, templates, and frequency.
  4. Fetch, clean, and convert articles into an eBook or document.
  5. Deliver to Kindle automatically.
  6. Schedule the automation (cron, systemd timer, or Windows Task Scheduler).

Step 1 — Obtain feed access

If using a GReader-compatible service, get the feed URL(s) or connect via its API. Common options:

  • Public RSS/Atom feed URL for a specific folder/tag.
  • Export OPML and select feeds you want.
  • Some readers provide JSON APIs — greader2kindle can be adapted to parse JSON.

Make a list of the feed URLs you want in your Kindle digest.


Step 2 — Install greader2kindle and dependencies

Install Python 3.8+ and pip. Then create a virtual environment:

python3 -m venv g2k-env source g2k-env/bin/activate 

Install greader2kindle (if available on PyPI) or clone from its repository:

pip install greader2kindle # or git clone https://example.com/greader2kindle.git cd greader2kindle pip install -r requirements.txt python setup.py install 

Common dependencies you may need: requests, feedparser, beautifulsoup4, ebooklib, html5lib, weasyprint or calibre’s ebook-convert.


Step 3 — Configure feeds, templates, and metadata

Create a configuration file (YAML or JSON). Example YAML:

feeds:   - title: "Tech News"     url: "https://example.com/tech/rss"   - title: "My GReader Starred"     url: "https://greader.example/api/starred.json" max_articles: 50 include_images: true template: "templates/kindle_template.html" output_format: "mobi" # or epub send_to_kindle: true kindle_email: "[email protected]" from_email: "[email protected]" smtp:   host: "smtp.example.com"   port: 587   username: "[email protected]"   password: "app-password" 

Template tips:

  • Keep a clean CSS for readable fonts and spacing.
  • Use a simple header with date and feed titles.
  • Inline critical CSS; Kindle rendering can be inconsistent with external stylesheets.

Step 4 — Fetch and clean articles

Core tasks:

  • Use feedparser or requests to fetch entries.
  • Deduplicate by GUID/link.
  • Clean HTML with BeautifulSoup: remove scripts, trackers, banner ads; convert relative links to absolute; optionally strip inline styles.
  • Optionally summarize or truncate long articles (e.g., keep first N words or use readability algorithms like Readability or Mercury Parser).

Example Python snippet to fetch and clean:

import feedparser from bs4 import BeautifulSoup import requests from urllib.parse import urljoin def fetch_feed(url):     return feedparser.parse(url) def clean_html(content, base_url):     soup = BeautifulSoup(content, "html.parser")     for tag in soup(["script", "style", "iframe", "noscript", "form", "header", "footer", "aside", "nav"]):         tag.decompose()     for img in soup.find_all("img"):         if img.get("src"):             img["src"] = urljoin(base_url, img["src"])     return str(soup) 

Step 5 — Convert to Kindle-friendly format

Options:

  • Use ebooklib or WeasyPrint to assemble HTML files into EPUB, then convert to MOBI/AZW3 with Calibre’s ebook-convert (recommended for best Kindle compatibility).
  • Or use KindleGen (deprecated) if you have older workflows.

Basic workflow:

  1. Create an EPUB from templated HTML files (one per article or a single combined HTML).
  2. Run ebook-convert to produce MOBI/AZW3:
ebook-convert digest.epub digest.mobi --output-profile=kindle 

Conversion tips:

  • Test with a few articles first.
  • Use –output-profile=kindle or kindle_pw for best results.
  • Embed fonts sparingly; Kindle handles a few system fonts better.

Step 6 — Deliver to Kindle

Simplest: email the converted file to your Kindle’s Send-to-Kindle address. Use SMTP with your configured from_email (must be an authorized sender in Amazon settings).

Python example using smtplib:

import smtplib from email.message import EmailMessage def send_to_kindle(smtp_conf, from_addr, to_addr, file_path):     msg = EmailMessage()     msg["From"] = from_addr     msg["To"] = to_addr     msg["Subject"] = "GReader Digest"     msg.set_content("Attached is your daily digest.")     with open(file_path, "rb") as f:         data = f.read()     msg.add_attachment(data, maintype="application", subtype="octet-stream", filename=file_path)     with smtplib.SMTP(smtp_conf["host"], smtp_conf["port"]) as s:         s.starttls()         s.login(smtp_conf["username"], smtp_conf["password"])         s.send_message(msg) 

Alternative deliveries:

  • Calibre’s content server + Kindle over USB.
  • Use Amazon’s Personal Documents Service with approved email only.

Step 7 — Schedule the job

Linux/macOS: use cron or systemd timer. Example cron (daily at 7 AM):

0 7 * * * /path/to/g2k-env/bin/python /path/to/greader2kindle/run.py >> /var/log/g2k.log 2>&1 

Windows: Task Scheduler to run the Python script on a schedule.

Include logging and error notifications (email or a webhook) for reliability.


Troubleshooting & tips

  • If images fail to appear, ensure remote image links are absolute and not blocked by hotlink protection. Consider embedding small images as data URIs.
  • For long feeds, implement pagination and a max-articles cap.
  • Use a unique identifier (feed+GUID) to avoid duplicate deliveries.
  • Test with your Kindle email using small sample files before full runs.

Security & privacy

  • Keep your SMTP credentials and Kindle email private. Use app-specific passwords where possible.
  • If processing personal or sensitive articles, consider running the pipeline on a local machine or trusted VPS.

Example project structure

greader2kindle/ ├─ config.yml ├─ templates/ │  └─ kindle_template.html ├─ scripts/ │  └─ fetch_and_build.py ├─ output/ │  └─ digest-2025-08-29.epub └─ logs/    └─ run.log 

Final notes

Once set up, greader2kindle can save time and turn your favorite feeds into a pleasant, offline reading experience on Kindle. Iterate on templates and conversion settings for the best typography and image handling for your device.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *