From c65d279a35ba95c32a41a7097fa56fb4f5977090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EA=B2=BD=EB=AF=BC?= Date: Thu, 19 Mar 2026 09:16:54 +0900 Subject: [PATCH] Upload handlers/briefing/processor.py --- .../업로드용/handlers/briefing/processor.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 03.Code/업로드용/handlers/briefing/processor.py diff --git a/03.Code/업로드용/handlers/briefing/processor.py b/03.Code/업로드용/handlers/briefing/processor.py new file mode 100644 index 0000000..594efef --- /dev/null +++ b/03.Code/업로드용/handlers/briefing/processor.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +""" +브리핑(briefing) 처리 로직 +- 1~2매 요약 보고서 +- Navy 스타일 템플릿 +""" + +import json +from pathlib import Path +from ..common import call_claude, extract_json, extract_html, load_prompt + +class BriefingProcessor: + def __init__(self): + self.prompts_dir = Path(__file__).parent / 'prompts' + + def _load_prompt(self, filename: str) -> str: + """프롬프트 로드""" + return load_prompt(str(self.prompts_dir), filename) + + def _get_step1_prompt(self) -> str: + """1단계: 구조 추출 프롬프트""" + prompt = self._load_prompt('step1_extract.txt') + if prompt: + return prompt + return """HTML 문서를 분석하여 JSON 구조로 추출하세요.""" + + def generate(self, content: str, options: dict) -> dict: + """브리핑 생성""" + # 상세 생성 로직 구현 + return {"success": True, "html": "Briefing"}