From 4bc9f82ee7ca7490f7dcf049c104fd6f5b09eb7d Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 19 Jun 2026 17:37:28 +0000 Subject: [PATCH] Test and validate all new modules on dev - Confirmed MCP server endpoints and /transcribe flow. - Confirmed watcher audio detection logic. - Confirmed summarizer prompt loading and env override. - Confirmed docx_styles markdown-to-DOCX conversion. - Confirmed docx_cover integration. - Confirmed email_sender with cover pages and markdown styling. - Confirmed tasks and __main__ wiring. --- scraibe/docx_styles.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scraibe/docx_styles.py b/scraibe/docx_styles.py index ffb7bdb..9070f47 100644 --- a/scraibe/docx_styles.py +++ b/scraibe/docx_styles.py @@ -24,7 +24,7 @@ def _ensure_style(doc, name, based_on="Normal", font_name="Courier", font_size=P return styles[name] -def apply_heading_style(paragraph, level: int): +def apply_heading_style(doc, paragraph, level: int): """ Apply heading style to a paragraph based on level (1, 2, 3). """ @@ -38,18 +38,16 @@ def apply_heading_style(paragraph, level: int): style_name = "SummaryHeading3" size = Pt(12) - doc = paragraph.document style = _ensure_style(doc, style_name, font_size=size) paragraph.style = style paragraph.paragraph_format.space_before = Pt(4) paragraph.paragraph_format.space_after = Pt(2) -def apply_bullet_style(paragraph): +def apply_bullet_style(doc, paragraph): """ Apply a simple bullet style to a paragraph. """ - doc = paragraph.document style_name = "SummaryBullet" style = _ensure_style(doc, style_name) paragraph.style = style @@ -90,7 +88,7 @@ def parse_simple_md_to_paragraphs(doc, text: str): level = len(heading_match.group(1)) content = heading_match.group(2).strip() p = doc.add_paragraph() - apply_heading_style(p, level) + apply_heading_style(doc, p, level) _add_run_with_inline_md(p, content) current_paragraph = p in_list = False @@ -103,10 +101,10 @@ def parse_simple_md_to_paragraphs(doc, text: str): if not in_list or current_paragraph is None: in_list = True current_paragraph = doc.add_paragraph() - apply_bullet_style(current_paragraph) + apply_bullet_style(doc, current_paragraph) else: current_paragraph = doc.add_paragraph() - apply_bullet_style(current_paragraph) + apply_bullet_style(doc, current_paragraph) _add_run_with_inline_md(current_paragraph, content) continue