55 lines
2.3 KiB
Python
55 lines
2.3 KiB
Python
#!/usr/bin/env python3
|
||
"""
|
||
生成Excel格式的客户清单
|
||
"""
|
||
|
||
import json
|
||
from datetime import datetime
|
||
|
||
# 读取分类数据
|
||
with open('客户分类清单.json', 'r', encoding='utf-8') as f:
|
||
data = json.load(f)
|
||
|
||
# 生成Markdown表格格式(可以导入Excel)
|
||
output = []
|
||
|
||
output.append("# 007翻译客户清单 - 详细版")
|
||
output.append(f"\n生成时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
|
||
output.append("---\n")
|
||
|
||
# 代理商
|
||
output.append("## 💼 代理商/同行客户(3个)\n")
|
||
output.append("| # | 用户名 | 显示名称 | 痛点关键词 | 群组 | 推荐策略 |")
|
||
output.append("|---|--------|----------|-----------|------|----------|")
|
||
for i, user in enumerate(data['代理商'], 1):
|
||
output.append(f"| {i} | @{user['username']} | {user['name']} | {user['keyword']} | t.me/{user['group']} | 代理合作/渠道分销 |")
|
||
|
||
# B端
|
||
output.append("\n## 🏢 B端企业客户(1个)\n")
|
||
output.append("| # | 用户名 | 显示名称 | 痛点关键词 | 群组 | 推荐策略 |")
|
||
output.append("|---|--------|----------|-----------|------|----------|")
|
||
for i, user in enumerate(data['B端客户'], 1):
|
||
output.append(f"| {i} | @{user['username']} | {user['name']} | {user['keyword']} | t.me/{user['group']} | 企业版/批量采购 |")
|
||
|
||
# C端
|
||
output.append("\n## 👤 C端个人客户(17个)\n")
|
||
output.append("| # | 用户名 | 显示名称 | 痛点关键词 | 群组 | 推荐策略 |")
|
||
output.append("|---|--------|----------|-----------|------|----------|")
|
||
for i, user in enumerate(data['C端客户'], 1):
|
||
output.append(f"| {i} | @{user['username']} | {user['name']} | {user['keyword']} | t.me/{user['group']} | 个人版/免费试用 |")
|
||
|
||
# 统计
|
||
output.append("\n---\n")
|
||
output.append("## 📊 统计信息\n")
|
||
output.append(f"- 代理商/同行: {len(data['代理商'])} 个")
|
||
output.append(f"- B端企业: {len(data['B端客户'])} 个")
|
||
output.append(f"- C端个人: {len(data['C端客户'])} 个")
|
||
output.append(f"- **总计: {len(data['代理商']) + len(data['B端客户']) + len(data['C端客户'])} 个**")
|
||
|
||
# 写入文件
|
||
with open('客户清单-表格版.md', 'w', encoding='utf-8') as f:
|
||
f.write('\n'.join(output))
|
||
|
||
print("✅ Excel格式报告已生成: 客户清单-表格版.md")
|
||
print("📝 可以直接复制到Excel或导入")
|