fix+docs: classifier/publisher правки, sources.yaml расширен, глоссарий CONTEXT.md + docs/agents, backup.sh; openspec post-translate/rewrite-as-author/rich-repost-card/selected-layout-stay

This commit is contained in:
kpa39l
2026-09-22 17:39:23 +00:00
parent a10ab9fa3c
commit c8ccd7e187
8 changed files with 302 additions and 94 deletions
+7 -2
View File
@@ -25,7 +25,9 @@ def make_card(post: dict, comment: str | None = None) -> dict:
это был «агрегаторный» вид карточки.
"""
comment = (comment or "").strip()
body = (post.get("text") or "").strip()
# тело: пересказ (rewritten_text) приоритетнее исходного текста
body = (post.get("rewritten_text") or post.get("text") or "").strip()
rewritten = bool((post.get("rewritten_text") or "").strip())
# ссылка на оригинал / атрибуция своего контента
is_own = int(post.get("is_own") or 0) == 1
@@ -34,7 +36,10 @@ def make_card(post: dict, comment: str | None = None) -> dict:
orig = f"https://t.me/dedinit/{post['tg_post_id']}"
elif post.get("url"):
orig = post.get("url")
if is_own:
if rewritten:
# пересказ — публикация от имени автора канала (не пересылка)
tail = "✍️ Дед в АйТи (@dedinit)" + (f" · Источник: {orig}" if orig else "")
elif is_own:
tail = "✍️ Дед в АйТи (@dedinit)" + (f" · {orig}" if orig else "")
elif orig:
tail = f"🔗 Оригинал: {orig}"