✨ 8 major features: trafilatura, digest, ntfy actions, templates, FTS5 search, backup/restore, proxy, RSS reader
build-and-push / docker (push) Has been cancelled
build-and-push / docker (push) Has been cancelled
- Full article extraction via trafilatura (fetch_full_article)
- Digest mode with configurable period (digest_enabled, digest_period_hours)
- ntfy Actions buttons (Open article, Open feed)
- Notification templates with {title}, {body}, {link}, {source}, {image_url}
- FTS5 full-text search in notification history
- Database backup/restore (download/upload .db)
- HTTP/SOCKS proxy for RSS feed fetching (proxy_url setting)
- Built-in RSS reader tab with categories, unread counts, article detail view
- Auto-category 'Общее' for feeds without a category
- Article storage (Article table) for reader
- DigestEntry model for pending digest entries
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+13
@@ -36,6 +36,8 @@ async def publish(
|
||||
token: str = "",
|
||||
username: str = "",
|
||||
password: str = "",
|
||||
markdown: bool = False,
|
||||
actions: list[dict] | None = None,
|
||||
) -> None:
|
||||
"""Send one notification to ntfy. Raises httpx.HTTPStatusError on failure.
|
||||
|
||||
@@ -69,6 +71,17 @@ async def publish(
|
||||
headers["Attach"] = attach
|
||||
except UnicodeEncodeError:
|
||||
pass
|
||||
if markdown:
|
||||
headers["Content-Type"] = "text/markdown"
|
||||
if actions:
|
||||
parts = []
|
||||
for a in actions:
|
||||
act = a.get("action", "view")
|
||||
label = a.get("label", "")
|
||||
url = a.get("url", "")
|
||||
clear = ", clear=true" if a.get("clear") else ""
|
||||
parts.append(f"{act}, {label}, {url}{clear}")
|
||||
headers["Actions"] = "; ".join(parts)
|
||||
|
||||
async with httpx.AsyncClient(timeout=20) as client:
|
||||
resp = await client.post(url, content=message.encode("utf-8"), headers=headers)
|
||||
|
||||
Reference in New Issue
Block a user