From 1c6a20e7ead8a905ad14a39013d57fcb8dd5138c Mon Sep 17 00:00:00 2001 From: JOUNGWOOK KWON Date: Mon, 30 Mar 2026 12:54:45 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B8=94=EB=A1=9C=EA=B7=B8=20=EA=B8=80?= =?UTF-8?q?=20=ED=95=98=EB=8B=A8=EC=97=90=20=EC=9B=90=EB=AC=B8=20=EC=B6=9C?= =?UTF-8?q?=EC=B2=98=20=EB=A7=81=ED=81=AC=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 본문 끝에 출처 박스 추가 (배경색 + 좌측 보더) - sources 배열과 source_url 모두 표시 - 중복 URL 제거, 새 탭 열기(target=_blank) Co-Authored-By: Claude Opus 4.6 --- bots/publisher_bot.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/bots/publisher_bot.py b/bots/publisher_bot.py index 03c8146..117d39d 100644 --- a/bots/publisher_bot.py +++ b/bots/publisher_bot.py @@ -301,8 +301,32 @@ def build_full_html(article: dict, body_html: str, toc_html: str) -> str: if toc_html: html_parts.append(f'
{toc_html}
') html_parts.append(body_html) + + # 원문 출처 링크 + sources = article.get('sources', []) + source_url = article.get('source_url', '') + source_name = article.get('source_name', '') or article.get('source', '') + if sources or source_url: + html_parts.append('
') + html_parts.append('
') + html_parts.append('📌 원문 출처
') + seen = set() + if sources: + for src in sources: + url = src.get('url', '') + title = src.get('title', '') or url + if url and url not in seen: + seen.add(url) + html_parts.append(f'• {title}
') + if source_url and source_url not in seen: + label = source_name or source_url + html_parts.append(f'• {label}
') + html_parts.append('
') + if disclaimer: - html_parts.append(f'

{disclaimer}

') + html_parts.append(f'

{disclaimer}

') return '\n'.join(html_parts)