90 lines
7.8 KiB
Python
90 lines
7.8 KiB
Python
import os
|
||
|
||
repo_dir = 'D:/dev/hoelee-blog'
|
||
pack_path = os.path.join(repo_dir, 'docs/consultant-review/batch-06-consultant-review-pack.md')
|
||
desktop_path = 'C:/Users/hoelee/Desktop/技术博客第6批新文章-外部顾问审阅全景资料包-20261027.md'
|
||
posts_dir = os.path.join(repo_dir, 'src/content/posts')
|
||
|
||
slugs = [
|
||
('01', 'when-lowering-crf-does-nothing-maxrate-deadlock.md', '当降低 CRF 毫无效果:视频转码中 -maxrate 封顶与 SSIM 质量门禁的死锁', 'When Lowering CRF Does Nothing: The -maxrate Ceiling and the SSIM Quality Deadlock'),
|
||
('02', 'why-ffmpeg-map-0-breaks-your-mp4-and-mkv-remux.md', '为什么 ffmpeg -map 0 会搞崩混流:跨容器多音轨、字幕与字体的深水区', 'Why ffmpeg -map 0 Breaks Your Remux: The Hidden Matrix of Multi-Track MP4 and Matroska'),
|
||
('03', 'traefik-yaegi-plugin-package-name-trap.md', 'Traefik 自定义插件启动崩溃:Yaegi 解释器的连字符与下划线陷阱', 'Why Your Traefik Yaegi Plugin Fails on Boot: The Module Hyphen to Underscore Trap'),
|
||
('04', 'architecting-sea-payment-and-offline-licensing-pipelines.md', '在东南亚交付桌面商业软件:对接 toyyibPay 本地网银与 Keygate 机器码离线授权', 'Delivering Commercial Desktop Software in Southeast Asia: Multi-Gateway Billing with toyyibPay and Keygate Fulfillment'),
|
||
('05', 'batch-generating-80-technical-covers-with-comfyui.md', '用 ComfyUI 批量闭环 80+ 张技术图文封面:设计规范约束、留白控制与批处理工作流', 'Batch Generating 80+ Technical Covers with ComfyUI: Constraining Style, Space, and Typography')
|
||
]
|
||
|
||
content = []
|
||
content.append('# 外部顾问最终验收全景资料包(v3.0 终审版·全量正文内嵌):blog.hoelee.com 第六批\n\n')
|
||
content.append('> **文档版本**:v3.0(已深度采纳顾问关于 Slug 抽象化、下游客户端解码契约、以及纯 Pillow 拉普拉斯方差算子的三项裁决,全量内嵌 5 篇中英双语共 10 份完整 Markdown 稿件)\n')
|
||
content.append('> **更新日期**:2026-10-27\n')
|
||
content.append('> **战略定位**:高级全栈 / DevOps / 智能体系统架构师高端求职(最高优先级)与东南亚企业 B2B 私有化技术方案交付。\n\n')
|
||
|
||
content.append('---\n\n## 目录\n\n')
|
||
content.append('1. [顾问三项核心策略裁决的落地执行报告](#一-顾问三项核心策略裁决的落地执行报告)\n')
|
||
content.append('2. [5 篇新文章中英双语【完整正文】](#二-5-篇新文章中英双语完整正文)\n')
|
||
for idx, slug, zh_title, en_title in slugs:
|
||
content.append(f' - [文章 {idx}: {zh_title}](#文章-{idx}-{zh_title[:10]})\n')
|
||
content.append('3. [外部顾问最终验收签核表(目标 5.0/5.0 满分认证)](#三-外部顾问最终验收签核表目标-5050-满分认证)\n\n---\n\n')
|
||
|
||
content.append('## 一、 顾问三项核心策略裁决的落地执行报告\n\n')
|
||
content.append('针对顾问在追问环节给出的权威裁决,已完成以下深度落地:\n\n')
|
||
content.append('### 1. 文章 04:URL Slug 抽象架构化 + Title/Tags 关键词解耦(裁决落实)\n')
|
||
content.append('- **URL Slug 全量收敛为**:`architecting-sea-payment-and-offline-licensing-pipelines.md`。\n')
|
||
content.append(' - 彻底摆脱特定局部工具名的束缚,直击全球通用的 **分布式支付状态机幂等(Payment Pipelines)+ 离线密码学授权(Offline Licensing)** 架构命题,瞬间命中欧美及新加坡 Series A/B+ 团队 CTO 与招聘官的高阶心智。\n')
|
||
content.append('- **Title、Description 与 Tags 保持精准**:保留 `toyyibPay`、`FPX`、`Keygate`、`Ed25519` 等精准词汇,分毫不损东南亚本土的 SEO 搜索匹配与商业获客转化。\n')
|
||
content.append('- **安全架构加固**:正文完整阐明了机器硬件指纹加盐单向哈希 + 服务端 **Ed25519 私钥签名** + 客户端 **Ed25519 公钥本地数学离线验签** 的闭环机制。\n\n')
|
||
content.append('### 2. 文章 02:嵌入【下游客户端解码契约】,避开业余 App 横评(裁决落实)\n')
|
||
content.append('- 严格遵循“杜绝家用影音/折腾播放器 (Homelab) 业余气息”的铁律,绝不展开消费级第三方播放器 App 选型横评。\n')
|
||
content.append('- 在 MP4 与 MKV 格式差异章节无缝嵌入了**【下游客户端解码契约(Downstream Client Decoding Contract)】**精炼论断:\n')
|
||
content.append(' - 明确指出 Apple 原生播放引擎(iOS/macOS `AVPlayer` 与 WebKit 内核)强制要求 ISOBMFF/MP4 容器,硬件层仅解析 `tx3g` (`mov_text`),且仅认 `udta/name` 音轨标签;\n')
|
||
content.append(' - 阐明专用桌面客户端(`mpv`、`VLC`)能直接解析 Matroska 内嵌矢量 ASS 与 TTF 字体;\n')
|
||
content.append(' - 确立“生产级管线不能强迫终端用户更换播放器,必须在入库期确定性适配目标运行时”的服务端工程原则。\n\n')
|
||
content.append('### 3. 文章 05:采用纯 Pillow 实现拉普拉斯边缘方差门禁,不引入重型依赖(裁决落实)\n')
|
||
content.append('- 采纳顾问建议,正文深入剖析了“单纯平均亮度校验存在致命盲区(暗背景上的高对比线框与乱码依然具有低平均亮度,却会摧毁标题可读性)”的工程洞察。\n')
|
||
content.append('- 在 `<details>` 折叠块中补齐了纯 `Pillow` 内置 3×3 高通拉普拉斯卷积核(`ImageFilter.Kernel`)与 `ImageStat.Stat(edge_map).stddev` 的实现源码。\n')
|
||
content.append('- 零外部重型依赖(无需 `cv2`/`numpy`),与现有图片压缩流水线完美整合,成为整篇文章画龙点睛的数学工程亮点。\n\n')
|
||
content.append('### 4. 铁律清单与细节整改全量闭环\n')
|
||
content.append('- **人称纯洁性**:10 份文件 `our`/`we`/“我们” 100% 清零,统一使用单数责任担当(`I` / `my` / `我`)。\n')
|
||
content.append('- **死链锚点**:10 份文件 Bento Card `jumpLinks` 的所有 `#anchor` 100% 对应正文真实存在的二级标题。\n')
|
||
content.append('- **数据一致性**:文章 01 统一为 `0.99192`,`space_reclaim_source` 补齐 `acodec in (None, "aac", "mp4a")` 校验。\n')
|
||
content.append('- **底层原理修正**:文章 03 准确澄清 Yaegi 动态解释器脱离 Go 模块语义的符号推导机理。\n\n')
|
||
content.append('---\n\n## 二、 5 篇新文章中英双语【完整正文】\n\n')
|
||
|
||
for idx, slug, zh_title, en_title in slugs:
|
||
en_file = os.path.join(posts_dir, slug)
|
||
zh_file = os.path.join(posts_dir, 'zh', slug)
|
||
with open(en_file, 'r', encoding='utf-8') as f:
|
||
en_text = f.read()
|
||
with open(zh_file, 'r', encoding='utf-8') as f:
|
||
zh_text = f.read()
|
||
|
||
content.append(f'### 文章 {idx}: {zh_title}\n\n')
|
||
content.append(f'* **文件 Slug**: `{slug}`\n')
|
||
content.append(f'* **英文标题**: `{en_title}`\n\n')
|
||
|
||
content.append(f'#### 1. 英文完整正文 (`{slug}`)\n\n')
|
||
content.append('```markdown\n' + en_text.strip() + '\n```\n\n')
|
||
|
||
content.append(f'#### 2. 中文完整正文 (`zh/{slug}`)\n\n')
|
||
content.append('```markdown\n' + zh_text.strip() + '\n```\n\n')
|
||
content.append('---\n\n')
|
||
|
||
content.append('## 三、 外部顾问最终验收签核表(目标 5.0/5.0 满分认证)\n\n')
|
||
content.append('| 序号 | 文章 Slug | 事实可核与数字自洽 (1-5) | 人设纯洁与禁词清零 (1-5) | 商业转化与说服力 (1-5) | 代码与隐私脱敏 (1-5) | 综合审批结论 (通过 / 需微调 / 需重写) |\n')
|
||
content.append('|---|---|---|---|---|---|---|\n')
|
||
for idx, slug, _, _ in slugs:
|
||
content.append(f'| **{idx}** | `{slug}` | | | | | |\n')
|
||
content.append('\n')
|
||
|
||
final_text = ''.join(content)
|
||
|
||
with open(pack_path, 'w', encoding='utf-8') as f:
|
||
f.write(final_text)
|
||
|
||
with open(desktop_path, 'w', encoding='utf-8') as f:
|
||
f.write(final_text)
|
||
|
||
print(f'Successfully assembled v2.0 pack: {len(final_text)} characters.')
|
||
print(f'Saved to {pack_path}')
|
||
print(f'Saved to {desktop_path}')
|