diff --git a/02_卡人(水)/水桥_平台对接/智能纪要/脚本/generate_meeting_image.py b/02_卡人(水)/水桥_平台对接/智能纪要/脚本/generate_meeting_image.py deleted file mode 100644 index b3901564..00000000 --- a/02_卡人(水)/水桥_平台对接/智能纪要/脚本/generate_meeting_image.py +++ /dev/null @@ -1,310 +0,0 @@ -#!/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 3f997fcb..c88de9f8 100644 --- a/运营中枢/工作台/gitea_push_log.md +++ b/运营中枢/工作台/gitea_push_log.md @@ -387,3 +387,4 @@ | 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 个 | +| 2026-03-17 19:37:38 | 🔄 卡若AI 同步 2026-03-17 19:37 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 11 个 | diff --git a/运营中枢/工作台/代码管理.md b/运营中枢/工作台/代码管理.md index 94b2fed7..f7a3dd52 100644 --- a/运营中枢/工作台/代码管理.md +++ b/运营中枢/工作台/代码管理.md @@ -390,3 +390,4 @@ | 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) | +| 2026-03-17 19:37:38 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-17 19:37 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 11 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |