fix: preserve short release titles and cover source generation contracts
This commit is contained in:
@@ -30,7 +30,7 @@ def _item(src, kind, url, title, text="", author="", published="", extra=None):
|
||||
ex["tags"] = list(src.tags)
|
||||
t = _txt(title)
|
||||
body = _txt(text)
|
||||
if sum(ch.isalpha() for ch in t) < 12 and body:
|
||||
if body and (not t or getattr(src, "adapter", "").startswith("tg_")) and sum(ch.isalpha() for ch in t) < 12:
|
||||
cand = [ln for ln in body.splitlines() if sum(ch.isalpha() for ch in ln) >= 12]
|
||||
if cand:
|
||||
t = max(cand, key=len)[:140]
|
||||
|
||||
Reference in New Issue
Block a user