diff --git a/02_卡人(水)/水桥_平台对接/智能纪要/templates/产研会议纪要.html b/02_卡人(水)/水桥_平台对接/智能纪要/templates/产研会议纪要.html deleted file mode 100644 index 06ea1d8d..00000000 --- a/02_卡人(水)/水桥_平台对接/智能纪要/templates/产研会议纪要.html +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - {{title}} - 产研会议纪要 - - - -
- - - -
-
{{label}}
-

{{title}}

-
- 📅 {{date}} - ⏱ 时长:{{duration}} - 👥 参与:{{participants}} -
-
- -
- - - -
- - -
-
-
-
-

{{topic_title}}

-
{{topic_owner}} · {{topic_scope}}
-
-
-
-

📋 {{section_title}}

-
    -
  • 要点内容 已完成
  • -
  • 要点内容
  • -
  • 要点内容 进行中
  • -
  • 要点内容 阻塞
  • -
-
- 🎯 决策:决策内容描述 -
-
-
- - - -
- - -
-
💡
-

{{insight_section_title}}

-
- -
-

{{insight_title}}

-
-

洞察内容段落

-
-
- - -
-
-

行动推进

-
- -
-
-
#
-
任务
-
负责人
-
状态
-
- -
-
1
-
任务描述
-
负责人
-
状态
-
-
- - -
-
📌
-

旁线记录

-
- -
-
-

{{side_topic_title}}

-
-

旁线话题内容

-
-
-
- -
- - - - -
- - diff --git a/02_卡人(水)/水桥_平台对接/智能纪要/脚本/generate_meeting_image.py b/02_卡人(水)/水桥_平台对接/智能纪要/脚本/generate_meeting_image.py new file mode 100644 index 00000000..b3901564 --- /dev/null +++ b/02_卡人(水)/水桥_平台对接/智能纪要/脚本/generate_meeting_image.py @@ -0,0 +1,310 @@ +#!/usr/bin/env python3 +""" +产研会议纪要 → 苹果毛玻璃白底图片(直接生成,不落HTML文件) + +用法: + python3 generate_meeting_image.py --json data.json --output output.png + 或在代码中直接调用 generate_meeting_image(data_dict, output_path) + +五大板块(固定结构): + 1. 🎯 目标&结果 + 2. 📌 过程&问题 + 3. 💡 反思&想法 + 4. 📝 总结&优化 + 5. ▶ 下一步执行 +""" + +import json, sys, os, tempfile, argparse +from pathlib import Path + +TEMPLATE = """ + + + + + + +
+{header_html} +{sections_html} + +
+ +""" + + +def build_header(data: dict) -> str: + label = data.get("label", "产研组会 · 产品团队") + title = data.get("title", "会议纪要") + date = data.get("date", "") + duration = data.get("duration", "") + participants = data.get("participants", "") + + meta_items = [] + if date: + meta_items.append(f"📅 {date}") + if duration: + meta_items.append(f"⏱ {duration}") + if participants: + meta_items.append(f"👥 {participants}") + + return f"""
+
{label}
+

{title}

+
{''.join(meta_items)}
+
""" + + +def build_section(icon: str, title: str, items: list) -> str: + li_html = "" + for item in items: + if isinstance(item, dict): + text = item.get("text", "") + color = item.get("color", "gray") + tag = item.get("tag", "") + tag_color = item.get("tag_color", "gray") + tag_html = f' {tag}' if tag else "" + li_html += f'
  • {text}{tag_html}
  • \n' + else: + li_html += f'
  • {item}
  • \n' + + return f"""
    +
    {icon} {title}
    +
    +
    """ + + +def generate_meeting_image(data: dict, output_path: str): + from playwright.sync_api import sync_playwright + + header_html = build_header(data) + + sections = [ + ("🎯", "目标 & 结果", data.get("goals", [])), + ("📌", "过程 & 问题", data.get("process", [])), + ("💡", "反思 & 想法", data.get("reflection", [])), + ("📝", "总结 & 优化", data.get("summary", [])), + ("▶", "下一步执行", data.get("next_steps", [])), + ] + + sections_html = "\n".join( + build_section(icon, title, items) + for icon, title, items in sections + if items + ) + + from datetime import datetime + gen_date = datetime.now().strftime("%Y-%m-%d") + + full_html = TEMPLATE.format( + header_html=header_html, + sections_html=sections_html, + generate_date=gen_date, + ) + + tmp = tempfile.NamedTemporaryFile(suffix=".html", delete=False, mode="w", encoding="utf-8") + tmp.write(full_html) + tmp.close() + + try: + with sync_playwright() as p: + browser = p.chromium.launch() + page = browser.new_page(viewport={"width": 1000, "height": 800}) + page.goto(f"file://{tmp.name}") + page.wait_for_timeout(500) + page.screenshot(path=output_path, full_page=True) + browser.close() + finally: + os.unlink(tmp.name) + + print(f"✅ 已生成: {output_path} ({os.path.getsize(output_path)} bytes)") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="产研会议纪要 → 毛玻璃白底图片") + parser.add_argument("--json", required=True, help="JSON 数据文件路径") + parser.add_argument("--output", "-o", required=True, help="输出 PNG 路径") + args = parser.parse_args() + + with open(args.json, "r", encoding="utf-8") as f: + data = json.load(f) + + generate_meeting_image(data, args.output) diff --git a/运营中枢/工作台/gitea_push_log.md b/运营中枢/工作台/gitea_push_log.md index 78108fae..3f997fcb 100644 --- a/运营中枢/工作台/gitea_push_log.md +++ b/运营中枢/工作台/gitea_push_log.md @@ -386,3 +386,4 @@ | 2026-03-17 13:29:48 | 🔄 卡若AI 同步 2026-03-17 13:29 | 更新:金仓、水桥平台对接、运营中枢工作台 | 排除 >20MB: 11 个 | | 2026-03-17 15:00:32 | 🔄 卡若AI 同步 2026-03-17 15:00 | 更新:运营中枢工作台 | 排除 >20MB: 11 个 | | 2026-03-17 16:40:55 | 🔄 卡若AI 同步 2026-03-17 16:35 | 更新:金仓、总索引与入口、运营中枢工作台 | 排除 >20MB: 11 个 | +| 2026-03-17 19:34:19 | 🔄 卡若AI 同步 2026-03-17 19:34 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 11 个 | diff --git a/运营中枢/工作台/代码管理.md b/运营中枢/工作台/代码管理.md index 4207f562..94b2fed7 100644 --- a/运营中枢/工作台/代码管理.md +++ b/运营中枢/工作台/代码管理.md @@ -389,3 +389,4 @@ | 2026-03-17 13:29:48 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-17 13:29 | 更新:金仓、水桥平台对接、运营中枢工作台 | 排除 >20MB: 11 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) | | 2026-03-17 15:00:32 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-17 15:00 | 更新:运营中枢工作台 | 排除 >20MB: 11 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) | | 2026-03-17 16:40:55 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-17 16:35 | 更新:金仓、总索引与入口、运营中枢工作台 | 排除 >20MB: 11 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) | +| 2026-03-17 19:34:19 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-17 19:34 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 11 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |