---
name: ellmos-ai/tageszeitung
source: https://app.decimal.ai/s/ellmos-ai-tageszeitung@1/SKILL.md
source_sha256: 7f69096052bf
---

<img src="banner.png" width="100%" alt="tageszeitung banner">

> **Deutsch** — Offizielle Deutsch-Version / Documento Oficial en Deutsch.


## Übersicht & Zweck

Fetch articles from configured RSS feeds and web sources, sort them by category
and render them as an HTML/PDF daily newspaper. Articles are stored locally in
`tageszeitung/store.db` and marked as read.

---

## Triggers

| Phrase | Action |
|---|---|
| "Create my daily newspaper" | Fetch articles + render PDF |
| "Daily newspaper for today" | Render today's newspaper |
| "Add feed [URL]" | Register RSS source |
| "Show my sources" | Output source list |
| "Fetch news" | Fetch all sources (no render) |

---

## Workflow & Vorgehen

1. **Check sources**: Read all active sources from `news_sources`.
2. **Fetch**: RSS via feedparser (or xml.etree fallback), web via urllib.
3. **Deduplication**: UNIQUE(source_id, url) prevents duplicates.
4. **Render**: Group unread articles by category → HTML → PDF.
5. **Deliver**: Place HTML/PDF in output folder (configurable path).

---

## CLI Entry Point

```bash
# Add source (Deutsch)
python tageszeitung_core.py add-source "Heise" rss https://www.heise.de/rss/heise-atom.xml --category tech

# Fetch all sources (Deutsch)
python tageszeitung_core.py fetch

# Render daily newspaper (HTML + PDF if Edge available) (Deutsch)
python tageszeitung_core.py render [--date 2026-06-22] [--out /path/]

# List sources (Deutsch)
python tageszeitung_core.py sources

# Unread articles (Deutsch)
python tageszeitung_core.py items [--limit 50] [--category tech]

# Mark article as read (Deutsch)
python tageszeitung_core.py read <item_id>

# Alternative store (e.g. for tests) (Deutsch)
python tageszeitung_core.py --store /tmp/t.db sources --dry-run
```

---

## Store

| Property | Value |
|---|---|
| Type | SQLite |
| Path (default) | `skills/assist/tageszeitung/store.db` |
| Override | `--store <path>` or env `TAGESZEITUNG_STORE` |
| Tables | `news_sources`, `news_items` |

### Schema (ported from BACH news.py)

```sql
CREATE TABLE IF NOT EXISTS news_sources (
    id           TEXT PRIMARY KEY,
    name         TEXT NOT NULL,
    type         TEXT NOT NULL DEFAULT 'rss',  -- rss | web
    url          TEXT NOT NULL UNIQUE,
    category     TEXT DEFAULT 'Allgemein',
    schedule     TEXT DEFAULT 'daily',
    is_active    INTEGER DEFAULT 1,
    last_fetched TEXT,
    fetch_count  INTEGER DEFAULT 0,
    error_count  INTEGER DEFAULT 0,
    last_error   TEXT,
    created_at   TEXT NOT NULL
);

CREATE TABLE IF NOT EXISTS news_items (
    id           TEXT PRIMARY KEY,
    source_id    TEXT NOT NULL REFERENCES news_sources(id),
    title        TEXT NOT NULL,
    content      TEXT,
    summary      TEXT,
    url          TEXT,
    author       TEXT,
    published_at TEXT,
    fetched_at   TEXT NOT NULL,
    is_read      INTEGER DEFAULT 0,
    category     TEXT,
    UNIQUE(source_id, url)
);
```

---

## Attitude

- feedparser is preferred; without feedparser an xml.etree fallback handles simple RSS 2.0 feeds.
- PDF generation requires `msedge.exe` in the system PATH or `MSEDGE_PATH` env. Without Edge only HTML is rendered.
- Maximum articles per category: configurable via `assist/prefs.json` (`tageszeitung_max_per_category`, default: 5).

---

## Privacy

- Article contents stay local in `store.db`.
- No external analysis services — only the configured RSS/web sources are called.

---

## Related Resources

- BACH `hub/news.py` — origin (read-only)
- BACH `hub/_services/newspaper/newspaper_generator.py` — origin (read-only)

---

## Änderungsprotokoll

| Version | Date | Change |
|---|---|---|
| 0.1.0 | 2026-06-22 | Initial creation — BACH schema ported, own store, feedparser optional |