Initial commit: yu-zhi-ran platform with automation integration

This commit is contained in:
lt
2026-04-19 14:05:09 +08:00
commit 3cb2df51c8
209 changed files with 80379 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env python3
"""
在 Markdown 的 H2 标题前插入分隔线,第一个除外
"""
MD_PATH = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年/final-article.md"
with open(MD_PATH, "r", encoding="utf-8") as f:
lines = f.readlines()
new_lines = []
first_h2_seen = False
for line in lines:
if line.startswith("## "):
if first_h2_seen:
new_lines.append("---\n\n")
else:
first_h2_seen = True
new_lines.append(line)
with open(MD_PATH, "w", encoding="utf-8") as f:
f.writelines(new_lines)
print(f"✅ 已处理 {MD_PATH}")
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env python3
"""
在章节标题(h2)前插入分隔线,第一个除外
"""
import re
HTML_PATH = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年/article-optimized.html"
with open(HTML_PATH, "r", encoding="utf-8") as f:
html = f.read()
# 分隔线HTML
separator = '<div class="chapter-separator" style="margin: 40px 0 20px; border-top: 2px dashed #e0e0e0;"></div>\n'
# 找到所有 h2 标题
h2_pattern = re.compile(r'(<h2>.*?</h2>)', re.DOTALL)
matches = list(h2_pattern.finditer(html))
# 跳过第一个 h2,对其余每个插入分隔
insertions = []
for i, m in enumerate(matches[1:], start=1): # 从第二个开始
insert_pos = m.start()
insertions.append((insert_pos, separator))
# 按位置逆序插入,避免影响后续位置
insertions.sort(reverse=True, key=lambda x: x[0])
html_list = list(html)
for pos, sep in insertions:
html_list.insert(pos, sep)
new_html = ''.join(html_list)
# 写回
with open(HTML_PATH, "w", encoding="utf-8") as f:
f.write(new_html)
print(f"✅ 已插入 {len(insertions)} 个章节分隔")
print(f"📄 文件: {HTML_PATH}")
+209
View File
@@ -0,0 +1,209 @@
# 宇之然内容生产合规性验证报告
**日期**2026-04-16
**任务**:自动化内容生产系统合规审查
**审查对象**A02、A03 选题创作产物
---
## ✅ 已完成的修复
### 1. 标题硬编码修复
- **问题**HTML模板中 `<title>` 和 H1 标题始终显示"可持续性内容"
- **原因**`create_html_for_platform()` 使用硬编码字符串
- **修复**:改用 `topic_data["topic"]["title"]`
- **验证**A02 文章标题正确显示"AI副业入门:用DeepSeek实现第一笔收入的100天"
### 2. 定时任务配置修复
- **问题**`isolated job requires payload.kind=agentTurn`
- **修复**
- `payload.kind``systemEvent` 改为 `agentTurn`
- 移除无效的 `sessionKey`
- 设置 `sessionTarget: isolated`
- **验证**:手动运行成功
### 3. 选题库重建(新战略版)
- **旧库**:10个个人化选题(人均视角)
- **新库**:20个全球-本土对比选题(客观叙事)
- **来源**`strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md`
- **结构**:4大支柱 × 5个选题(未来工作/可持续生活/知识工厂/科技人文)
- **人称规范**:所有标题避免第一人称
### 4. 合规审查系统集成
- **新增**`scripts/compliance_checker.py`
- **功能**
- 敏感词检测(政治、违禁、不实信息)
- 平台规则检查(标题长度、禁止模式、标签合规)
- 法律法规检查(国家秘密、赌博、版权等)
- 品牌调性检查(人称、推广倾向、品牌露出)
- 内容-选题一致性检查
- **集成**:在 `creator.run()` 末尾自动调用
- **输出**`automation/data/drafts/YYYY-MM-DD/compliance_<article_id>.json`
---
## ⚠️ 发现的问题
### 问题1:内容未适配新选题结构(严重)
**现象**
- 标题正确,但正文是通用"可持续生活"模板
- 所有文章都使用相同的章节结构(引言、全球案例、中国痛点、本土方案、MVP、结语)
- 未使用选题字段:`core_concept``audience_pain``unique_angle``china_pain_points``mvp_actions`
**影响**
- 内容与选题不符(AI副业文章在讲可持续生活)
- 读者困惑,平台推荐不精准
- 品牌调性不一致
**根本原因**
`create_content()` 方法是为旧选题库设计的,未重构以使用新选题的字段。
**解决方案**(需较大工作量):
1.`topic_data["topic"]` 的所有字段映射到内容生成
2. 根据 `field`(未来工作/可持续生活/知识工厂/科技人文)选择不同的内容框架
3. 使用 `core_concept` 作为核心观点
4. 使用 `audience_pain` 构建共鸣段
5. 使用 `unique_angle` 建立差异化
6. 重构案例部分:使用 `cases` 关联的案例数据(而非`china_pain_points`字符串)
7. 使用 `mvp_actions`(需添加到选题字段)生成行动清单
**临时缓解**
- 继续使用通用模板,但修改模板为更中性,减少与选题冲突的字段
---
### 问题2:标签不符合平台规则(已发现)
**合规报告**A03)显示:
```
[合规问题] 平台规则/标签合规: 使用平台允许的标签,如科技, 生活, 职场
```
**原因**
- 当前使用固定标签:`["可持续生活", "全球案例", "中国实践", "年份趋势"]`
- 知乎平台规则要求标签必须在其允许列表内(如:科技、生活、职场等)
- "可持续生活" 是通用表达,但平台希望使用标准标签
**修复**
将标签生成逻辑改为使用 `PLATFORM_RULES[platform]["allowed_tags"]` 中的标签
---
### 问题3:首发标识混入标题(小问题)
**现象**A01 标题 `<h1>` 之前还有一行 `<h1>可持续性内容</h1>`(来自模板的H2?)
检查模板:知乎模板同时有 `{{TITLE}}``<!-- CONTENT -->`,而 content 中也包含 H2 标题
→ 导致双重标题
**修复**:统一 H1 来源(模板提供)或内容提供,不要重复
---
### 问题4:缺少引用来源标注(合规风险)
**现状**:文章未标注数据和案例的引用来源
**风险**:版权争议、虚假信息风险
**要求**:根据 `sources.yaml` 和案例数据库,在文末或适当位置添加"参考文献"章节
---
### 问题5:品牌露出需规范化
**问题**:有可能提到具体品牌(如"米家"、"花帮主"),需要替换为"一些第三方工具"或"智能设备"
**处理**:已加入 `compliance_checker.brand_guidelines` 检查
---
## 📊 合规审查示例
### A02 选题《AI副业入门》
- **平台**:知乎
- **得分**:未计算(需修复标签后)
- **问题数**:18个(主要是标签合规)
- **严重性**:低(标签问题可快速修复)
- **建议**:立即修复标签生成逻辑
### A03 选题《数字游民签证》
- **平台**:知乎
- **得分**:未计算
- **问题数**14个(同上)
- **严重性**:低
---
## 🔧 立即行动项(优先级排序)
### P0 - 修复标签生成(10分钟)
- 根据选题 `field` 映射到平台允许的标签
- 例如:未来工作方式 → ["科技", "职场", "AI"]
- 修改 `create_html_for_platform` 中的标签生成逻辑
### P1 - 内容生成框架重构(2-4小时)
- 更新 `create_content()`,使用 `topic_data["topic"]` 的所有字段
- 分支柱(4个)定制内容结构
- 使用 `core_concept` 作为核心观点
- 使用 `audience_pain` 构建共鸣
- 使用 `unique_angle` 建立差异化
-`cases` 数据库提取真实案例,而非通用"全球案例"占位符
### P2 - 标题去重(5分钟)
- 决定标题出现在模板还是内容中(二选一)
- 删除冗余的 `<h1>`
### P3 - 添加参考文献章节(30分钟)
-`conclusion` 后添加"参考文献"部分
- 列出引用的案例来源(从 `cases` 提取 URL
- 自动格式化引用格式
### P4 - 完善合规阈值(10分钟)
- 定义"可接受的合规问题数量"(如 ≤ 3 个轻微问题)
- 超过阈值则阻止发布(或标记为"需人工审核")
-`run_compliance_check` 中根据评分决定是否继续
---
## 📈 长期建议
1. **建立案例数据库**`automation/data/sustainability_cases.json` 目前为空,需填充全球案例
2. **实现内容模板引擎**:使用 Jinja2 或其他模板系统,根据选题字段动态渲染
3. **人机协同流程**:合规审查后,自动移入"待人工审核"队列,不自动发布
4. **多轮对话优化**:基于合规报告,让AI自迭代内容(修复发现的问题)
5. **平台规则更新机制**:定期更新 `PLATFORM_RULES`,适应平台政策变化
---
## ✅ 合规性总体评估
| 维度 | 状态 | 说明 |
|------|------|------|
| 敏感词 | ✅ 通过 | 未检测到敏感词 |
| 法律法规 | ✅ 通过 | 无涉政、涉密、赌博等内容 |
| 平台规则 | ⚠️ 轻微违规 | 标签需调整为平台允许列表 |
| 品牌调性 | ✅ 通过 | 符合客观叙事要求 |
| 内容质量 | ⚠️ 需改进 | 内容与选题不匹配,需重构 |
| 引用规范 | ❌ 缺失 | 缺少参考文献章节 |
**综合结论**
- **安全性**:✅ 通过(无敏感/违法内容)
- **合规性**:⚠️ 需修复标签(轻微问题)
- **质量**:⚠️ 内容生成逻辑需重构(核心问题)
**允许发布**:在修复标签问题后,可以发布(内容虽不匹配,但不违规)
---
## 📁 生成文件
- `creator.py` - 已更新(标题修复 + 合规集成)
- `compliance_checker.py` - 新增
- `compliance_A02_zhihu.json` - 审查报告示例
- `compliance_A03_zhihu.json` - 审查报告示例
---
**维护**:每次定时任务运行后,检查合规报告(`automation/data/drafts/YYYY-MM-DD/compliance_*.json`
**负责人**:AI助手(自动) + 人工审核(需配置)
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env python3
"""
压缩公众号配图
目标:每张PNG < 80KB,保持清晰度
"""
import os
from PIL import Image
IMAGES_DIR = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/publishing/images"
OUTPUT_DIR = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/publishing/images_compressed"
os.makedirs(OUTPUT_DIR, exist_ok=True)
def compress_png(input_path, output_path, target_kb=80):
img = Image.open(input_path)
# 如果图片较大,适当缩小(保持长宽比)
max_width = 1200
if img.width > max_width:
ratio = max_width / img.width
new_size = (max_width, int(img.height * ratio))
img = img.resize(new_size, Image.Resampling.LANCZOS)
print(f" 缩放: {img.width}x{img.height}")
# 尝试不同压缩级别保存
for optimize in [True, False]:
for quality in [85, 80, 75, 70]:
img.save(output_path, format='PNG', optimize=optimize, compress_level=6, quality=quality)
size_kb = os.path.getsize(output_path) / 1024
if size_kb <= target_kb:
return size_kb, quality, optimize
# 如果还是大,强制用最高压缩
img.save(output_path, format='PNG', optimize=True, compress_level=9)
return os.path.getsize(output_path) / 1024, 9, True
if __name__ == "__main__":
files = sorted([f for f in os.listdir(IMAGES_DIR) if f.endswith('.png')])
print(f"开始压缩 {len(files)} 张图片...\n")
total_before = 0
total_after = 0
for f in files:
inp = os.path.join(IMAGES_DIR, f)
out = os.path.join(OUTPUT_DIR, f)
size_before = os.path.getsize(inp) / 1024
total_before += size_before
size_after, quality, opt = compress_png(inp, out)
total_after += size_after
status = "" if size_after <= 80 else "⚠️"
print(f"{status} {f}")
print(f" {size_before:5.1f}KB → {size_after:5.1f}KB (q={quality}, opt={opt})")
print(f"\n总计: {total_before:.1f}KB → {total_after:.1f}KB")
print(f"压缩率: {(1-total_after/total_before)*100:.1f}%")
print(f"\n压缩文件已保存至: {OUTPUT_DIR}")
@@ -0,0 +1,40 @@
# 文章大纲:AI时代的技能组合:什么技能值得投入10年?
## 一、引言(约200字)
- 开场场景/痛点引入
- 提出核心问题:AI时代的技能组合:什么技能值得投入10年?
- 点明文章价值
## 二、核心观点(约300字)
基于WEF未来技能报告,划分4个技能维度(AI强化型、AI无法替代、复合型、过时型),帮中国职场人识别护城河技能
## 三、受众痛点分析(约300字)
学什么都不放心,怕投入时间后AI又取代
## 四、全球/行业趋势与案例(约500字)
- 引用研究笔记中的 0 个案例,精选 2-3 个详述
- 数据支撑:提取研究笔记中的关键数据
- 趋势分析
## 五、本土落地建议(约400字)
- 结合未来工作方式领域特点
- 提供可执行的步骤
- 注意事项
## 六、独特视角:将全球宏观报告转化为个人技能地图,提供可视化工具(约300字)
## 七、行动指南(MVP,约200字)
1. 理解现状
2. 小范围试验
3. 评估效果
4. 形成习惯
## 八、总结与鼓励(约200字)
- 回顾要点
- 呼吁行动
## 九、参考文献
- 从研究笔记中提取来源链接
---
*大纲生成时间:2026-04-17*
@@ -0,0 +1,40 @@
# 文章大纲:远程工作2026中国指南:从'不可能'到'可行'的路径图
## 一、引言(约200字)
- 开场场景/痛点引入
- 提出核心问题:远程工作2026中国指南:从'不可能'到'可行'的路径图
- 点明文章价值
## 二、核心观点(约300字)
通过法律实操(合同、社保、个税)和心理建设(孤独应对),在中国环境下实现远程工作
## 三、受众痛点分析(约300字)
想远程但不知如何合法操作,担心被边缘化
## 四、全球/行业趋势与案例(约500字)
- 引用研究笔记中的 0 个案例,精选 2-3 个详述
- 数据支撑:提取研究笔记中的关键数据
- 趋势分析
## 五、本土落地建议(约400字)
- 结合未来工作方式领域特点
- 提供可执行的步骤
- 注意事项
## 六、独特视角:对比GitLab/Zapier海外实践,本土化落地策略(约300字)
## 七、行动指南(MVP,约200字)
1. 理解现状
2. 小范围试验
3. 评估效果
4. 形成习惯
## 八、总结与鼓励(约200字)
- 回顾要点
- 呼吁行动
## 九、参考文献
- 从研究笔记中提取来源链接
---
*大纲生成时间:2026-04-18*
@@ -0,0 +1,40 @@
# 文章大纲:第二大脑2.0:用DeepSeek+本地向量库建立私有知识系统
## 一、引言(约200字)
- 开场场景/痛点引入
- 提出核心问题:第二大脑2.0:用DeepSeek+本地向量库建立私有知识系统
- 点明文章价值
## 二、核心观点(约300字)
对比Obsidian+RAG海外实践,针对国内云服务担忧,提供数据主权、隐私保护、无缝检索、AI问答的本地化方案
## 三、受众痛点分析(约300字)
想系统化知识但担心云存储安全,怕复杂
## 四、全球/行业趋势与案例(约500字)
- 引用研究笔记中的 0 个案例,精选 2-3 个详述
- 数据支撑:提取研究笔记中的关键数据
- 趋势分析
## 五、本土落地建议(约400字)
- 结合个人知识工厂领域特点
- 提供可执行的步骤
- 注意事项
## 六、独特视角:强调数据主权,从API调用到本地部署的渐进路线(约300字)
## 七、行动指南(MVP,约200字)
1. 理解现状
2. 小范围试验
3. 评估效果
4. 形成习惯
## 八、总结与鼓励(约200字)
- 回顾要点
- 呼吁行动
## 九、参考文献
- 从研究笔记中提取来源链接
---
*大纲生成时间:2026-04-18*
@@ -0,0 +1,40 @@
# 文章大纲:AI副业入门:用DeepSeek实现第一笔收入的100天
## 一、引言(约200字)
- 开场场景/痛点引入
- 提出核心问题:AI副业入门:用DeepSeek实现第一笔收入的100天
- 点明文章价值
## 二、核心观点(约300字)
从代写文案/数据分析起步,通过Fiverr国内外平台对比,制定定价策略和违规红线规避
## 三、受众痛点分析(约300字)
想用AI赚钱但不知从何开始,怕踩坑
## 四、全球/行业趋势与案例(约500字)
- 引用研究笔记中的 0 个案例,精选 2-3 个详述
- 数据支撑:提取研究笔记中的关键数据
- 趋势分析
## 五、本土落地建议(约400字)
- 结合未来工作方式领域特点
- 提供可执行的步骤
- 注意事项
## 六、独特视角:对比Fiverr海外繁荣 vs 国内空白,提供本土化接单路径(约300字)
## 七、行动指南(MVP,约200字)
1. 理解现状
2. 小范围试验
3. 评估效果
4. 形成习惯
## 八、总结与鼓励(约200字)
- 回顾要点
- 呼吁行动
## 九、参考文献
- 从研究笔记中提取来源链接
---
*大纲生成时间:2026-04-19*
@@ -0,0 +1,20 @@
# 研究笔记:AI时代的技能组合:什么技能值得投入10年?
## 选题信息
- **ID**: A05
- **领域**: 未来工作方式
- **核心观点**: 基于WEF未来技能报告,划分4个技能维度(AI强化型、AI无法替代、复合型、过时型),帮中国职场人识别护城河技能
- **受众痛点**: 学什么都不放心,怕投入时间后AI又取代
- **独特视角**: 将全球宏观报告转化为个人技能地图,提供可视化工具
## 相关案例(0个)
## 研究发现摘要
- 待补充:从案例中提炼的趋势和洞察
- 待补充:数据支撑
## 待深入研究的问题
- [ ] 需要更多本土数据
- [ ] 需要验证某些结论的适用性
*生成时间:2026-04-17*
@@ -0,0 +1,20 @@
# 研究笔记:远程工作2026中国指南:从'不可能'到'可行'的路径图
## 选题信息
- **ID**: A01
- **领域**: 未来工作方式
- **核心观点**: 通过法律实操(合同、社保、个税)和心理建设(孤独应对),在中国环境下实现远程工作
- **受众痛点**: 想远程但不知如何合法操作,担心被边缘化
- **独特视角**: 对比GitLab/Zapier海外实践,本土化落地策略
## 相关案例(0个)
## 研究发现摘要
- 待补充:从案例中提炼的趋势和洞察
- 待补充:数据支撑
## 待深入研究的问题
- [ ] 需要更多本土数据
- [ ] 需要验证某些结论的适用性
*生成时间:2026-04-18*
@@ -0,0 +1,20 @@
# 研究笔记:第二大脑2.0:用DeepSeek+本地向量库建立私有知识系统
## 选题信息
- **ID**: C01
- **领域**: 个人知识工厂
- **核心观点**: 对比Obsidian+RAG海外实践,针对国内云服务担忧,提供数据主权、隐私保护、无缝检索、AI问答的本地化方案
- **受众痛点**: 想系统化知识但担心云存储安全,怕复杂
- **独特视角**: 强调数据主权,从API调用到本地部署的渐进路线
## 相关案例(0个)
## 研究发现摘要
- 待补充:从案例中提炼的趋势和洞察
- 待补充:数据支撑
## 待深入研究的问题
- [ ] 需要更多本土数据
- [ ] 需要验证某些结论的适用性
*生成时间:2026-04-18*
@@ -0,0 +1,20 @@
# 研究笔记:AI副业入门:用DeepSeek实现第一笔收入的100天
## 选题信息
- **ID**: A02
- **领域**: 未来工作方式
- **核心观点**: 从代写文案/数据分析起步,通过Fiverr国内外平台对比,制定定价策略和违规红线规避
- **受众痛点**: 想用AI赚钱但不知从何开始,怕踩坑
- **独特视角**: 对比Fiverr海外繁荣 vs 国内空白,提供本土化接单路径
## 相关案例(0个)
## 研究发现摘要
- 待补充:从案例中提炼的趋势和洞察
- 待补充:数据支撑
## 待深入研究的问题
- [ ] 需要更多本土数据
- [ ] 需要验证某些结论的适用性
*生成时间:2026-04-19*
+104
View File
@@ -0,0 +1,104 @@
[
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
},
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
},
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
},
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
},
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
},
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
}
]
@@ -0,0 +1 @@
[]
@@ -0,0 +1 @@
[]
@@ -0,0 +1 @@
{"task": "sustainability_collection", "time": "2026-04-17 18:33", "topic_count": 0, "case_count": 0, "source_count": 8, "details_link": "automation/data/sustainability_raw/2026-04-17"}
@@ -0,0 +1,53 @@
[
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
},
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
},
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
}
]
@@ -0,0 +1,21 @@
[
{
"id": "TOPIC-.F4F684",
"title": "未分类新趋势: 与的中国落地路径",
"cases": [
"LOCAL-UNKNOWN",
"LOCAL-UNKNOWN",
"LOCAL-UNKNOWN"
],
"audience": "城市焦虑青年(26-35岁)",
"china_pain_points": "未分类在中国面临的主要问题",
"localization_solution": "国际案例中国化适配方案",
"mvp_actions": "读者可立即尝试的3个行动",
"estimated_length": 2500,
"priority_score": 0.78,
"status": "待处理",
"lock_by": null,
"lock_at": null,
"created_at": "2026-04-18T18:26:25.984697"
}
]
@@ -0,0 +1 @@
{"task": "sustainability_collection", "time": "2026-04-18 18:26", "topic_count": 1, "case_count": 3, "source_count": 8, "details_link": "automation/data/sustainability_raw/2026-04-18"}
@@ -0,0 +1,53 @@
[
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
},
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
},
{
"id": "LOCAL-UNKNOWN",
"country": "Global",
"category": "未分类",
"title": "",
"core_idea": "",
"data_facts": "",
"global_advantage": "",
"china_pain_point": "",
"localization_suggestion": "",
"mvp_action": "",
"source_url": "",
"credibility_rating": "⭐⭐",
"china_applicability": "⭐⭐",
"collection_date": "2026-04-18",
"status": "待验证"
}
]
@@ -0,0 +1,21 @@
[
{
"id": "TOPIC-.285EC9",
"title": "未分类新趋势: 与的中国落地路径",
"cases": [
"LOCAL-UNKNOWN",
"LOCAL-UNKNOWN",
"LOCAL-UNKNOWN"
],
"audience": "城市焦虑青年(26-35岁)",
"china_pain_points": "未分类在中国面临的主要问题",
"localization_solution": "国际案例中国化适配方案",
"mvp_actions": "读者可立即尝试的3个行动",
"estimated_length": 2500,
"priority_score": 0.78,
"status": "待处理",
"lock_by": null,
"lock_at": null,
"created_at": "2026-04-19T05:00:54.473396"
}
]
@@ -0,0 +1 @@
{"task": "sustainability_collection", "time": "2026-04-19 05:00", "topic_count": 1, "case_count": 3, "source_count": 8, "details_link": "automation/data/sustainability_raw/2026-04-19"}
+354
View File
@@ -0,0 +1,354 @@
[
{
"id": "A01",
"title": "远程工作2026中国指南:从'不可能'到'可行'的路径图",
"field": "未来工作方式",
"format": "趋势洞察 + 实操指南",
"core_concept": "通过法律实操(合同、社保、个税)和心理建设(孤独应对),在中国环境下实现远程工作",
"audience_pain": "想远程但不知如何合法操作,担心被边缘化",
"unique_angle": "对比GitLab/Zapier海外实践,本土化落地策略",
"priority": "高",
"priority_score": 10,
"total_score": 53,
"status": "待发布",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436643",
"ready_at": "2026-04-18",
"compliance_score": 100,
"lock_by": null,
"lock_at": null,
"platform_urls": {},
"published_at": null
},
{
"id": "A02",
"title": "AI副业入门:用DeepSeek实现第一笔收入的100天",
"field": "未来工作方式",
"format": "实操指南 + 案例研究",
"core_concept": "从代写文案/数据分析起步,通过Fiverr国内外平台对比,制定定价策略和违规红线规避",
"audience_pain": "想用AI赚钱但不知从何开始,怕踩坑",
"unique_angle": "对比Fiverr海外繁荣 vs 国内空白,提供本土化接单路径",
"priority": "高",
"priority_score": 10,
"total_score": 52,
"status": "待发布",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436654",
"ready_at": "2026-04-19",
"compliance_score": 100,
"lock_by": null,
"lock_at": null
},
{
"id": "A03",
"title": "数字游民签证全解析:30个国家政策对比,中国护照能去哪些?",
"field": "未来工作方式",
"format": "对比分析 + 实操指南",
"core_concept": "分析爱沙尼亚/葡萄牙/巴厘岛等30国游民签证,结合中国护照限制,给出签证+保险+税务+社群的完整路线",
"audience_pain": "想地理套利但被签证和社保困扰",
"unique_angle": "不是简单列出签证,而是给出中国护照持有者的可行组合方案(如泰国+大马+巴厘岛)",
"priority": "高",
"priority_score": 10,
"total_score": 51,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436656",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "A04",
"title": "一人公司实验:从创意到营收的365天日志",
"field": "未来工作方式",
"format": "实践日志 + 方法论",
"core_concept": "基于Indie Hackers案例,结合中国孤独创业现状,提供MVP设计、现金流管理、法律合规的一站式指南",
"audience_pain": "想单干但怕失败、缺启动资金、不懂营销",
"unique_angle": "真实日志形式,展示完整从0到营收的过程,不美化",
"priority": "高",
"priority_score": 10,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436658",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "A05",
"title": "AI时代的技能组合:什么技能值得投入10年?",
"field": "未来工作方式",
"format": "趋势分析 + 个人规划",
"core_concept": "基于WEF未来技能报告,划分4个技能维度(AI强化型、AI无法替代、复合型、过时型),帮中国职场人识别护城河技能",
"audience_pain": "学什么都不放心,怕投入时间后AI又取代",
"unique_angle": "将全球宏观报告转化为个人技能地图,提供可视化工具",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436660",
"ready_at": "2026-04-17",
"compliance_score": 100
},
{
"id": "B01",
"title": "城市农业ROI报告:20㎡阳台种菜一年,省了多少钱?",
"field": "可持续生活系统",
"format": "数据分析 + 实操指南",
"core_concept": "对比东京垂直农场与国内空间限制,精选高ROI蔬菜品种,智能设备自动灌溉,给出详细成本核算和品种推荐",
"audience_pain": "想种但怕麻烦、怕亏本、不知道种什么",
"unique_angle": "用财务思维算账(投入/产出/时间成本),打破'种菜必须有地'的思维",
"priority": "高",
"priority_score": 10,
"total_score": 52,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436665",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "B02",
"title": "零浪费家庭实验:一年只产100L垃圾,可能吗?",
"field": "可持续生活系统",
"format": "实践实验 + 方法论",
"core_concept": "对比瑞典零浪费城市,针对中国垃圾分类困境,提供垃圾追踪表、替代方案数据库、社区互助网络",
"audience_pain": "想环保但觉得做不到、不知道从哪减",
"unique_angle": "极限实验(100L/年)+ 可执行步骤(从塑料减量开始),不理想化",
"priority": "高",
"priority_score": 10,
"total_score": 51,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436667",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "B03",
"title": "低碳生活账单:用3年省了8万,碳足迹降了60%",
"field": "可持续生活系统",
"format": "数据分析 + 案例研究",
"core_concept": "对比欧洲碳税政策,从交通(电动车+共享)、饮食(植物为主)、消费(二手优先)三个维度,展示真实账单变化",
"audience_pain": "觉得低碳=更贵,不敢尝试",
"unique_angle": "用财务数据说话(省8万),打破'环保=烧钱'误解",
"priority": "高",
"priority_score": 10,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436669",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "B04",
"title": "循环消费实战:10件物品,用3年省了2万",
"field": "可持续生活系统",
"format": "实操指南 + 案例清单",
"core_concept": "对比法国二手强制法与中国闲鱼文化,提供购买决策树(买新/二手/租)、延长寿命技巧、转卖策略",
"audience_pain": "想买二手但怕质量差、怕麻烦",
"unique_angle": "10件物品的具体交易记录和对比(手机、相机、家具等),可复制",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436671",
"ready_at": "2026-04-17",
"compliance_score": 100
},
{
"id": "B05",
"title": "社区菜园指南:如何推动小区5户邻居共建共享",
"field": "可持续生活系统",
"format": "方法论 + 实操步骤",
"core_concept": "对比纽约社区花园政策与中国物业协调难题,提供法律风险(物权)、利益分配机制、技术方案(分区+智能)",
"audience_pain": "想组织但怕纠纷、不懂法律、协调不了邻居",
"unique_angle": "从1个友好小区试点开始,成功后复制,降低风险",
"priority": "高",
"priority_score": 10,
"total_score": 49,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436673",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "C01",
"title": "第二大脑2.0:用DeepSeek+本地向量库建立私有知识系统",
"field": "个人知识工厂",
"format": "技术指南 + 实操案例",
"core_concept": "对比Obsidian+RAG海外实践,针对国内云服务担忧,提供数据主权、隐私保护、无缝检索、AI问答的本地化方案",
"audience_pain": "想系统化知识但担心云存储安全,怕复杂",
"unique_angle": "强调数据主权,从API调用到本地部署的渐进路线",
"priority": "中",
"priority_score": 7,
"total_score": 52,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436675",
"ready_at": "2026-04-18",
"compliance_score": 100
},
{
"id": "C02",
"title": "PKM极简实践:PARA系统在Notion上的落地模板",
"field": "个人知识工厂",
"format": "模板分享 + 方法论",
"core_concept": "将Tiago Forte的PARA体系简化为3个核心文件夹,每周10分钟维护,AI辅助整理,让中国人真正用起来",
"audience_pain": "学了方法坚持不了,工具复杂难上手",
"unique_angle": "极简版(4个区)+ 每日5分钟习惯养成,降低门槛",
"priority": "中",
"priority_score": 7,
"total_score": 51,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436677"
},
{
"id": "C03",
"title": "费曼学习法AI增强:如何让AI帮你'教'懂一个概念",
"field": "个人知识工厂",
"format": "方法论 + 实践工具",
"core_concept": "结合经典费曼技巧与AI工具,三步法(AI简化→自我复述→Gap识别)+ 输出倒逼输入",
"audience_pain": "学东西记不住,自以为懂了但其实不会",
"unique_angle": "用AI当'测试官',验证你的理解深度,非被动接受知识",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436679"
},
{
"id": "C04",
"title": "AI个人助理搭建:从ChatGPT到私有化部署的完整路线",
"field": "个人知识工厂",
"format": "技术路线图 + 成本分析",
"core_concept": "基于海外个人AI助手普及现状,针对国内数据安全顾虑,提供从API调用到本地部署的渐进式方案(成本可控)",
"audience_pain": "想用AI助手但又怕数据泄露,不知如何起步",
"unique_angle": "不是直接推本地部署(成本高),而是API优先,敏感时再本地策略",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436680"
},
{
"id": "C05",
"title": "技能树可视化:用思维导图规划5年职业路径",
"field": "个人知识工厂",
"format": "方法论 + 工具模板",
"core_concept": "借鉴化工业界能力模型,构建硬技能×软技能矩阵,行业对标和学习资源聚合,让职业成长可规划",
"audience_pain": "不知道学什么,学了不知道用在哪,职业迷茫",
"unique_angle": "技能树而非技能列表,展示技能间关联和成长路径",
"priority": "中",
"priority_score": 7,
"total_score": 49,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436682"
},
{
"id": "D01",
"title": "AI伦理实践指南:开发者在中国的合规清单",
"field": "科技人文交叉",
"format": "合规指南 + 案例分析",
"core_concept": "对比EU AI Act与中国算法推荐管理规定,提供数据隐私、歧视检测、透明度义务、备案流程的自查清单",
"audience_pain": "开发者不了解国内AI伦理法规,怕踩雷",
"unique_angle": "不是泛泛而谈伦理,而是具体到'备案流程'和'自查表',即拿即用",
"priority": "高",
"priority_score": 10,
"total_score": 51,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436687",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "D02",
"title": "数字排毒月:戒掉微信/抖音后,生活发生了什么",
"field": "科技人文交叉",
"format": "实践实验 + 效果分析",
"core_concept": "对比硅谷禅修热与中国'失联恐惧',采用渐进式戒断(无屏时段)+ 替代活动 + 社交边界管理",
"audience_pain": "想减少屏幕时间但又怕错过重要信息,自律困难",
"unique_angle": "真实实验记录(not理论),展示戒断前后的生活变化数据",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436689"
},
{
"id": "D03",
"title": "银发科技报告:给爸妈装智能设备,学到的5个设计原则",
"field": "科技人文交叉",
"format": "设计原则 + 案例",
"core_concept": "对比日本适老化设计与国产'适老模式'鸡肋,提炼简化选项、物理反馈、容错设计、情感连接的具体方案",
"audience_pain": "给父母买智能设备但他们不用,功能复杂",
"unique_angle": "不是推荐产品,而是总结5个设计原则,让读者自己改造设备",
"priority": "中",
"priority_score": 7,
"total_score": 49,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436690"
},
{
"id": "D04",
"title": "儿童数字素养课:10岁儿子的AI启蒙12周",
"field": "科技人文交叉",
"format": "教育日志 + 方法论",
"core_concept": "对比芬兰AI教育与国内家长'禁止接触'心态,通过每周1次'AI家庭时间',培养批判性思维和创造力",
"audience_pain": "不知如何让孩子正确认识AI,怕沉迷又怕脱节",
"unique_angle": "真实父子12周项目记录,提供可复制的课程大纲",
"priority": "中",
"priority_score": 7,
"total_score": 48,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436692"
},
{
"id": "D05",
"title": "科技与自然共生:如何用AI让阳台农场更'自然'",
"field": "科技人文交叉",
"format": "理念 + 实操方案",
"core_concept": "对比荷兰智能温室与中国人'回归原始'误区,实现技术隐形化(传感器+提醒)+ 自然反馈闭环 + 人工仪式感",
"audience_pain": "想用科技但又怕失去'自然感',追求矛盾",
"unique_angle": "技术与情感连接的平衡方案,AI只做幕后,人工保留仪式",
"priority": "高",
"priority_score": 10,
"total_score": 48,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436694",
"ready_at": "2026-04-16",
"compliance_score": 100
}
]
@@ -0,0 +1,322 @@
[
{
"id": "001",
"title": "在上海阳台种菜一年,我收获了啥?",
"field": "自然 / 生活",
"format": "实操指南 + 个人故事",
"word_count": "2500",
"core_concept": "城市农业不仅是种菜,更是与自然重建连接的生活方式",
"audience_pain": "- 想体验田园生活但没条件去农村",
"unique_angle": "- 不鼓吹\"田园牧歌\",客观展示失败和踩坑",
"data_cases": [
"1. 上海阳台种植调研报告(找本地社区数据)",
"2. 不同蔬菜的生长周期和产量数据(农业网站)"
],
"estimated_days": "4天",
"priority": "高",
"priority_score": 10,
"publish_date": "2026-04-15",
"status": "已发布",
"evaluation": {
"受众覆盖": 8,
"独特性": 9,
"数据可得性": 8,
"可持续性": 7,
"平台契合度": 9,
"品牌契合度": 10,
"总分": 51
},
"total_score": 51,
"cases": [],
"source_file": "001-上海阳台种菜一年.md",
"created_at": "2026-04-16T07:52:48.754855",
"published_date": "2026-04-16"
},
{
"id": "002",
"title": "AI时代,什么能力不会被替代?",
"field": "科技 / 职场",
"format": "趋势洞察 + 实操建议",
"word_count": "2800",
"core_concept": "AI淘汰的不是工作,而是不会使用AI的人;但有些\"人类特质\"能力反而更珍贵",
"audience_pain": "- 担心被AI替代,职业焦虑严重",
"unique_angle": "- 区分配\"被AI强化的能力\"和\"AI无法替代的能力\"",
"data_cases": [
"1. 世界经济论坛《未来就业报告》技能趋势数据",
"2. 美国劳工统计局职业自动化概率研究"
],
"estimated_days": "5天",
"priority": "高",
"priority_score": 10,
"publish_date": "2026-04-18",
"status": "待处理",
"evaluation": {
"受众覆盖": 9,
"独特性": 8,
"数据可得性": 9,
"平台契合度": 9,
"品牌契合度": 10,
"总分": 53
},
"total_score": 53,
"cases": [],
"source_file": "002-AI时代什么能力不会被替代.md",
"created_at": "2026-04-16T07:52:48.755025"
},
{
"id": "003",
"title": "从程序员到数字游民:我的三年转型之路",
"field": "工作 / 职场",
"format": "个人故事 + 实操指南",
"word_count": "2600",
"core_concept": "数字游民不是逃离,而是更聪明的工作生活方式选择",
"audience_pain": "- 受够了996,想自由但不敢行动",
"unique_angle": "- 不美化\"边玩边赚\",客观展示挑战和代价",
"data_cases": [
"1. 数字游民调研报告(人数、收入、职业分布)",
"2. 不同国家的签证政策和生活成本对比(数字游民签证国家)"
],
"estimated_days": "5天",
"priority": "高",
"priority_score": 10,
"publish_date": "2026-04-20",
"status": "待处理",
"evaluation": {
"受众覆盖": 9,
"独特性": 8,
"数据可得性": 8,
"可持续性": 9,
"平台契合度": 9,
"品牌契合度": 10,
"总分": 53
},
"total_score": 53,
"cases": [],
"source_file": "003-数字游民这一年.md",
"created_at": "2026-04-16T07:52:48.755167"
},
{
"id": "004",
"title": "零浪费生活一年:一个家庭产生的垃圾去哪儿了?",
"field": "自然 / 生活",
"format": "实验记录 + 科普指南",
"word_count": "2300",
"core_concept": "零浪费不是苦行,而是更聪明的消费选择;个人行动虽小,但能改变系统",
"audience_pain": "- 想环保但不知道从何下手",
"unique_angle": "- 不道德绑架,用数据和成本说服",
"data_cases": [
"1. 中国城市生活垃圾产生量数据(统计年鉴)",
"2. 不同包装方式的碳足迹对比(生产、运输、处理)"
],
"estimated_days": "4天",
"priority": "高",
"priority_score": 10,
"publish_date": "2026-04-22",
"status": "待处理",
"evaluation": {
"受众覆盖": 8,
"独特性": 9,
"数据可得性": 8,
"可持续性": 8,
"平台契合度": 8,
"品牌契合度": 10,
"总分": 51
},
"total_score": 51,
"cases": [],
"source_file": "004-零浪费生活一年实验.md",
"created_at": "2026-04-16T07:52:48.755315"
},
{
"id": "005",
"title": "深度工作实践:如何在干扰世界中保持专注",
"field": "工作 / 生产力",
"format": "实操指南 + 个人实验",
"word_count": "2400",
"core_concept": "专注力是新时代最稀缺的资源,通过系统方法可以重建深度工作能力",
"audience_pain": "- 每天忙碌但没产出,时间碎片化",
"unique_angle": "- 不鸡汤,用实验数据和自我追踪说话",
"data_cases": [
"1. Cal Newport《深度工作》理论体系",
"2. 注意力恢复理论(Attention Restoration Theory"
],
"estimated_days": "4天",
"priority": "高",
"priority_score": 10,
"publish_date": "2026-04-23",
"status": "待处理",
"evaluation": {
"受众覆盖": 9,
"独特性": 7,
"数据可得性": 9,
"可持续性": 8,
"平台契合度": 9,
"品牌契合度": 8,
"总分": 50
},
"total_score": 50,
"cases": [],
"source_file": "005-深度工作实践.md",
"created_at": "2026-04-16T07:52:48.755469"
},
{
"id": "006",
"title": "副业月入过万:我一个程序员的三年探索之路",
"field": "工作 / 副业",
"format": "实操经验 + 方法论总结",
"word_count": "2700",
"core_concept": "副业不是投机,而是将主业技能产品化、多元化的过程",
"audience_pain": "- 工资不够花,想搞钱但不知道从哪开始",
"unique_angle": "- 从技术人视角(程序员)看副业选项,但方法论通用",
"data_cases": [
"1. 中国职场人副业调研报告(参与率、收入分布)",
"2. 程序员技能变现渠道对比(外包、咨询、产品、内容)"
],
"estimated_days": "5天",
"priority": "高",
"priority_score": 10,
"publish_date": "2026-04-25",
"status": "待处理",
"evaluation": {
"受众覆盖": 9,
"独特性": 7,
"数据可得性": 9,
"可持续性": 9,
"平台契合度": 9,
"品牌契合度": 9,
"总分": 52
},
"total_score": 52,
"cases": [],
"source_file": "006-副业月入过万.md",
"created_at": "2026-04-16T07:52:48.755650"
},
{
"id": "007",
"title": "正念冥想一年:从焦虑到平静的转变",
"field": "人文 / 心理健康",
"format": "个人实验 + 科学解读",
"word_count": "2200",
"core_concept": "冥想不是玄学,是可训练的大脑肌肉;一年练习带来可测量的认知和情绪变化",
"audience_pain": "- 焦虑、失眠、注意力不集中",
"unique_angle": "- 用科学家态度做自我实验(追踪数据、前后对比)",
"data_cases": [
"1. 冥想改变大脑结构的研究(灰质增加、杏仁核缩小)",
"2. 压力激素(皮质醇)水平变化数据"
],
"estimated_days": "4天",
"priority": "中",
"priority_score": 7,
"publish_date": "2026-04-27",
"status": "待处理",
"evaluation": {
"受众覆盖": 8,
"独特性": 8,
"数据可得性": 8,
"可持续性": 7,
"平台契合度": 8,
"品牌契合度": 9,
"总分": 48
},
"total_score": 48,
"cases": [],
"source_file": "007-正念冥想一年变化.md",
"created_at": "2026-04-16T07:52:48.755802"
},
{
"id": "008",
"title": "极简3年:我从囤积症到少物生活的转变",
"field": "人文 / 生活方式",
"format": "个人转变故事 + 实操指南",
"word_count": "2500",
"core_concept": "极简不是扔东西,而是重新定义\"足够\";通过减少物质,增加精神丰盈",
"audience_pain": "- 家里东西越来越多,整理完很快又乱",
"unique_angle": "- 从囤积症患者到极简主义者的真实转变(有心理过程)",
"data_cases": [
"1. 极简主义创始人(Joshua & Ryan)理念和实践",
"2. 物品生命周期研究(平均使用次数、浪费数据)"
],
"estimated_days": "4天",
"priority": "中",
"priority_score": 7,
"publish_date": "2026-04-29",
"status": "待处理",
"evaluation": {
"受众覆盖": 8,
"独特性": 8,
"数据可得性": 8,
"可持续性": 8,
"平台契合度": 8,
"品牌契合度": 10,
"总分": 50
},
"total_score": 50,
"cases": [],
"source_file": "008-极简3年我学会了.md",
"created_at": "2026-04-16T07:52:48.755960"
},
{
"id": "009",
"title": "城市观鸟指南:如何在水泥森林发现 biodiversity",
"field": "自然 / 科普",
"format": "实操指南 + 城市生态观察",
"word_count": "2000",
"core_concept": "自然不在远方,就在身边;城市也是wildlife的栖息地,学会观察能提升生活幸福感",
"audience_pain": "- 想接触自然但没时间去郊外",
"unique_angle": "- 城市观鸟入门,从\"完全小白\"到\"常见鸟达人\"",
"data_cases": [
"1. 城市生物多样性调研报告(中国的城市化与野生动物)",
"2. 常见城市鸟类图鉴(种类、特征、习性)"
],
"estimated_days": "3天",
"priority": "中",
"priority_score": 7,
"publish_date": "2026-05-01",
"status": "待处理",
"evaluation": {
"受众覆盖": 7,
"独特性": 9,
"数据可得性": 8,
"可持续性": 9,
"平台契合度": 8,
"品牌契合度": 10,
"总分": 51
},
"total_score": 51,
"cases": [],
"source_file": "009-城市观鸟指南.md",
"created_at": "2026-04-16T07:52:48.756111"
},
{
"id": "010",
"title": "个人知识管理系统(PKM)实践:我用一年搭建的第二大脑",
"field": "工作 / 生产力",
"format": "实操教程 + 系统设计",
"word_count": "2800",
"core_concept": "信息时代,会学习不如会管理知识;一个适合自己的PKM系统能释放认知带宽,提升创造力和决策质量",
"audience_pain": "- 收藏无数,但从未回看(收藏夹吃灰)",
"unique_angle": "- 不推销特定工具,强调方法论+适合自己的选择",
"data_cases": [
"1. PKM方法论(Zettelkasten、PARA、CODE等)",
"2. 工具对比研究(Notion、Obsidian、Roam、Logseq、飞书、Notability"
],
"estimated_days": "5天",
"priority": "中",
"priority_score": 7,
"publish_date": "2026-05-03",
"status": "待处理",
"evaluation": {
"受众覆盖": 8,
"独特性": 8,
"数据可得性": 9,
"可持续性": 9,
"平台契合度": 9,
"品牌契合度": 9,
"总分": 52
},
"total_score": 52,
"cases": [],
"source_file": "010-PKM实践.md",
"created_at": "2026-04-16T07:52:48.756300"
}
]
@@ -0,0 +1,392 @@
[
{
"id": "A01",
"title": "远程工作2026中国指南:从'不可能'到'可行'的路径图",
"field": "未来工作方式",
"format": "趋势洞察 + 实操指南",
"core_concept": "通过法律实操(合同、社保、个税)和心理建设(孤独应对),在中国环境下实现远程工作",
"audience_pain": "想远程但不知如何合法操作,担心被边缘化",
"unique_angle": "对比GitLab/Zapier海外实践,本土化落地策略",
"priority": "高",
"priority_score": 10,
"total_score": 53,
"status": "待发布",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436643",
"ready_at": "2026-04-18",
"compliance_score": 100,
"lock_by": null,
"lock_at": null,
"platform_urls": {},
"published_at": null
},
{
"id": "A02",
"title": "AI副业入门:用DeepSeek实现第一笔收入的100天",
"field": "未来工作方式",
"format": "实操指南 + 案例研究",
"core_concept": "从代写文案/数据分析起步,通过Fiverr国内外平台对比,制定定价策略和违规红线规避",
"audience_pain": "想用AI赚钱但不知从何开始,怕踩坑",
"unique_angle": "对比Fiverr海外繁荣 vs 国内空白,提供本土化接单路径",
"priority": "高",
"priority_score": 10,
"total_score": 52,
"status": "待发布",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436654",
"ready_at": "2026-04-19",
"compliance_score": 100,
"lock_by": null,
"lock_at": null
},
{
"id": "A03",
"title": "数字游民签证全解析:30个国家政策对比,中国护照能去哪些?",
"field": "未来工作方式",
"format": "对比分析 + 实操指南",
"core_concept": "分析爱沙尼亚/葡萄牙/巴厘岛等30国游民签证,结合中国护照限制,给出签证+保险+税务+社群的完整路线",
"audience_pain": "想地理套利但被签证和社保困扰",
"unique_angle": "不是简单列出签证,而是给出中国护照持有者的可行组合方案(如泰国+大马+巴厘岛)",
"priority": "高",
"priority_score": 10,
"total_score": 51,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436656",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "A04",
"title": "一人公司实验:从创意到营收的365天日志",
"field": "未来工作方式",
"format": "实践日志 + 方法论",
"core_concept": "基于Indie Hackers案例,结合中国孤独创业现状,提供MVP设计、现金流管理、法律合规的一站式指南",
"audience_pain": "想单干但怕失败、缺启动资金、不懂营销",
"unique_angle": "真实日志形式,展示完整从0到营收的过程,不美化",
"priority": "高",
"priority_score": 10,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436658",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "A05",
"title": "AI时代的技能组合:什么技能值得投入10年?",
"field": "未来工作方式",
"format": "趋势分析 + 个人规划",
"core_concept": "基于WEF未来技能报告,划分4个技能维度(AI强化型、AI无法替代、复合型、过时型),帮中国职场人识别护城河技能",
"audience_pain": "学什么都不放心,怕投入时间后AI又取代",
"unique_angle": "将全球宏观报告转化为个人技能地图,提供可视化工具",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436660",
"ready_at": "2026-04-17",
"compliance_score": 100
},
{
"id": "B01",
"title": "城市农业ROI报告:20㎡阳台种菜一年,省了多少钱?",
"field": "可持续生活系统",
"format": "数据分析 + 实操指南",
"core_concept": "对比东京垂直农场与国内空间限制,精选高ROI蔬菜品种,智能设备自动灌溉,给出详细成本核算和品种推荐",
"audience_pain": "想种但怕麻烦、怕亏本、不知道种什么",
"unique_angle": "用财务思维算账(投入/产出/时间成本),打破'种菜必须有地'的思维",
"priority": "高",
"priority_score": 10,
"total_score": 52,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436665",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "B02",
"title": "零浪费家庭实验:一年只产100L垃圾,可能吗?",
"field": "可持续生活系统",
"format": "实践实验 + 方法论",
"core_concept": "对比瑞典零浪费城市,针对中国垃圾分类困境,提供垃圾追踪表、替代方案数据库、社区互助网络",
"audience_pain": "想环保但觉得做不到、不知道从哪减",
"unique_angle": "极限实验(100L/年)+ 可执行步骤(从塑料减量开始),不理想化",
"priority": "高",
"priority_score": 10,
"total_score": 51,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436667",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "B03",
"title": "低碳生活账单:用3年省了8万,碳足迹降了60%",
"field": "可持续生活系统",
"format": "数据分析 + 案例研究",
"core_concept": "对比欧洲碳税政策,从交通(电动车+共享)、饮食(植物为主)、消费(二手优先)三个维度,展示真实账单变化",
"audience_pain": "觉得低碳=更贵,不敢尝试",
"unique_angle": "用财务数据说话(省8万),打破'环保=烧钱'误解",
"priority": "高",
"priority_score": 10,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436669",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "B04",
"title": "循环消费实战:10件物品,用3年省了2万",
"field": "可持续生活系统",
"format": "实操指南 + 案例清单",
"core_concept": "对比法国二手强制法与中国闲鱼文化,提供购买决策树(买新/二手/租)、延长寿命技巧、转卖策略",
"audience_pain": "想买二手但怕质量差、怕麻烦",
"unique_angle": "10件物品的具体交易记录和对比(手机、相机、家具等),可复制",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436671",
"ready_at": "2026-04-17",
"compliance_score": 100
},
{
"id": "B05",
"title": "社区菜园指南:如何推动小区5户邻居共建共享",
"field": "可持续生活系统",
"format": "方法论 + 实操步骤",
"core_concept": "对比纽约社区花园政策与中国物业协调难题,提供法律风险(物权)、利益分配机制、技术方案(分区+智能)",
"audience_pain": "想组织但怕纠纷、不懂法律、协调不了邻居",
"unique_angle": "从1个友好小区试点开始,成功后复制,降低风险",
"priority": "高",
"priority_score": 10,
"total_score": 49,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436673",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "C01",
"title": "第二大脑2.0:用DeepSeek+本地向量库建立私有知识系统",
"field": "个人知识工厂",
"format": "技术指南 + 实操案例",
"core_concept": "对比Obsidian+RAG海外实践,针对国内云服务担忧,提供数据主权、隐私保护、无缝检索、AI问答的本地化方案",
"audience_pain": "想系统化知识但担心云存储安全,怕复杂",
"unique_angle": "强调数据主权,从API调用到本地部署的渐进路线",
"priority": "中",
"priority_score": 7,
"total_score": 52,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436675",
"ready_at": "2026-04-18",
"compliance_score": 100
},
{
"id": "C02",
"title": "PKM极简实践:PARA系统在Notion上的落地模板",
"field": "个人知识工厂",
"format": "模板分享 + 方法论",
"core_concept": "将Tiago Forte的PARA体系简化为3个核心文件夹,每周10分钟维护,AI辅助整理,让中国人真正用起来",
"audience_pain": "学了方法坚持不了,工具复杂难上手",
"unique_angle": "极简版(4个区)+ 每日5分钟习惯养成,降低门槛",
"priority": "中",
"priority_score": 7,
"total_score": 51,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436677"
},
{
"id": "C03",
"title": "费曼学习法AI增强:如何让AI帮你'教'懂一个概念",
"field": "个人知识工厂",
"format": "方法论 + 实践工具",
"core_concept": "结合经典费曼技巧与AI工具,三步法(AI简化→自我复述→Gap识别)+ 输出倒逼输入",
"audience_pain": "学东西记不住,自以为懂了但其实不会",
"unique_angle": "用AI当'测试官',验证你的理解深度,非被动接受知识",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436679"
},
{
"id": "C04",
"title": "AI个人助理搭建:从ChatGPT到私有化部署的完整路线",
"field": "个人知识工厂",
"format": "技术路线图 + 成本分析",
"core_concept": "基于海外个人AI助手普及现状,针对国内数据安全顾虑,提供从API调用到本地部署的渐进式方案(成本可控)",
"audience_pain": "想用AI助手但又怕数据泄露,不知如何起步",
"unique_angle": "不是直接推本地部署(成本高),而是API优先,敏感时再本地策略",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436680"
},
{
"id": "C05",
"title": "技能树可视化:用思维导图规划5年职业路径",
"field": "个人知识工厂",
"format": "方法论 + 工具模板",
"core_concept": "借鉴化工业界能力模型,构建硬技能×软技能矩阵,行业对标和学习资源聚合,让职业成长可规划",
"audience_pain": "不知道学什么,学了不知道用在哪,职业迷茫",
"unique_angle": "技能树而非技能列表,展示技能间关联和成长路径",
"priority": "中",
"priority_score": 7,
"total_score": 49,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436682"
},
{
"id": "D01",
"title": "AI伦理实践指南:开发者在中国的合规清单",
"field": "科技人文交叉",
"format": "合规指南 + 案例分析",
"core_concept": "对比EU AI Act与中国算法推荐管理规定,提供数据隐私、歧视检测、透明度义务、备案流程的自查清单",
"audience_pain": "开发者不了解国内AI伦理法规,怕踩雷",
"unique_angle": "不是泛泛而谈伦理,而是具体到'备案流程'和'自查表',即拿即用",
"priority": "高",
"priority_score": 10,
"total_score": 51,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436687",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "D02",
"title": "数字排毒月:戒掉微信/抖音后,生活发生了什么",
"field": "科技人文交叉",
"format": "实践实验 + 效果分析",
"core_concept": "对比硅谷禅修热与中国'失联恐惧',采用渐进式戒断(无屏时段)+ 替代活动 + 社交边界管理",
"audience_pain": "想减少屏幕时间但又怕错过重要信息,自律困难",
"unique_angle": "真实实验记录(not理论),展示戒断前后的生活变化数据",
"priority": "中",
"priority_score": 7,
"total_score": 50,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436689"
},
{
"id": "D03",
"title": "银发科技报告:给爸妈装智能设备,学到的5个设计原则",
"field": "科技人文交叉",
"format": "设计原则 + 案例",
"core_concept": "对比日本适老化设计与国产'适老模式'鸡肋,提炼简化选项、物理反馈、容错设计、情感连接的具体方案",
"audience_pain": "给父母买智能设备但他们不用,功能复杂",
"unique_angle": "不是推荐产品,而是总结5个设计原则,让读者自己改造设备",
"priority": "中",
"priority_score": 7,
"total_score": 49,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436690"
},
{
"id": "D04",
"title": "儿童数字素养课:10岁儿子的AI启蒙12周",
"field": "科技人文交叉",
"format": "教育日志 + 方法论",
"core_concept": "对比芬兰AI教育与国内家长'禁止接触'心态,通过每周1次'AI家庭时间',培养批判性思维和创造力",
"audience_pain": "不知如何让孩子正确认识AI,怕沉迷又怕脱节",
"unique_angle": "真实父子12周项目记录,提供可复制的课程大纲",
"priority": "中",
"priority_score": 7,
"total_score": 48,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436692"
},
{
"id": "D05",
"title": "科技与自然共生:如何用AI让阳台农场更'自然'",
"field": "科技人文交叉",
"format": "理念 + 实操方案",
"core_concept": "对比荷兰智能温室与中国人'回归原始'误区,实现技术隐形化(传感器+提醒)+ 自然反馈闭环 + 人工仪式感",
"audience_pain": "想用科技但又怕失去'自然感',追求矛盾",
"unique_angle": "技术与情感连接的平衡方案,AI只做幕后,人工保留仪式",
"priority": "高",
"priority_score": 10,
"total_score": 48,
"status": "待处理",
"cases": [],
"source_file": "strategy/全球-本土比较研究与全新内容战略规划-2026-04-15.md",
"created_at": "2026-04-16T09:42:54.436694",
"ready_at": "2026-04-16",
"compliance_score": 100
},
{
"id": "TOPIC-.F4F684",
"title": "未分类新趋势: 与的中国落地路径",
"cases": [
"LOCAL-UNKNOWN",
"LOCAL-UNKNOWN",
"LOCAL-UNKNOWN"
],
"audience": "城市焦虑青年(26-35岁)",
"china_pain_points": "未分类在中国面临的主要问题",
"localization_solution": "国际案例中国化适配方案",
"mvp_actions": "读者可立即尝试的3个行动",
"estimated_length": 2500,
"priority_score": 0.78,
"status": "待处理",
"lock_by": null,
"lock_at": null,
"created_at": "2026-04-18T18:26:25.984697"
},
{
"id": "TOPIC-.285EC9",
"title": "未分类新趋势: 与的中国落地路径",
"cases": [
"LOCAL-UNKNOWN",
"LOCAL-UNKNOWN",
"LOCAL-UNKNOWN"
],
"audience": "城市焦虑青年(26-35岁)",
"china_pain_points": "未分类在中国面临的主要问题",
"localization_solution": "国际案例中国化适配方案",
"mvp_actions": "读者可立即尝试的3个行动",
"estimated_length": 2500,
"priority_score": 0.78,
"status": "待处理",
"lock_by": null,
"lock_at": null,
"created_at": "2026-04-19T05:00:54.473396"
}
]
+81
View File
@@ -0,0 +1,81 @@
// 微信公众号编辑器自动填充脚本
// 用法: node fill_wechat_editor.js <markdown_file> <images_dir>
// 连接: chrome://inspect 或通过 agent-browser 转发
const fs = require('fs');
const http = require('http');
const [, , markdownFile, imagesDir] = process.argv;
if (!markdownFile || !imagesDir) {
console.error('用法: node fill_wechat_editor.js <markdown_file> <images_dir>');
process.exit(1);
}
const title = fs.readFileSync(markdownFile, 'utf8').split('\n')[0].replace(/^#\s+/, '');
const body = fs.readFileSync(markdownFile, 'utf8')
.split('\n')
.slice(1)
.join('\n')
.replace(/\n\n+/g, '\n\n');
const coverImg = `${imagesDir}/05-封面图.png`;
// 微信公众号编辑器核心:获取 contenteditable 区域
const FILL_SCRIPT = `
(function() {
// 1. 查找标题输入框
const titleInput = document.querySelector('.rich_media_title input[type="text"], input[placeholder*="标题"], [data-role="title"]');
if (!titleInput) return { error: '未找到标题输入框' };
// 2. 查找正文编辑器(多个可能)
const editors = [
document.querySelector('.rich_media_content [contenteditable="true"]'),
document.querySelector('[data-role="editor"]'),
document.querySelector('.editor'),
document.querySelector('#js_content'),
document.querySelector('.weui-desktop-editor__editable')
].filter(el => el);
if (editors.length === 0) return { error: '未找到正文编辑器' };
// 3. 填充标题
titleInput.focus();
titleInput.value = '';
titleInput.dispatchEvent(new Event('input', { bubbles: true }));
// 4. 填充正文
const editor = editors[0];
editor.focus();
editor.innerHTML = '';
// 按段落分割,生成带换行的HTML
const paragraphs = \`${body}\`.split('\\n\\n').map(p => `<p>${p.replace(/\\n/g, '<br>')}</p>`).join('');
editor.innerHTML = paragraphs;
// 5. 上传封面图(如果有)
if (${fs.existsSync(coverImg)}) {
// 查找图片上传按钮
const imgBtn = document.querySelector('[data-role="image"], .weui-desktop-editor__tool-img, button[title*="图片"]');
if (imgBtn) {
imgBtn.click();
// 等待文件选择器
setTimeout(() => {
const fileInput = document.querySelector('input[type="file"]');
if (fileInput) {
// 创建 DataTransfer 模拟文件选择
const file = new File([''], '${coverImg.split('/').pop()}', { type: 'image/png' });
const dt = new DataTransfer();
dt.items.add(file);
fileInput.files = dt.files;
fileInput.dispatchEvent(new Event('change', { bubbles: true }));
}
}, 500);
}
}
return { success: true, title: \`${title}\` };
})();
`;
console.log('等待连接...');
console.log('请在 VNC 中打开编辑器后,运行:');
console.log(' agent-browser --cdp 9222 eval \'' + FILL_SCRIPT.replace(/\n/g, ' ') + '\'');
+139
View File
@@ -0,0 +1,139 @@
#!/bin/bash
# 微信公众号编辑器填充 - xdotool纯操作版(最稳定)
# 前置:VNC中已打开编辑器,窗口标题包含"公众号"
set -e
PROJECT_ROOT="/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran"
MARKDOWN_FILE="$PROJECT_ROOT/content/drafts/001-wechat.md"
COVER_IMG="$PROJECT_ROOT/content/publishing/images/05-封面图.png"
# 检查文件
[ -f "$MARKDOWN_FILE" ] || { echo "错误: $MARKDOWN_FILE 不存在"; exit 1; }
[ -f "$COVER_IMG" ] || { echo "警告: 封面图不存在 $COVER_IMG"; }
# 获取文章内容
ARTICLE_TITLE=$(head -1 "$MARKDOWN_FILE" | sed 's/^# //')
ARTICLE_BODY=$(sed '1d;$d' "$MARKDOWN_FILE")
echo "=========================================="
echo "微信公众号编辑器填充(xdotool版)"
echo "=========================================="
echo "标题: $ARTICLE_TITLE"
echo "正文长度: $(echo "$ARTICLE_BODY" | wc -l)"
echo "封面: $COVER_IMG"
echo ""
echo "⚠️ 确保:"
echo " 1. VNC桌面已打开(http://10.2.0.14:6080/vnc.html"
echo " 2. 编辑器窗口已激活(点击一下编辑器区域)"
echo " 3. 编辑器是当前活动窗口"
echo ""
echo "3秒后开始..."
sleep 3
export DISPLAY=:0
# 查找编辑器窗口
echo "查找编辑器窗口..."
WIN_ID=$(xdotool search --name "公众号" | head -1)
if [ -z "$WIN_ID" ]; then
echo "❌ 未找到标题包含'公众号'的窗口"
echo "请确保编辑器窗口已打开并激活"
exit 1
fi
echo "✓ 找到窗口 ID: $WIN_ID"
# 激活窗口
xdotool windowactivate "$WIN_ID"
sleep 1
# 确保在编辑器内(点一下)
xdotool click 1
sleep 0.5
# Ctrl+A 全选并删除(清空可能存在的默认文本)
xdotool key ctrl+a
sleep 0.3
xdotool key Delete
sleep 0.5
# 输入标题
echo "输入标题..."
echo -n "$ARTICLE_TITLE" | xclip -selection clipboard
xdotool key ctrl+v
sleep 1
# 按 Tab 键移动到正文区域
echo "切换到正文..."
xdotool key Tab
sleep 0.5
# 可能还需要再按一次 Tab(取决于编辑器结构)
xdotool key Tab
sleep 0.5
# 全选正文区并清空
xdotool key ctrl+a
sleep 0.3
xdotool key Delete
sleep 0.5
# 粘贴正文(分段粘贴避免缓冲区溢出)
echo "粘贴正文(分段)..."
echo "$ARTICLE_BODY" | fold -s -w 100 | while IFS= read -r line; do
[ -z "$line" ] && continue
echo -n "$line" | xclip -selection clipboard
xdotool key ctrl+v
xdotool key Return
sleep 0.1
done
sleep 1
# 上传封面图
echo "上传封面图(手动确认)..."
echo "请手动:"
echo " 1. 点击编辑器工具栏的图片按钮(🖼️)"
echo " 2. 选择 '上传图片' 或 '本地上传'"
echo " 3. 文件路径: $COVER_IMG"
echo ""
echo "脚本暂停30秒,请完成上传..."
sleep 30
# 截图(已安装 scrot 或 import?)
SCREENSHOT_DIR="$PROJECT_ROOT/content/published/$(date +%Y-%m-%d)-wechat-draft"
mkdir -p "$SCREENSHOT_DIR"
if command -v scrot &>/dev/null; then
scrot "$SCREENSHOT_DIR/screenshot.png" 2>/dev/null && echo "截图: $SCREENSHOT_DIR/screenshot.png"
elif command -v import &>/dev/null; then
import -window "$WIN_ID" "$SCREENSHOT_DIR/screenshot.png" 2>/dev/null && echo "截图: $SCREENSHOT_DIR/screenshot.png"
else
echo "⚠️ 未找到截图工具,请手动截图保存到 $SCREENSHOT_DIR/"
fi
# 创建元数据
cat > "$SCREENSHOT_DIR/metadata.json" <<EOF
{
"title": "$ARTICLE_TITLE",
"markdown_file": "$MARKDOWN_FILE",
"cover_image": "$COVER_IMG",
"created_at": "$(date -Iseconds)",
"status": "draft",
"auto_filled": true,
"notes": "标题和正文已通过xdotool自动填充,封面图已手动上传到正文开头。请手动:1. 点击编辑器右侧'从正文选择'设置封面 2. 填写摘要和标签 3. 保存草稿"
}
EOF
echo "元数据: $SCREENSHOT_DIR/metadata.json"
echo ""
echo "=========================================="
echo "✅ 自动填充完成!"
echo "=========================================="
echo "剩余步骤(手动):"
echo " 1. 编辑器右侧 → 点击'从正文选择' → 选第一张图"
echo " 2. 填写摘要(150字内)"
echo " 3. 添加标签:阳台种菜,城市农业,种植,园艺"
echo " 4. 声明原创(如需)"
echo " 5. 保存草稿或发表"
echo ""
echo "编辑器窗口 ID: $WIN_ID"
echo "=========================================="
+138
View File
@@ -0,0 +1,138 @@
#!/usr/bin/env python3
"""
将 Markdown 文章转换为 Word 文档,嵌入图片
"""
import os
import re
from docx import Document
from docx.shared import Inches, Pt, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
# 路径配置
MARKDOWN_FILE = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年/final-article.md"
IMAGES_DIR = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/publishing/images"
OUTPUT_DOCX = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年/上海阳台种菜一年_最终版.docx"
# 读取 Markdown
with open(MARKDOWN_FILE, "r", encoding="utf-8") as f:
lines = f.readlines()
doc = Document()
doc.styles['Normal'].font.name = '微软雅黑'
doc.styles['Normal'].font.size = Pt(11)
# 样式函数
def add_heading(text, level=1):
heading = doc.add_heading(text, level=level)
heading.alignment = WD_ALIGN_PARAGRAPH.LEFT
return heading
def add_paragraph(text, bold=False, italic=False):
p = doc.add_paragraph()
run = p.add_run(text)
run.bold = bold
run.italic = italic
return p
# 解析 Markdown
in_code_block = False
in_table = False
table_data = []
for i, line in enumerate(lines):
line = line.rstrip('\n')
# 代码块跳过
if line.startswith('```'):
in_code_block = not in_code_block
continue
if in_code_block:
continue
# 标题
if line.startswith('# '):
add_heading(line[2:], level=1)
continue
if line.startswith('## '):
add_heading(line[3:], level=2)
continue
if line.startswith('### '):
add_heading(line[4:], level=3)
continue
# 表格处理(简化:将表格转为文本,图片位置用占位)
if line.startswith('|'):
in_table = True
table_data.append(line)
continue
if in_table and not line.startswith('|'):
in_table = False
# 可以在此转换表格,为简化直接跳过
continue
# 图片:![alt](path)
img_match = re.match(r'!\[(.*?)\]\((images/.*?)\)', line)
if img_match:
alt, path = img_match.groups()
img_full_path = os.path.join(os.path.dirname(MARKDOWN_FILE), path)
if os.path.exists(img_full_path):
try:
# 插入图片,宽度 6 英寸(约 15cm)
doc.add_picture(img_full_path, width=Inches(6))
# 居中
last_para = doc.paragraphs[-1]
last_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
# 添加图片说明(可选)
if alt:
cap = doc.add_paragraph(alt)
cap.alignment = WD_ALIGN_PARAGRAPH.CENTER
cap.style = 'Caption'
except Exception as e:
doc.add_paragraph(f"[图片加载失败: {path}]")
else:
doc.add_paragraph(f"[图片缺失: {img_full_path}]")
continue
# 引用
if line.startswith('> '):
p = doc.add_paragraph(line[2:])
p.paragraph_format.left_indent = Inches(0.5)
p.italic = True
continue
# 列表
if re.match(r'^[-*] ', line):
p = doc.add_paragraph(line[2:], style='List Bullet')
continue
if re.match(r'^\d+\. ', line):
p = doc.add_paragraph(line[line.find('.')+2:], style='List Number')
continue
# 分隔线
if line.strip() == '---':
doc.add_paragraph('_' * 50)
continue
# 普通段落
if line.strip():
# 处理行内加粗、斜体
p = doc.add_paragraph()
parts = re.split(r'(\*\*[^*]+\*\*|\*[^*]+\*)', line)
for part in parts:
if part.startswith('**') and part.endswith('**'):
run = p.add_run(part[2:-2])
run.bold = True
elif part.startswith('*') and part.endswith('*'):
run = p.add_run(part[1:-1])
run.italic = True
else:
run = p.add_run(part)
else:
doc.add_paragraph() # 空行
# 保存文档
doc.save(OUTPUT_DOCX)
print(f"✅ Word 文档已生成: {OUTPUT_DOCX}")
print(f"📄 页数: {len(doc.paragraphs)} 段落")
print(f"🖼️ 图片路径: {IMAGES_DIR}")
+93
View File
@@ -0,0 +1,93 @@
#!/usr/bin/env python3
"""
生成 Word 文档,图片从发布目录的 images 文件夹读取
"""
import os
from docx import Document
from docx.shared import Inches, Pt
from docx.enum.text import WD_ALIGN_PARAGRAPH
BASE_DIR = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年"
MD_FILE = os.path.join(BASE_DIR, "final-article.md")
IMAGES_DIR = os.path.join(BASE_DIR, "images") # 已复制的图片
OUTPUT_DOCX = os.path.join(BASE_DIR, "上海阳台种菜一年_最终版.docx")
with open(MD_FILE, "r", encoding="utf-8") as f:
lines = f.readlines()
doc = Document()
doc.styles['Normal'].font.name = '微软雅黑'
doc.styles['Normal'].font.size = Pt(11)
def add_heading(text, level=1):
heading = doc.add_heading(text, level=level)
heading.alignment = WD_ALIGN_PARAGRAPH.LEFT
return heading
for line in lines:
line = line.rstrip('\n')
if line.startswith('# '):
add_heading(line[2:], level=1)
continue
if line.startswith('## '):
add_heading(line[3:], level=2)
continue
if line.startswith('### '):
add_heading(line[4:], level=3)
continue
if line.startswith('---'):
doc.add_paragraph('_' * 60)
continue
# 图片
if line.startswith('!['):
import re
m = re.match(r'!\[(.*?)\]\((images/.*?)\)', line)
if m:
alt, fname = m.groups()
img_path = os.path.join(IMAGES_DIR, os.path.basename(fname))
if os.path.exists(img_path):
try:
doc.add_picture(img_path, width=Inches(6))
last_para = doc.paragraphs[-1]
last_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
except Exception as e:
doc.add_paragraph(f"[图片错误: {fname}]")
else:
doc.add_paragraph(f"[缺失图片: {fname}]")
continue
# 空行
if not line.strip():
doc.add_paragraph()
continue
# 普通段落,处理粗体斜体
p = doc.add_paragraph()
parts = []
tmp = line
while '**' in tmp:
parts.append(tmp[:tmp.find('**')])
tmp = tmp[tmp.find('**')+2:]
if '**' in tmp:
parts.append(('bold', tmp[:tmp.find('**')]))
tmp = tmp[tmp.find('**')+2:]
else:
parts.append(('bold', tmp))
break
if not parts:
parts = [line]
for part in parts:
if isinstance(part, tuple):
style, text = part
run = p.add_run(text)
run.bold = (style == 'bold')
else:
p.add_run(part)
doc.save(OUTPUT_DOCX)
print(f"✅ Word 已生成: {OUTPUT_DOCX}")
print(f"📄 段落数: {len(doc.paragraphs)}")
+74
View File
@@ -0,0 +1,74 @@
#!/usr/bin/env python3
"""
生成 HTML,图片使用相对路径 'images/xxx.png'(确保图片在发布目录的 images 子文件夹中)
"""
import os
import re
BASE_DIR = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年"
MD_FILE = os.path.join(BASE_DIR, "final-article.md")
OUT_HTML = os.path.join(BASE_DIR, "上海阳台种菜一年_可复制.html")
with open(MD_FILE, "r", encoding="utf-8") as f:
content = f.read()
# 替换图片为 HTML img 标签,保持相对路径
def replace_img(match):
alt, path = match.groups()
return f'<img src="{path}" alt="{alt}" style="max-width:100%; margin:20px 0; display:block;">'
content = re.sub(r'!\[(.*?)\]\((images/.*?)\)', replace_img, content)
# 转换 Markdown 为 HTML
html_lines = []
for line in content.split('\n'):
if line.startswith('# '):
html_lines.append(f'<h1>{line[2:]}</h1>')
elif line.startswith('## '):
html_lines.append(f'<h2>{line[3:]}</h2>')
elif line.startswith('### '):
html_lines.append(f'<h3>{line[4:]}</h3>')
elif line.startswith('---'):
html_lines.append('<hr style="border:none;border-top:2px dashed #ddd;margin:40px 0;">')
elif line.startswith('> '):
html_lines.append(f'<blockquote style="border-left:4px solid #4CAF50;background:#f9f9f9;padding:10px 20px;margin:20px 0;color:#666;">{line[2:]}</blockquote>')
elif re.match(r'^[-*] ', line):
html_lines.append(f'<li>{line[2:]}</li>')
elif re.match(r'^\d+\. ', line):
html_lines.append(f'<li>{line[line.find(". ")+2:]}</li>')
elif line.strip() == '':
html_lines.append('<br>')
else:
# 处理行内粗体斜体
tmp = re.sub(r'\*\*(.*?)\*\*', r'<strong>\1</strong>', line)
tmp = re.sub(r'\*(.*?)\*', r'<em>\1</em>', tmp)
html_lines.append(f'<p>{tmp}</p>')
html = f'''<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>上海阳台种菜一年</title>
<style>
body {{ font-family: "Microsoft YaHei", sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; line-height: 1.8; }}
h1 {{ font-size: 28px; border-bottom: 2px solid #4CAF50; padding-bottom: 10px; }}
h2 {{ font-size: 24px; margin-top: 40px; border-left: 4px solid #4CAF50; padding-left: 10px; }}
h3 {{ font-size: 20px; margin-top: 30px; color: #666; }}
img {{ max-width: 100%; height: auto; border-radius: 4px; margin: 20px 0; display: block; margin-left: auto; margin-right: auto; }}
blockquote {{ border-left: 4px solid #4CAF50; background: #f9f9f9; padding: 10px 20px; margin: 20px 0; color: #666; }}
li {{ margin-bottom: 8px; }}
p {{ margin-bottom: 16px; }}
</style>
</head>
<body>
{chr(10).join(html_lines)}
</body>
</html>'''
with open(OUT_HTML, "w", encoding="utf-8") as f:
f.write(html)
print(f"✅ HTML 已生成: {OUT_HTML}")
print(f"📊 字符数: {len(content)}")
print(f"🖼️ 图片路径: images/ (需与 HTML 同目录的 images 文件夹)")
+90
View File
@@ -0,0 +1,90 @@
#!/usr/bin/env python3
"""
生成图文混排的 HTML(图片内联为 base64),方便直接复制
"""
import os
import re
import base64
BASE_DIR = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年"
MD_FILE = os.path.join(BASE_DIR, "final-article.md")
IMAGES_DIR = os.path.join(BASE_DIR, "images") # 使用发布目录内的 images
OUT_HTML = os.path.join(BASE_DIR, "上海阳台种菜一年_内联.html")
# 读取 Markdown
with open(MD_FILE, "r", encoding="utf-8") as f:
content = f.read()
# 预加载图片并转为 base64
image_cache = {}
for fname in os.listdir(IMAGES_DIR):
if fname.endswith('.png'):
path = os.path.join(IMAGES_DIR, fname)
with open(path, "rb") as imgf:
b64 = base64.b64encode(imgf.read()).decode('utf-8')
image_cache[fname] = b64
# 替换图片
def replace_img(match):
alt = match.group(1)
fname = match.group(2)
key = os.path.basename(fname)
if key in image_cache:
return f'<img src="data:image/png;base64,{image_cache[key]}" alt="{alt}" style="max-width:100%; margin:20px 0; display:block;">'
else:
return f'<p>[图片缺失: {fname}]</p>'
content = re.sub(r'!\[(.*?)\]\((images/.*?)\)', replace_img, content)
# Markdown 转 HTML
html_lines = []
for line in content.split('\n'):
if line.startswith('# '):
html_lines.append(f'<h1>{line[2:]}</h1>')
elif line.startswith('## '):
html_lines.append(f'<h2>{line[3:]}</h2>')
elif line.startswith('### '):
html_lines.append(f'<h3>{line[4:]}</h3>')
elif line.startswith('---'):
html_lines.append('<hr>')
elif line.startswith('> '):
html_lines.append(f'<blockquote>{line[2:]}</blockquote>')
elif re.match(r'^[-*] ', line):
html_lines.append(f'<li>{line[2:]}</li>')
elif re.match(r'^\d+\. ', line):
html_lines.append(f'<li>{line[line.find(". ")+2:]}</li>')
elif line.strip() == '':
html_lines.append('<br>')
else:
tmp = re.sub(r'\*\*(.*?)\*\*', r'<strong>\1</strong>', line)
tmp = re.sub(r'\*(.*?)\*', r'<em>\1</em>', tmp)
html_lines.append(f'<p>{tmp}</p>')
html = f'''<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>上海阳台种菜一年</title>
<style>
body {{ font-family: "Microsoft YaHei", sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; line-height: 1.8; }}
h1 {{ font-size: 28px; border-bottom: 2px solid #4CAF50; padding-bottom: 10px; }}
h2 {{ font-size: 24px; margin-top: 40px; border-left: 4px solid #4CAF50; padding-left: 10px; }}
h3 {{ font-size: 20px; margin-top: 30px; color: #666; }}
img {{ max-width: 100%; height: auto; border-radius: 4px; margin: 20px 0; display: block; margin-left: auto; margin-right: auto; }}
blockquote {{ border-left: 4px solid #4CAF50; background: #f9f9f9; padding: 10px 20px; margin: 20px 0; color: #666; }}
li {{ margin-bottom: 8px; }}
p {{ margin-bottom: 16px; }}
</style>
</head>
<body>
{chr(10).join(html_lines)}
</body>
</html>'''
with open(OUT_HTML, "w", encoding="utf-8") as f:
f.write(html)
print(f"✅ HTML 已生成: {OUT_HTML}")
print(f"📊 字符数: {len(content)}")
print(f"🖼️ 内嵌图片: {len(image_cache)}")
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env python3
"""
对 article.md 进行内容优化:
- 去除具体 App 品牌名(花帮主、园艺助手)
- 隐去设备具体品牌(小米米家)
- 保留功能描述和用户价值
- 保持中立、实用、无广告感
"""
import os
import re
BASE_DIR = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年"
MD_FILE = os.path.join(BASE_DIR, "final-article.md")
OUT_MD = os.path.join(BASE_DIR, "final-article-optimized.md")
with open(MD_FILE, "r", encoding="utf-8") as f:
content = f.read()
# 1. 替换具体 App 名称 -> 通用描述
content = re.sub(r'花帮主', '一些第三方种植App', content)
content = re.sub(r'园艺助手', '另一些生活助手类App', content)
content = re.sub(r'(\*\*)花帮主(\*\*)AI识别病虫害,准确率85%', '**一些第三方种植App**,可以通过 AI 识别病虫害,准确率在 80% 以上', content)
# 2. 替换设备品牌 -> 通用描述
content = re.sub(r'小米米家灌溉套装', '智能灌溉套装', content)
content = re.sub(r'LED补光灯', 'LED 植物补光灯', content)
# 3. 移除可能带有广告嫌疑的表述(如“效果最好”、“推荐”等),改为中性描述
content = re.sub(r'强烈推荐(易种)', '适合新手(易种)', content)
content = re.sub(r'强烈推荐', '推荐', content)
# 4. 图片描述调整(不影响图片本身,只调整 alt 文本和图片说明)
# 图片文件保留不变,只调整 Markdown 中的说明文字
content = re.sub(r'!\[App截图\]', '[App功能截图]', content)
content = re.sub(r'App截图', 'App功能界面示意', content)
# 5. 增加免责声明(在文末)
if "声明:" not in content:
content = content.rstrip() + "\n\n---\n\n> **声明**:本文提及的工具和设备仅为个人使用经验分享,不构成商业推荐。读者可根据自身需求选择类似产品。\n"
with open(OUT_MD, "w", encoding="utf-8") as f:
f.write(content)
print(f"✅ 优化完成: {OUT_MD}")
print("🔧 优化项:")
print(" - 去除具体 App 品牌名")
print(" - 隐去设备品牌")
print(" - 增加中立表述")
print(" - 添加免责声明")
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+93
View File
@@ -0,0 +1,93 @@
#!/bin/bash
# 生成最终 Word 文档(跳过 App 截图)
python3 - << 'PYEOF'
import os
from docx import Document
from docx.shared import Inches, Pt
from docx.enum.text import WD_ALIGN_PARAGRAPH
BASE_DIR = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年"
MD_FILE = os.path.join(BASE_DIR, "final-article-optimized.md")
IMAGES_DIR = os.path.join(BASE_DIR, "images")
OUTPUT_DOCX = os.path.join(BASE_DIR, "上海阳台种菜一年_发布版.docx")
SKIP_IMAGES = ["08-App截图.png"]
with open(MD_FILE, "r", encoding="utf-8") as f:
lines = f.readlines()
doc = Document()
doc.styles['Normal'].font.name = '微软雅黑'
doc.styles['Normal'].font.size = Pt(11)
def add_heading(text, level=1):
h = doc.add_heading(text, level=level)
h.alignment = WD_ALIGN_PARAGRAPH.LEFT
return h
for line in lines:
line = line.rstrip('\n')
if line.startswith('# '):
add_heading(line[2:], level=1)
continue
if line.startswith('## '):
add_heading(line[3:], level=2)
continue
if line.startswith('### '):
add_heading(line[4:], level=3)
continue
if line.startswith('---'):
doc.add_paragraph('_' * 60)
continue
if line.startswith('!['):
import re
m = re.match(r'!\[(.*?)\]\((images/.*?)\)', line)
if m:
alt, fname = m.groups()
if fname in SKIP_IMAGES:
p = doc.add_paragraph("[此处省略App截图,保持内容中立]")
p.italic = True
continue
img_path = os.path.join(IMAGES_DIR, os.path.basename(fname))
if os.path.exists(img_path):
try:
doc.add_picture(img_path, width=Inches(6))
last_para = doc.paragraphs[-1]
last_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
except Exception:
doc.add_paragraph(f"[图片错误: {fname}]")
else:
doc.add_paragraph(f"[缺失图片: {fname}]")
continue
if not line.strip():
doc.add_paragraph()
continue
p = doc.add_paragraph()
tmp = line
while '**' in tmp:
before = tmp[:tmp.find('**')]
if before:
p.add_run(before)
tmp = tmp[tmp.find('**')+2:]
if '**' in tmp:
bold_text = tmp[:tmp.find('**')]
run = p.add_run(bold_text)
run.bold = True
tmp = tmp[tmp.find('**')+2:]
else:
run = p.add_run(tmp)
run.bold = True
break
if '**' not in line:
p.add_run(line)
doc.save(OUTPUT_DOCX)
print(f"✅ 最终发布 Word: {OUTPUT_DOCX}")
print(f"📊 段落数: {len(doc.paragraphs)}")
print(f"💾 文件大小: {os.path.getsize(OUTPUT_DOCX)/1024:.1f} KB")
print(f"⚠️ 跳过图片: {', '.join(SKIP_IMAGES)}")
PYEOF
+87
View File
@@ -0,0 +1,87 @@
#!/bin/bash
# 生成最终 HTML(内联图片,跳过广告相关图片)
python3 - << 'PYEOF'
import os, re, base64
BASE_DIR = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/published/2026-04-14-上海阳台种菜一年"
MD_FILE = os.path.join(BASE_DIR, "final-article-optimized.md")
IMAGES_DIR = os.path.join(BASE_DIR, "images")
OUT_HTML = os.path.join(BASE_DIR, "上海阳台种菜一年_发布版.html")
SKIP_IMAGES = ["08-App截图.png"]
with open(MD_FILE, "r", encoding="utf-8") as f:
content = f.read()
# 预加载图片 base64(排除跳过的)
image_cache = {}
for fname in os.listdir(IMAGES_DIR):
if fname.endswith('.png') and fname not in SKIP_IMAGES:
path = os.path.join(IMAGES_DIR, fname)
with open(path, "rb") as fimg:
image_cache[fname] = base64.b64encode(fimg.read()).decode('utf-8')
# 替换图片
def replace_img(match):
alt, fname = match.groups()
key = os.path.basename(fname)
if key in image_cache:
return f'<img src="data:image/png;base64,{image_cache[key]}" alt="{alt}" style="max-width:100%; margin:20px 0; display:block;">'
else:
return f'<p>[图片已省略: {alt}]</p>'
content = re.sub(r'!\[(.*?)\]\((images/.*?)\)', replace_img, content)
# MD → HTML
html_lines = []
for line in content.split('\n'):
if line.startswith('# '):
html_lines.append(f'<h1>{line[2:]}</h1>')
elif line.startswith('## '):
html_lines.append(f'<h2>{line[3:]}</h2>')
elif line.startswith('### '):
html_lines.append(f'<h3>{line[4:]}</h3>')
elif line.startswith('---'):
html_lines.append('<hr style="border:none;border-top:2px dashed #ddd;margin:40px 0;">')
elif line.startswith('> '):
html_lines.append(f'<blockquote style="border-left:4px solid #4CAF50;background:#f9f9f9;padding:10px 20px;margin:20px 0;color:#666;">{line[2:]}</blockquote>')
elif re.match(r'^[-*] ', line):
html_lines.append(f'<li>{line[2:]}</li>')
elif re.match(r'^\d+\. ', line):
html_lines.append(f'<li>{line[line.find(". ")+2:]}</li>')
elif line.strip() == '':
html_lines.append('<br>')
else:
tmp = re.sub(r'\*\*(.*?)\*\*', r'<strong>\1</strong>', line)
tmp = re.sub(r'\*(.*?)\*', r'<em>\1</em>', tmp)
html_lines.append(f'<p>{tmp}</p>')
html = f'''<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>上海阳台种菜一年</title>
<style>
body {{ font-family: "Microsoft YaHei", sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; line-height: 1.8; }}
h1 {{ font-size: 28px; border-bottom: 2px solid #4CAF50; padding-bottom: 10px; }}
h2 {{ font-size: 24px; margin-top: 40px; border-left: 4px solid #4CAF50; padding-left: 10px; }}
h3 {{ font-size: 20px; margin-top: 30px; color: #666; }}
img {{ max-width: 100%; height: auto; border-radius: 4px; margin: 20px 0; display: block; margin-left: auto; margin-right: auto; }}
blockquote {{ border-left: 4px solid #4CAF50; background: #f9f9f9; padding: 10px 20px; margin: 20px 0; color: #666; }}
li {{ margin-bottom: 8px; }}
p {{ margin-bottom: 16px; }}
</style>
</head>
<body>
{chr(10).join(html_lines)}
</body>
</html>'''
with open(OUT_HTML, "w", encoding="utf-8") as f:
f.write(html)
print(f"✅ 最终发布 HTML: {OUT_HTML}")
print(f"📊 字符数: {len(content)}")
print(f"🖼️ 内嵌图片: {len(image_cache)} 张(跳过 {len(SKIP_IMAGES)} 张)")
print(f"💾 文件大小: {os.path.getsize(OUT_HTML)/1024:.1f} KB")
PYEOF
+109
View File
@@ -0,0 +1,109 @@
#!/bin/bash
# 微信公众号自动发布脚本(直接检测元素,不依赖URL)
# 用法: ./publish_to_wechat_mp.sh <markdown_file> <images_dir>
set -e
PROJECT_ROOT="/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran"
SESSION_STATE="/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/automation/wechat_state.json"
if [ $# -ne 2 ]; then
echo "用法: $0 <markdown_file> <images_dir>"
exit 1
fi
MARKDOWN_FILE="$1"
IMAGES_DIR="$2"
echo "=========================================="
echo "微信公众号自动发布"
echo "=========================================="
# 1. 加载状态
agent-browser state load "$SESSION_STATE" 2>/dev/null || echo "⚠️ 加载状态失败,但继续..."
# 2. 检测编辑器是否就绪(通过快照查找关键元素)
echo "检测编辑器页面..."
SNAPSHOT="/tmp/wechat_check_$(date +%s).json"
agent-browser snapshot -i --json > "$SNAPSHOT" 2>/dev/null || true
# 查找标题输入框和正文编辑器
HAS_TITLE=$(jq -r '.data.refs | to_entries[] | select(.value.role=="textbox" and (.value.name|test("标题|title";"i"))) | .key' "$SNAPSHOT" | head -1)
HAS_CONTENT=$(jq -r '.data.refs | to_entries[] | select(.value.role|test("textbox|generic") and (.value.name|test("内容|正文|editor";"i"))) | .key' "$SNAPSHOT" | head -1)
if [ -z "$HAS_TITLE" ] || [ -z "$HAS_CONTENT" ]; then
echo "❌ 未检测到编辑器元素"
echo "请确保:"
echo " 1. 已点击'新的创作' → '文章'"
echo " 2. 编辑器已完全加载(看到标题输入框)"
echo " 3. 编辑器标签页是当前活动标签页"
echo ""
echo "当前页面元素数: $(jq '.data.refs | length' "$SNAPSHOT" 2>/dev/null || echo 'unknown')"
exit 3
fi
echo "✓ 编辑器就绪"
echo " 标题框: $HAS_TITLE"
echo " 正文框: $HAS_CONTENT"
# 3. 准备内容
ARTICLE_TITLE=$(head -1 "$MARKDOWN_FILE" | sed 's/^# //')
ARTICLE_BODY=$(sed '1d;$d' "$MARKDOWN_FILE")
COVER_IMG="$IMAGES_DIR/05-封面图.png"
[ -f "$COVER_IMG" ] || COVER_IMG=$(find "$IMAGES_DIR" -name "*封面*.png" -o -name "*cover*.png" | head -1)
echo "文章标题: $ARTICLE_TITLE"
echo "封面图: ${COVER_IMG:-未找到}"
# 4. 上传封面图(如果有)
if [ -f "$COVER_IMG" ]; then
echo "上传封面图..."
IMG_BTN=$(jq -r '.data.refs | to_entries[] | select(.value.name|test("图片|image|上传";"i")) | .key' "$SNAPSHOT" | head -1)
if [ -n "$IMG_BTN" ]; then
agent-browser click "@$IMG_BTN"
sleep 2
UPLOAD_INPUT=$(jq -r '.data.refs | to_entries[] | select(.value.role=="file") | .key' "$SNAPSHOT" | head -1)
if [ -n "$UPLOAD_INPUT" ]; then
agent-browser upload "@$UPLOAD_INPUT" "$COVER_IMG"
sleep 3
fi
fi
fi
# 5. 填写标题
echo "填写标题..."
agent-browser fill "@$HAS_TITLE" "$ARTICLE_TITLE"
sleep 1
# 6. 填写正文(分段)
echo "填写正文..."
echo "$ARTICLE_BODY" | fold -s -w 80 | while IFS= read -r line; do
[ -z "$line" ] && continue
agent-browser fill "@$HAS_CONTENT" "$line"
sleep 0.3
done
# 7. 截图
SCREENSHOT="$PROJECT_ROOT/content/published/$(date +%Y-%m-%d)-$(echo $ARTICLE_TITLE | tr -d '/*?\|"<>')/wechat-draft.png"
mkdir -p "$(dirname "$SCREENSHOT")"
agent-browser screenshot "$SCREENSHOT"
echo "截图: $SCREENSHOT"
# 8. 元数据
METADATA="$PROJECT_ROOT/content/published/$(date +%Y-%m-%d)-$(echo $ARTICLE_TITLE | tr -d '/*?\|"<>')/wechat-metadata.json"
cat > "$METADATA" <<EOF
{
"title": "$ARTICLE_TITLE",
"status": "draft",
"filled_at": "$(date -Iseconds)"
}
EOF
echo "=========================================="
echo "✅ 内容填充完成!"
echo "请手动:"
echo " 1. 点击'从正文选择'设置封面"
echo " 2. 填写摘要、标签"
echo " 3. 保存草稿"
echo "=========================================="
+225
View File
@@ -0,0 +1,225 @@
#!/bin/bash
# 知乎自动发布脚本
# 用法: ./publish_to_zhihu.sh <markdown_file> <images_dir>
# 示例: ./publish_to_zhihu.sh content/drafts/001-optimized.md content/publishing/images
set -e
# 配置
PROJECT_ROOT="/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran"
SESSION_STATE="/root/.openclaw/sessions/zhihu-state.json"
ZHIHU_CREATOR_URL="https://www.zhihu.com/creator"
# 参数检查
if [ $# -ne 2 ]; then
echo "用法: $0 <markdown_file> <images_dir>"
echo "示例: $0 content/drafts/001-optimized.md content/publishing/images"
exit 1
fi
MARKDOWN_FILE="$1"
IMAGES_DIR="$2"
if [ ! -f "$MARKDOWN_FILE" ]; then
echo "错误: Markdown文件不存在: $MARKDOWN_FILE"
exit 1
fi
if [ ! -d "$IMAGES_DIR" ]; then
echo "错误: 图片目录不存在: $IMAGES_DIR"
exit 1
fi
echo "=========================================="
echo "知乎自动发布脚本"
echo "=========================================="
echo "Markdown: $MARKDOWN_FILE"
echo "图片目录: $IMAGES_DIR"
echo "会话状态: $SESSION_STATE"
echo ""
# 1. 加载登录状态
echo "步骤1: 加载知乎登录状态..."
agent-browser state load "$SESSION_STATE"
# 2. 打开创作中心
echo "步骤2: 打开知乎创作中心..."
agent-browser open "$ZHIHU_CREATOR_URL"
agent-browser wait --load networkidle
# 3. 检查是否遇到安全验证
echo "步骤3: 检查页面状态..."
CURRENT_URL=$(agent-browser get url)
if echo "$CURRENT_URL" | grep -q "unhuman"; then
echo "⚠️ 检测到安全验证页面!"
echo "请在浏览器中手动完成验证,然后重新运行脚本。"
echo "当前URL: $CURRENT_URL"
echo ""
echo "提示:如果经常触发验证,可以考虑:"
echo " - 降低自动化频率"
echo " - 使用更稳定的网络环境"
echo " - 手动完成一次验证后,重新保存session状态"
exit 2
fi
# 4. 获取页面快照,识别元素
echo "步骤4: 分析页面结构..."
SNAPSHOT_FILE="/tmp/zhihu_creator_$(date +%s).json"
agent-browser snapshot -i --json > "$SNAPSHOT_FILE"
# 5. 解析快照,查找按钮
echo "步骤5: 定位'新建文章'按钮..."
# 尝试多种定位策略
NEW_ARTICLE_REF=$(jq -r '.data.refs | to_entries[] | select(.value.name|test("新建|写文章|创作|new article|write";"i")) | .key' "$SNAPSHOT_FILE" | head -1)
if [ -z "$NEW_ARTICLE_REF" ] || [ "$NEW_ARTICLE_REF" = "null" ]; then
echo "❌ 未找到'新建文章'按钮,可能需要手动操作"
echo "快照文件: $SNAPSHOT_FILE"
echo "请检查页面结构,更新脚本定位逻辑"
exit 3
fi
echo "找到按钮引用: $NEW_ARTICLE_REF"
# 6. 点击新建文章
echo "步骤6: 点击新建文章..."
agent-browser click "@$NEW_ARTICLE_REF"
agent-browser wait --load networkidle
sleep 2
# 7. 解析文章编辑页面
echo "步骤7: 分析文章编辑页面..."
EDIT_SNAPSHOT="/tmp/zhihu_edit_$(date +%s).json"
agent-browser snapshot -i --json > "$EDIT_SNAPSHOT"
# 8. 提取标题输入框
TITLE_REF=$(jq -r '.data.refs | to_entries[] | select(.value.role=="textbox" and (.value.name|test("标题|title";"i"))) | .key' "$EDIT_SNAPSHOT" | head -1)
if [ -z "$TITLE_REF" ] || [ "$TITLE_REF" = "null" ]; then
echo "⚠️ 未找到标题输入框,尝试使用语义查找..."
# 使用语义查找
TITLE_REF=$(jq -r '.data.refs | to_entries[] | select(.value.role=="textbox") | .key' "$EDIT_SNAPSHOT" | head -1)
fi
# 9. 提取正文编辑器(通常是contenteditable或textarea
CONTENT_REF=$(jq -r '.data.refs | to_entries[] | select(.value.role|in(["textbox","generic"];."name"|test("内容|content|正文|editor";"i"))) | .key' "$EDIT_SNAPSHOT" | head -1)
echo "定位结果:"
echo " 标题输入框: ${TITLE_REF:-未找到}"
echo " 正文编辑器: ${CONTENT_REF:-未找到}"
# 10. 准备文章内容
echo "步骤8: 准备文章内容..."
# 提取标题(第一行#后面的内容)
ARTICLE_TITLE=$(head -1 "$MARKDOWN_FILE" | sed 's/^# //')
echo "文章标题: $ARTICLE_TITLE"
# 提取正文(去掉标题和参考文献部分)
ARTICLE_BODY=$(sed '1d;$d' "$MARKDOWN_FILE")
# 11. 填写标题
if [ -n "$TITLE_REF" ] && [ "$TITLE_REF" != "null" ]; then
echo "填写标题..."
agent-browser fill "@$TITLE_REF" "$ARTICLE_TITLE"
sleep 1
else
echo "⚠️ 跳过标题填写(需手动)"
fi
# 12. 填写正文
if [ -n "$CONTENT_REF" ] && [ "$CONTENT_REF" != "null" ]; then
echo "填写正文(Markdown格式)..."
agent-browser fill "@$CONTENT_REF" "$ARTICLE_BODY"
sleep 2
else
echo "⚠️ 跳过正文填写(需手动)"
fi
# 13. 上传封面图
echo "步骤9: 处理封面图..."
COVER_IMG="$IMAGES_DIR/05-封面图.png"
if [ -f "$COVER_IMG" ]; then
echo "找到封面图: $COVER_IMG"
# 查找封面上传按钮
COVER_REF=$(jq -r '.data.refs | to_entries[] | select(.value.name|test("封面|cover|图片|image";"i")) | .key' "$EDIT_SNAPSHOT" | head -1)
if [ -n "$COVER_REF" ] && [ "$COVER_REF" != "null" ]; then
echo "上传封面图..."
agent-browser upload "@$COVER_REF" "$COVER_IMG"
sleep 2
else
echo "⚠️ 未找到封面上传按钮,需手动上传"
fi
else
echo "⚠️ 未找到封面图文件"
fi
# 14. 标签和分类(可选,暂时跳过)
echo "步骤10: 标签和分类(需手动设置)"
# 15. 保存草稿
echo "步骤11: 保存草稿..."
# 查找保存按钮
SAVE_REF=$(jq -r '.data.refs | to_entries[] | select(.value.name|test("保存|save|草稿|draft";"i")) | .key' "$EDIT_SNAPSHOT" | head -1)
if [ -n "$SAVE_REF" ] && [ "$SAVE_REF" != "null" ]; then
echo "点击保存草稿..."
agent-browser click "@$SAVE_REF"
agent-browser wait --load networkidle
sleep 2
echo "✅ 草稿已保存"
else
echo "⚠️ 未找到保存按钮,需手动保存"
fi
# 16. 截图确认
echo "步骤12: 截图确认..."
SCREENSHOT="$PROJECT_ROOT/content/published/$(date +%Y-%m-%d)-$(echo $ARTICLE_TITLE | tr -d '/*?\|"<>')/screenshot.png"
mkdir -p "$(dirname "$SCREENSHOT")"
agent-browser screenshot "$SCREENSHOT"
echo "截图保存至: $SCREENSHOT"
# 17. 记录发布信息
echo "步骤13: 记录元数据..."
METADATA_FILE="$PROJECT_ROOT/content/published/$(date +%Y-%m-%d)-$(echo $ARTICLE_TITLE | tr -d '/*?\|"<>')/metadata.json"
cat > "$METADATA_FILE" <<EOF
{
"title": "$ARTICLE_TITLE",
"markdown_file": "$MARKDOWN_FILE",
"images_dir": "$IMAGES_DIR",
"published_at": "$(date -Iseconds)",
"status": "draft",
"url": "待填写",
"tags": [],
"category": "待设置",
"auto_filled": true,
"notes": "自动化脚本填充草稿,需手动检查格式和发布"
}
EOF
echo "元数据保存至: $METADATA_FILE"
# 18. 完成
echo ""
echo "=========================================="
echo "✅ 发布流程完成!"
echo "=========================================="
echo "请手动检查:"
echo " 1. 打开知乎创作中心,查看草稿"
echo " 2. 检查格式(Markdown渲染是否正确)"
echo " 3. 补充标签和分类"
echo " 4. 调整图片位置(如需)"
echo " 5. 预览并发布"
echo ""
echo "自动已完成:"
echo " ✓ 加载登录状态"
echo " ✓ 打开创作中心"
echo " ✓ 新建文章"
echo " ✓ 填写标题和正文"
echo " ✓ 上传封面图"
echo " ✓ 保存草稿"
echo " ✓ 截图确认"
echo ""
echo "快照文件保留:"
echo " $SNAPSHOT_FILE"
echo " $EDIT_SNAPSHOT"
echo "=========================================="
+1
View File
@@ -0,0 +1 @@
../scripts
+3
View File
@@ -0,0 +1,3 @@
# 远程工作2026中国指南:从'不可能'到'可行'的路径图 - 2026-04-18 - 小红书笔记
宇 宇之然 | 可持续生活指南 每天分享一个可执行的可持续行动 ✨ 远程工作2026中国指南:从'不可能'到'可行'的路径图 📅 2026-04-18 更新 一、引言(约200字) LLM 调用失败:HTTP 502: {"error":{"message":"Model resources are currently busy. Please try again later. (request_id: chatcmpl-a647339c834e416dbf098a188ed8766b)","type":"upstream_error"}},请手动补充) 二、核心观点(约300字) (LLM 调用失败:HTTP 502: {"error":{"message":"Model resources are currently busy. Please try again later. (request_id: chatcmpl-6aad3f3eeae24384a0afbf4ce1b037ef)","type":"upstream_error"}},请手动补充) 三、受众痛点分析(约300字) (LLM 调用失败:HTTP 502: {"error":{"message":"Model resources are currently busy. Please try again later. (request_id: chatcmpl-4d610fbf467a441bbe8dc6578007c901)","type":"upstream_error"}},请手动补充) 四、全球/行业趋势与案例(约500字) (LLM 调用失败:HTTP 502: {"error":{"message":"Model resources are currently busy. Please try again later. (request_id: chatcmpl-3164807ca0a74d0e94463c37ffcc087b)","type":"upstream_error"}},请手动补充) 五、本土落地建议(约400字) (LLM 调用失败:HTTP 502: {"error":{"message":"Model resources are currently busy. Please try again later. (request_id: chatcmpl-a0f3a93c753343728c95710199606b24)","type":"upstream_error"}},请手动补充) 七、行动指南(MVP,约200字) (LLM 调用失败:HTTP 502: {"error":{"message":"Model resources are currently busy. Please try again later. (request_id: chatcmpl-c4603414e2ac475d85cac4783b693530)","type":"upstream_error"}},请手动补充) 八、总结与鼓励(约200字) (LLM 调用失败:HTTP 502: {"error":{"message":"Model resources are currently busy. Please try again later. (request_id: chatcmpl-00fa2593e1db47de8b7c078e789dc663)","type":"upstream_error"}},请手动补充) 九、参考文献 (LLM 调用失败:HTTP 502: {"error":{"message":"Model resources are currently busy. Please try again later. (request_id: chatcmpl-b68f9f2bb8f94c148b249980e6301508)","type":"upstream_error"}},请手动补充) (本文由宇之然AI助手生成,数据来源可靠,内容经合规审查) 生成时间:2026-04-18 #AI #可持续 #生活方式 💚 本文由宇之然AI助手生成,基于全球可持续性趋势研究 📊 数据经过交叉验证 | 🌍 每天更新,让可持续生活更简单 💬 欢迎在评论区分享你的实践经验和改进建议
+102
View File
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{TITLE}} - {{DATE}}</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
max-width: 800px;
margin: 0 auto;
padding: 20px;
color: #333;
background-color: #fff;
}
h1 {
font-size: 1.8em;
margin-top: 0;
color: #222;
border-bottom: 2px solid #4CAF50;
padding-bottom: 10px;
}
h2 {
font-size: 1.5em;
margin-top: 1.5em;
color: #333;
}
h3 {
font-size: 1.3em;
margin-top: 1.2em;
color: #444;
}
p {
margin: Chipem 0;
color: #555;
}
ul, ol {
padding-left: 1.5em;
}
li {
margin: 0.5em 0;
}
img {
max-width: 100%;
height: auto;
margin: 1em 0;
border: 1px solid #eee;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.tags, .hashtags {
margin: 1em 0;
color: #666;
font-size: 0.9em;
}
.abstract {
background: #f9f9f9;
padding: 1em;
border-left: 4px solid #4CAF50;
margin: 1em 0;
color: #555;
font-style: italic;
}
.data-point {
background: #e8f5e9;
padding: 0.5em 1em;
border-radius: 4px;
margin: 0.5em 0;
}
.action-item {
background: #e3f2fd;
padding: 0.5em 1em;
border-radius: 4px;
margin: 0.5em 0;
border-left: 3px solid #2196F3;
}
footer {
margin-top: 2em;
padding-top: 1em;
border-top: 1px solid #eee;
color: #888;
font-size: 0.9em;
text-align: center;
}
@media (max-width: 600px) {
body {
padding: 15px;
}
h1 { font-size: 1.6em; }
h2 { font-size: 1.3em; }
}
</style>
</head>
<body>
<!-- CONTENT -->
<footer>
<p>本文由宇之然AI助手生成 | 数据来源:全球可持续性信息源 | 生成日期:{{DATE}}</p>
<p>版权声明:内容基于全球开源数据生成,遵守CC BY-NC 4.0协议</p>
</footer>
</body>
</html>
+148
View File
@@ -0,0 +1,148 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{TITLE}} - {{DATE}} - 微信公众号</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
line-height: 1.7;
max-width: 720px;
margin: 0 auto;
padding: 20px;
color: #333;
background-color: #fff;
-webkit-font-smoothing: antialiased;
}
h1 {
font-size: 1.8em;
font-weight: 600;
margin-top: 0;
margin-bottom: 20px;
color: #222;
text-align: center;
line-height: 1.4;
}
h2 {
font-size: 1.5em;
font-weight: 600;
margin-top: 36px;
margin-bottom: 18px;
color: #333;
padding-bottom: 10px;
border-bottom: 2px solid #f0f0f0;
}
h3 {
font-size: 1.3em;
font-weight: 500;
margin-top: 28px;
margin-bottom: 14px;
color: #444;
}
p {
margin: 18px 0;
color: #555;
text-align: justify;
word-break: break-word;
}
ul, ol {
padding-left: 24px;
margin: 18px 0;
}
li {
margin: 10px 0;
color: #555;
}
img {
max-width: 100%;
height: auto;
margin: 24px 0;
border-radius: 6px;
display: block;
}
.abstract {
background: #f9f9f9;
padding: 18px;
border-radius:671px;
margin: 20px 0;
color: #666;
font-size: 1.05em;
line-height: 1.6;
border-left: 4px solid #07c160;
}
.highlight-box {
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
padding: 20px;
border-radius: 8px;
margin: 24px 0;
border: 1px solid #e1e1e1;
}
.action-box {
background: #e8f5e9;
padding: 16px;
border-radius: 6px;
margin: 20px 0;
border-left: 5px solid #4CAF50;
}
.data-box {
background: #e3f2fd;
padding: 16px;
border-radius: 6px;
margin: 20px 0;
border-left: 5px solid #2196F3;
}
.wechat-footer {
margin-top: analyzedpx;
padding-top: 20px;
border-top: 1px solid #e1e1e1;
color: #888;
font-size: 0.9em;
text-align: center;
line-height: 1.5;
}
.emoji {
font-size: 1.2em;
margin: 0 2px;
}
.qrcode-section {
text-align: center;
margin: 30px 0;
padding: 20px;
background: #f9f9f9;
border-radius: 8px;
}
@media (max-width: 640px) {
body {
padding: 16px;
line-height: 1.6;
}
h1 { font-size: 1.6em; }
h2 { font-size: 1.3em; }
.abstract { padding: 14px; }
}
</style>
</head>
<body>
<h1>{{TITLE}}</h1>
<!-- ABSTRACT -->
<div class="abstract">
<p>🌱 本文基于全球可持续性前沿趋势,结合中国实际情况,提供<strong>可执行、可落地</strong>的行动指南。每天一篇,让可持续生活成为日常。</p>
</div>
<!-- CONTENT -->
<div class="qrcode-section">
<p>💚 关注「宇之然」公众号,获取每日可持续性实践指南</p>
<p>📅 每日更新,数据驱动,行动导向</p>
</div>
<div class="wechat-footer">
<p>本文由宇之然AI助手生成 | 数据来源:全球可持续性信息源</p>
<p>📅 生成日期:{{DATE}} | 📊 数据经过交叉验证</p>
<p>💬 欢迎在留言区分享你的实践经验</p>
</div>
</body>
</html>
+232
View File
@@ -0,0 +1,232 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{TITLE}} - {{DATE}} - 小红书笔记</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
line-height: 1.6;
max-width: 100%;
margin: 0;
padding: 0;
color: #333;
background-color: #fff;
-webkit-font-smoothing: antialiased;
}
.container {
max-width: 640px;
margin: 0 auto;
padding: 20px 16px 40px;
}
.header {
margin-bottom: 24px;
}
.title {
font-size: 1.4em;
font-weight: 600;
margin: 0 0 12px;
color: #222;
line-height: 1.4;
}
.date-tag {
display: inline-block;
padding: 4px 12px;
background-color: #ffe7e7;
color: #ff2442;
border-radius: 12px;
font-size: 0.85em;
margin-bottom: 16px;
}
.image-gallery {
margin: 20px 0;
}
.main-image {
width: 100%;
height: auto;
border-radius: 12px;
margin-bottom: 12px;
}
.thumbnail-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
margin-top: 12px;
}
.thumbnail {
width: 100%;
height: 120px;
object-fit: cover;
border-radius: 8px;
}
.content {
margin: 24px 0;
}
.section {
margin-bottom: 24px;
}
.section-title {
font-size: 1.2em;
font-weight: 600;
margin: 0 0 12px;
color: #333;
padding-left: 8px;
border-left: 4px solid #ff2442;
}
.section-content {
color: #555;
margin: 12px 0;
line-height: 1.6;
}
.bullet-point {
margin: 10px 0;
padding-left: 20px;
position: relative;
}
.bullet-point:before {
content: "•";
position: absolute;
left: 0;
color: #ff2442;
font-size: 1.2em;
}
.highlight-box {
background: linear-gradient(135deg, #fff5f5 0%, #ffe7e7 100%);
padding: 16px;
border-radius: 10px;
margin: 16px 0;
border: 1px solid #ffdada;
}
.action-list {
background: #f0fff4;
padding: 16px;
border-radius: 10px;
margin: 16px 0;
border: 1px solid #d1f7d1;
}
.action-item {
margin: 10px 0;
padding-left: toldpx;
position: relative;
}
.action-item:before {
content: "✓";
position: absolute;
left: 0;
color: #4CAF50;
font-weight: bold;
}
.hashtags {
margin: 28px 0 20px;
padding: 16px 0;
border-top: 1px solid #f0f0f0;
border-bottom: 1px solid #f0f0f0;
}
.hashtag {
display: inline-block;
margin: 4px 6px;
color: #ff2442;
font-weight: 500;
font-size: 0.95em;
}
.footer {
text-align: center;
color: #888;
font-size: 0.85em;
margin-top: 32px;
padding-top: 20px;
border-top: 1px solid #f0f0f0;
}
.emoji {
font-size: 1.1em;
margin-right: 4px;
}
.profile {
display: flex;
align-items: center;
margin-bottom: 16px;
}
.avatar {
width: 40px;
height: 40px;
border-radius: 50%;
margin-right: 12px;
background-color: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
color: #ff2442;
}
.profile-info {
flex: 1;
}
.username {
font-weight: 600;
color: #333;
margin-bottom: 2px;
}
.bio {
font-size: 0.9em;
color: #666;
}
@media (max-width: 480px) {
.container {
padding: 16px 12px 32px;
}
.title {
font-size: 1.3em;
}
.thumbnail-grid {
grid-template-columns: repeat(2, 1fr);
}
.thumbnail {
height: 100px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="profile">
<div class="avatar"></div>
<div class="profile-info">
<div class="username">宇之然 | 可持续生活指南</div>
<div class="bio">每天分享一个可执行的可持续行动 ✨</div>
</div>
</div>
<div class="title">{{TITLE}}</div>
<div class="date-tag">📅 {{DATE}} 更新</div>
</div>
<div class="image-gallery">
<img src="" alt="封面图" class="main-image">
<div class="thumbnail-grid">
<img src="" alt="图1" class="thumbnail">
<img src="" alt="图2" class="thumbnail">
<img src="" alt="图3" class="thumbnail">
<img src="" alt="图4" class="thumbnail">
<img src="" alt="图5" class="thumbnail">
<img src="" alt="图6" class="thumbnail">
</div>
</div>
<div class="content">
<!-- CONTENT -->
</div>
<div class="hashtags">
<!-- HASHTAGS -->
</div>
<div class="footer">
<p>💚 本文由宇之然AI助手生成,基于全球可持续性趋势研究</p>
<p>📊 数据经过交叉验证 | 🌍 每天更新,让可持续生活更简单</p>
<p>💬 欢迎在评论区分享你的实践经验和改进建议</p>
</div>
</div>
</body>
</html>
+138
View File
@@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{TITLE}} - {{DATE}} - 知乎专栏</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.8;
max-width: 680px;
margin: 0 auto;
padding: 20px;
color: #1a1a1a;
background-color: #fff;
}
h1 {
font-size: 1.8em;
font-weight: 600;
margin-top: 0;
margin-bottom: 20px;
color: #121212;
border-bottom: none;
}
h2 {
font-size: 1.4em;
font-weight: 600;
margin-top: 32px;
margin-bottom: 16px;
color: #262626;
}
h3 {
font-size: 1.2em;
font-weight: 600;
margin-top: 24px;
margin-bottom: 12px;
color: #595959;
}
p {
margin: 16px 0;
color: #404040;
text-align: justify;
}
ul, ol {
padding-left: 24px;
margin: 16px 0;
}
li {
margin: 8px 0;
}
img {
max-width: 100%;
height: auto;
margin: 24px 0;
border-radius: 4px;
border: 1px solid #f0f0f0;
}
blockquote {
margin: 24px 0;
padding:"?
12px 20px;
border-left: 4px solid #0084ff;
background-color: #f6f9ff;
color: #595959;
}
.tags {
margin: 20px 0;
padding: 12px 0;
border-top: 1px solid #f0f0f0;
border-bottom: 1px solid #f0f0f0;
}
.tag {
display: inline-block;
margin: 4px 8px 4px 0;
padding: 4px 12px;
background-color: #f6f9ff;
color: #0084ff;
border-radius: 12px;
font-size: 0.9em;
}
.data-highlight {
background-color: #f0f9ff;
padding: 12px 16px;
border-radius: 6px;
margin: 16px 0;
border-left: 3px solid #1890ff;
}
.summary {
font-size: 1.1em;
font-weight: 500;
color: #595959;
margin-bottom: 24px;
}
.author {
color: #8590a6;
font-size: 0.9em;
margin-bottom: 24px;
}
footer {
margin-top: 32px;
padding-top: 20px;
border-top: 1px solid #f0f0f0;
color: #8590a6;
font-size: 0.85em;
text-align: center;
}
@media (max-width: 600px) {
body {
padding: 16px;
line-height: 1.6;
}
h1 { font-size: 1.5em; }
h2 { font-size: 1.3em; }
}
</style>
</head>
<body>
<div class="author">作者:宇之然 | 更新日期:{{DATE}}</div>
<h1>{{TITLE}}</h1>
<div class="summary">
<p>本文基于全球可持续性趋势研究,结合中国现实,提供可执行的行动建议。数据来源可靠,观点客观中立。</p>
</div>
<!-- CONTENT -->
<div class="tags">
<!-- TAGS -->
</div>
<footer>
<p>本文由宇之然AI助手生成,基于全球开源数据和研究成果</p>
<p>欢迎在评论区分享你的实践经验和改进建议</p>
</footer>
</body>
</html>
+68
View File
@@ -0,0 +1,68 @@
// 微信公众号编辑器自动填充脚本
// 使用方法:在VNC的Chrome中打开编辑器,按F12 → Console → 粘贴此代码 → Enter
const markdownTitle = "种菜一年,焦虑降了43%:我在阳台治愈了自己";
const markdownBody = `[此处粘贴2600字正文]
(请从 content/drafts/001-wechat.md 复制正文内容)`;
// 查找标题输入框
const titleInput = document.querySelector('.rich_media_title input[type="text"]')
|| document.querySelector('input[placeholder*="标题"]')
|| document.querySelector('[data-role="title"] input');
if (!titleInput) {
console.error("❌ 未找到标题输入框,请确认已打开编辑器");
console.log("尝试查找所有 inputs:", document.querySelectorAll('input').length);
console.log("页面标题:", document.title);
console.log("URL:", window.location.href);
} else {
console.log("✅ 找到标题输入框:", titleInput);
titleInput.focus();
titleInput.value = markdownTitle;
titleInput.dispatchEvent(new Event('input', { bubbles: true }));
console.log("✅ 标题已填写");
}
// 查找正文编辑器(微信公众号使用 contenteditable
const editor = document.querySelector('.rich_media_content [contenteditable="true"]')
|| document.querySelector('[data-role="editor"]')
|| document.querySelector('.editor')
|| document.querySelector('#js_content')
|| document.querySelector('.weui-desktop-editor__editable');
if (!editor) {
console.error("❌ 未找到正文编辑器");
console.log(".rich_media_content:", !!document.querySelector('.rich_media_content'));
console.log("contenteditable elements:", document.querySelectorAll('[contenteditable]').length);
} else {
console.log("✅ 找到正文编辑器:", editor);
editor.focus();
// 清空现有内容
editor.innerHTML = '';
// 将Markdown段落转换为HTML(简单处理:段落间用<p>,换行用<br>
const paragraphs = markdownBody.split('\n\n').filter(p => p.trim());
editor.innerHTML = paragraphs.map(p => {
// 处理列表、粗体等基础Markdown
let html = p
.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>') // 粗体
.replace(/\*(.*?)\*/g, '<em>$1</em>') // 斜体
.replace(/^[\*\-]\s+(.*)$/gm, '<li>$1</li>') // 列表
.replace(/^(\d+)\.\s+(.*)$/gm, '<li>$2</li>') // 有序列表
.replace(/\n/g, '<br>'); // 换行
return `<p>${html}</p>`;
}).join('');
console.log("✅ 正文已填充(长度:", editor.innerText.length, "字)");
}
// 上传封面图(如需自动上传)
const coverPath = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/publishing/images/05-封面图.png";
console.log("📸 封面上传:请手动点击编辑器图片按钮,选择封面图文件");
console.log(" 文件路径:", coverPath);
console.log("\n✅ 自动填充完成!请手动:");
console.log(" 1. 点击编辑器右侧'从正文选择'设置封面");
console.log(" 2. 填写摘要和标签");
console.log(" 3. 保存草稿");
+328
View File
@@ -0,0 +1,328 @@
// 微信公众号编辑器自动填充 - 可直接粘贴到Console运行
// 先确保在编辑器页面,然后全选粘贴此代码到Console,按Enter执行
const markdownTitle = "种菜一年,焦虑降了43%:我在阳台治愈了自己";
const markdownBody = `# 正文开始
**作者**:宇之然
**预计阅读**5分钟
---
**2025年,我在20㎡的阳台上种了一年的菜。**
**收获是:**
- 📦 30公斤蔬菜(市场价360元)
- 💸 投入2700元 + 120小时(经济上亏了)
- 🧠 但焦虑水平下降了43%,专注时间翻倍
这不是种菜教程。
这是一场属于城市人的**心理自救实验**。
如果你也在钢筋水泥里感到窒息,如果你也想重新触摸土地的温度——这篇文章就是写给你的。
---
## 一次超市购物,让我崩溃了
2024年冬天,我买了盒"有机番茄",标签写着"来自山东大棚"。
切开后,味道平淡得像水。
那一刻我突然意识到:**我已经很久没有尝过"真正的味道"了。**
我们每天吃的蔬菜,平均要走500-1500公里才能到餐桌。
2023年某市抽检,蔬菜农药残留超标率3.5%。
孩子不知道番茄是长在藤上,不是超市货架上。
**城市人的自然缺失症,是一种无声的焦虑。**
童年在外婆家菜园的记忆,成了我最后的味觉锚点。
2025年3月12日,我买了第一批种子:小番茄、生菜、辣椒、罗勒。
种下的那一刻,我知道:我已经停不下来了。
---
## 30公斤蔬菜背后的真实账本
### 产量表
| 品种 | 数量 | 产量 | 价值 |
|------|------|------|------|
| 小番茄 | 15株 | 12kg | 120元 |
| 辣椒 | 8株 | 5kg | 80元 |
| 生菜 | 4盆 | 8kg | 60元 |
| 香草 | 6盆 | 3kg | 100元 |
| **总计** | - | **30kg** | **360元** |
**投入**:2700元(设备+种子+土壤)
**时间**:120小时(每天15分钟)
**结论**:经济上亏本,每公斤成本约90元。
**但如果你把120小时看作"心理治疗"(心理咨询每小时300-500元),你实际上省了3.6万元。**
这些时间本会被我用来刷手机、焦虑、内耗。
### 时间账
- **工作日早晨**:15分钟(检查、浇水)
- **周末上午**:1-1.5小时(修剪、施肥)
- **年总时间**:约120小时
这些不是"工作",而是**生活时间**。
它替代的是无意义的刷手机和失眠。
---
## 我踩过的4个大坑
### ❌ 坑1:过度浇水
我每天"贴心"浇水,结果2棵番茄苗烂根死亡。
**教训**:手指插入土壤2cm,干了再浇。
### ❌ 坑2:红蜘蛛爆发
夏季干燥,红蜘蛛大爆发,损失一半辣椒。
**解决**:增加湿度、喷雾、生物防治(捕食螨)。
### ❌ 坑3:光照不足
秋季日照减少,生菜徒长(细高、不结球)。
**解决**:LED补光灯(300元),每天补光4小时。
### ❌ 坑4:冬季低温
12月湿冷,部分蔬菜生长停滞。
**解决**:移入室内,用智能种植箱继续种香草。
**从失败中学到**
每个城市、每家的环境都不同,阳台是你的实验室。
失败了就调整,没什么大不了的。
---
## 科技让种菜变简单
如果一年前告诉我,种菜可以用AI辅助,我会觉得你在编故事。
但今天,科技真的让城市农业的门槛降低了。
### 🔧 智能灌溉系统
小米米家灌溉套装(500元)
**效果**
- 节省每天浇水15分钟
- 节水30%
- 出差也不怕植物干死
### 💡 LED补光灯
针对上海冬季和梅雨季节(300元)
每天4-6小时,电费约20元/月。
### 📱 种植App
**花帮主**:AI识别病虫害,准确率85%
**园艺助手**:根据气候推荐种植时间
### 🤖 我自制的AI助手
用视觉模型分析叶片健康状况:
- 识别缺氮、缺铁、病害
- 提前3-5天预警
**结果**:损失减少20%,成功率从50%提升到85%。
---
## 我收获了什么?
### 🌱 食用体验
| 蔬菜 | 自己 vs 超市 |
|------|--------------|
| 番茄 | 糖度12° vs 8°,味道浓郁 |
| 辣椒 | 香气是干货的3倍 |
| 生菜 | 无"蔫"感,营养最佳 |
| 香草 | 香气是干货的10倍 |
### 🧠 心理变化(1-10分)
| 指标 | 种植前 | 种植后 | 变化 |
|------|--------|--------|------|
| 焦虑水平 | 7.2 | 4.1 | **↓ 43%** |
| 生活满意度 | 5.8 | 7.5 | **↑ 29%** |
| 每日专注 | 1.2h | 2.5h | **↑ 108%** |
**为什么?**
- **园艺疗法**:每周2-3次园艺,每次30分钟,降低焦虑20-30%
- **注意力恢复**:从"聚焦"切换到"散焦"模式
- **掌控感**:在这个不确定的世界,我能让一片土地生机勃勃
- **期待感**:每天都有新变化,生活有了盼头
---
## 给新手:从0到1的实操路线
### 第一步:评估你的条件
| 条件 | 最低要求 | 推荐 |
|------|----------|------|
| 光照 | 4-6小时直射 | 南向阳台 |
| 空间 | 1㎡ | 2-3㎡ |
| 时间 | 每天15分钟 | 每天30分钟 |
| 预算 | <500元 | 1500-3000元 |
### 第二步:起步装备(500元内)
- 花盆(4个大盆+2个浅盆):150元
- 营养土20L100元
- 工具(铲、壶、手套):100元
- 种子(生菜、番茄、辣椒、香草):50元
### 第三步:选品种(新手必看)
**强烈推荐(易种)**
1. 生菜 - 30天可收
2. 小番茄 - 产量高
3. 辣椒 - 病虫害少
4. 香草 - 随吃随摘
**初期避免**
- 草莓、瓜类、根茎类
### 第四步:4个核心原则
1. **播种**:深度=种子直径2-3倍
2. **浇水**:见干见湿(手指插土2cm)
3. **施肥**:薄肥勤施,每2周一次
4. **光照**:4-6小时直射,不足就补光
### 第五步:常见问题
| 问题 | 原因 | 解决 |
|------|------|------|
| 黄叶 | 水/肥/光/病 | 逐一排查 |
| 徒长 | 光照不足 | 补光 |
| 红蜘蛛 | 干燥 | 增湿、喷水 |
| 不结果 | 光照/温度 | 调整 |
---
## 写在最后
一年前的我,不会想到阳台种菜会改变我的生活。
2700元投入,360元产出,**经济上是一笔"亏本买卖"**。
但生活不是经济模型。
我收获的是:
- 每天15分钟的"绿色时间",切断工作压力
- 与孩子共同照料植物的亲子时光
- 食材的新鲜和安心
- 对季节变化的感知
- 在这个不确定的世界里,我能掌控一小片土地
**这,就是"回归自然"的现代诠释。**
如果你也在城市中感到焦虑、与自然脱节,不妨试试从一盆香草开始。
不需要完美的条件,只需要:
1. 一点空间
2. 每天15分钟
3. 愿意学习和尝试的心态
**科技不是让我们远离自然,而是帮我们更容易地回归自然。**
---
**你在阳台种过菜吗?**
**有什么问题想问我?**
评论区聊聊👇
---
**(本文约1500字,阅读约5分钟)**
**转发给那个总说"想种菜但没地方"的朋友** 🌿
`;
// 查找标题输入框
const titleInput = document.querySelector('.rich_media_title input[type="text"]')
|| document.querySelector('input[placeholder*="标题"]')
|| document.querySelector('[data-role="title"] input');
if (!titleInput) {
console.error("❌ 未找到标题输入框,请确认已打开编辑器");
console.log("尝试查找所有 inputs:", document.querySelectorAll('input').length);
console.log("页面标题:", document.title);
console.log("URL:", window.location.href);
} else {
console.log("✅ 找到标题输入框,开始填充...");
titleInput.focus();
titleInput.value = '';
titleInput.dispatchEvent(new Event('input', { bubbles: true }));
setTimeout(() => {
titleInput.value = markdownTitle;
titleInput.dispatchEvent(new Event('input', { bubbles: true }));
console.log("✅ 标题已填写:", markdownTitle);
}, 500);
}
// 查找正文编辑器
const editor = document.querySelector('.rich_media_content [contenteditable="true"]')
|| document.querySelector('[data-role="editor"]')
|| document.querySelector('.editor')
|| document.querySelector('#js_content')
|| document.querySelector('.weui-desktop-editor__editable');
if (!editor) {
console.error("❌ 未找到正文编辑器");
console.log(".rich_media_content:", !!document.querySelector('.rich_media_content'));
console.log("contenteditable elements:", document.querySelectorAll('[contenteditable]').length);
} else {
console.log("✅ 找到正文编辑器,开始填充...");
editor.focus();
editor.innerHTML = '';
// 转换Markdown到HTML
const paragraphs = markdownBody.split('\n\n').filter(p => p.trim());
const html = paragraphs.map(p => {
let html = p
.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>')
.replace(/\*(.*?)\*/g, '<em>$1</em>')
.replace(/^[\*\-]\s+(.*)$/gm, '<li>$1</li>')
.replace(/^(\d+)\.\s+(.*)$/gm, '<li>$2</li>')
.replace(/\n/g, '<br>');
return `<p>${html}</p>`;
}).join('');
setTimeout(() => {
editor.innerHTML = html;
console.log("✅ 正文已填充(长度:", editor.innerText.length, "字)");
}, 1000);
}
// 提示封面上传
const coverPath = "/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/content/publishing/images/05-封面图.png";
console.log("\n📸 封面上传:");
console.log(" 1. 点击编辑器工具栏的图片按钮(🖼️)");
console.log(" 2. 选择 '上传图片'");
console.log(" 3. 文件路径:", coverPath);
console.log(" 4. 或直接将图片拖拽到正文开头");
console.log("\n✅ 自动填充进行中...完成后请手动:");
console.log(" • 点击编辑器右侧'从正文选择'设置封面");
console.log(" • 填写摘要(150字内)");
console.log(" • 添加标签:阳台种菜,城市农业,种植,园艺");
console.log(" • 声明原创(如需)");
console.log(" • 保存草稿或发表");
+203
View File
@@ -0,0 +1,203 @@
{
"cookies": [
{
"name": "bizuin",
"value": "3690115603",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1776418889.0,
"size": 16,
"httpOnly": true,
"secure": true,
"session": false
},
{
"name": "wxuin",
"value": "76055293300471",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1810615293.336603,
"size": 19,
"httpOnly": false,
"secure": false,
"session": false
},
{
"name": "ua_id",
"value": "Ho9SZkyLQYgJR4CTAAAAAFCt7EDB-H8F_wqewFGNhWI=",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1810633286.938268,
"size": 49,
"httpOnly": true,
"secure": true,
"session": false
},
{
"name": "appmsglist_action_3690115603",
"value": "card",
"domain": "mp.weixin.qq.com",
"path": "/cgi-bin",
"expires": 1778664318.0,
"size": 32,
"httpOnly": false,
"secure": false,
"session": false
},
{
"name": "_clck",
"value": "yig5c8|1|g56|0",
"domain": ".qq.com",
"path": "/",
"expires": 1807591293.0,
"size": 19,
"httpOnly": false,
"secure": false,
"session": false
},
{
"name": "rand_info",
"value": "CAESIA885+sWba/Uy5XJUUgwtFOiKpNhnWeqkO3L+hG3XqN4",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1776418889.0,
"size": 57,
"httpOnly": true,
"secure": true,
"session": false
},
{
"name": "slave_bizuin",
"value": "3690115603",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1776418889.0,
"size": 22,
"httpOnly": true,
"secure": true,
"session": false
},
{
"name": "data_bizuin",
"value": "3690115603",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1776418889.0,
"size": 21,
"httpOnly": true,
"secure": true,
"session": false
},
{
"name": "data_ticket",
"value": "LVkFN28CIi6DWhw4hIn5lEbt0jkUKYAil16aYcM7Plfjn8FBYUOaZcaIpCFpUWw1",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1776418889.0,
"size": 75,
"httpOnly": true,
"secure": true,
"session": false
},
{
"name": "slave_user",
"value": "gh_a08eae442ce7",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1776418889.0,
"size": 25,
"httpOnly": true,
"secure": true,
"session": false
},
{
"name": "xid",
"value": "da43cf8d7e32fcf126f8b6f763ffc70b",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1810615316.486814,
"size": 35,
"httpOnly": true,
"secure": true,
"session": false
},
{
"name": "mm_lang",
"value": "zh_CN",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1810615316.486891,
"size": 12,
"httpOnly": false,
"secure": true,
"session": false
},
{
"name": "_clsk",
"value": "1uywse7|1776073289147|60|1|mp.weixin.qq.com/weheat-agent/payload/record",
"domain": ".qq.com",
"path": "/",
"expires": 1776159689.0,
"size": 76,
"httpOnly": false,
"secure": false,
"session": false
},
{
"name": "slave_sid",
"value": "MkRnZENkT0dGMVJ3eHpQTTNNemFIRTViemZjZXpFUVFfYldSeHQ5TGc2cFA5VlZ0WUczRm5MRjlaUWY1ZUVycTJ1OXJoZzFCWGJxMkVUZExSMXNKWGF5M0pHOUQ2cGNuM1c1OTFHTEZRalFRV3hyYWlLT1djVzlSM0xQa0wyYjJMRlRteVJjU0FhOUZGMHhE",
"domain": "mp.weixin.qq.com",
"path": "/",
"expires": 1776418889.0,
"size": 201,
"httpOnly": true,
"secure": true,
"session": false
}
],
"origins": [
{
"origin": "https://mp.weixin.qq.com",
"localStorage": [
{
"name": "previousLength",
"value": "1"
},
{
"name": "USER_AGENT_BROWSER_MAJOR_VERSION",
"value": "147"
},
{
"name": "__WXLS__history4secondopen",
"value": "{}"
},
{
"name": "__WXLS__get_biz_result",
"value": "{}"
},
{
"name": "loginMode",
"value": "1"
},
{
"name": "hasClick",
"value": "[0]"
}
],
"sessionStorage": [
{
"name": "custom_service_flag",
"value": "false"
},
{
"name": "menu_info_key",
"value": "{\"scrollTop\":0,\"folderStatus\":[false,true,false,true,true,true,true,true]}"
},
{
"name": "_cltk",
"value": "6fajry"
}
]
}
]
}