Files
online_sys/frontend_大健康/update_my_projects_health.py
KQL a7242f0c69 Initial commit: 教务系统在线平台
- 包含4个产业方向的前端项目:智能开发、智能制造、大健康、财经商贸
- 已清理node_modules、.yoyo等大文件,项目大小从2.6GB优化至631MB
- 配置完善的.gitignore文件

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 18:16:55 +08:00

123 lines
5.5 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import re
# 读取学生完成的项目数据
with open('网页未导入数据/学生完成的项目.json', 'r', encoding='utf-8') as f:
student_projects = json.load(f)
# 过滤出大健康产业的数据
health_projects = []
for item in student_projects:
if item.get("所属就业管家") == "大健康":
# 处理项目名称,去除数字前缀
projects = []
for proj in item.get("学生完成的项目名称", []):
# 去除前面的数字和点
clean_name = re.sub(r'^\d+\.\s*', '', proj)
projects.append(clean_name)
health_projects.append({
"unitName": item.get("单元名称查询", ""),
"projects": projects[:2] # 最多取2个项目
})
# 只取前10个单元
my_projects_data = health_projects[:10]
# 生成JavaScript代码用于"我的项目库"板块(不可点击的灰色项目)
js_code = f""" // 我的项目库数据 - 大健康产业学生完成的项目
const myProjectsData = {json.dumps(my_projects_data, ensure_ascii=False, indent=2)};"""
print("生成的myProjectsData不可点击的灰色项目")
print(js_code)
print(f"\n{len(my_projects_data)}个单元")
# 读取漾美项目的详细内容
import os
md_file = '/Users/apple/Documents/cursor/教务系统/frontend_大健康/网页未导入数据/大健康产业/学生完成的项目/"漾美增长 12 周"新媒体种草与到院转化策划案 272d463fce5180a48021dabb111c85c6.md'
if os.path.exists(md_file):
with open(md_file, 'r', encoding='utf-8') as f:
yangmei_content = f.read()
else:
# 使用备用内容
yangmei_content = """# "漾美增长 12 周"新媒体种草与到院转化策划案
# **一、项目背景**
策划案以"专业合规 + 温度陪伴"为核心,围绕"年轻化轻医美 + 高性价比整外"的品牌定位,策划一个新媒体运营闭环。整体调性避免过于冰冷的商业感,强调"真实案例、医生专业、用户信任"的叙事风格,让内容既有医学严谨性,也具备温暖、易感知的生活化气息。
# **二、项目亮点**
## **1. 故事化案例线:从"术前焦虑""术后安心"**
区别于传统生硬的项目介绍,本策划案通过"她的变美日记"栏目记录用户的全过程。以 7 天、30 天、90 天的阶段性复盘为主线,用场景还原与细节描绘(如恢复过程、日常护理、心理变化)传递真实可信的内容价值。
## **2. 医生 IP 的温度感表达**
医生不仅仅是权威讲解者,更要通过轻松、耐心的表达方式,成为"用户的变美伙伴"。例如在《面诊 10 问》栏目中,以"常见问题 + 轻松回答"的形式呈现,把"专业权威"转译为"易懂安心"
## **3. 冷暖场景对比的视觉体验**
- **院内场景**:用明亮、温暖的灯光,强调"安全、规范、专业"的就诊氛围。
- **术后场景**:通过真实拍摄,展现用户生活化的一面(如外出、聚会、日常化妆),传递"医美回归生活"的理念。
# **三、策划案说明**
## **1. 运营平台选择**
- **小红书**:主打"种草 + 真实案例",强调搜索关键词布局(城市 + 项目 + 预算),打造"经验分享"氛围。
- **抖音/视频号**:主打"医生科普 + 情景化短视频",利用强开头和沉浸式场景,提升完播率。
- **公众号/私域**:主打"深度科普 + 活动承接 + 复购陪伴",通过图文与社群形成闭环,增强粘性。
"""
# 解析markdown内容为sections
sections = []
current_section = None
current_content = []
for line in yangmei_content.split('\n'):
if line.startswith('# **') and line.endswith('**'):
if current_section:
sections.append({
"title": current_section,
"content": '\n'.join(current_content).strip()
})
current_section = line.replace('# **', '').replace('**', '').strip()
current_content = []
elif line.startswith('## **') and line.endswith('**'):
if current_content:
# 将之前的内容添加到sections
sections.append({
"title": current_section,
"content": '\n'.join(current_content).strip()
})
current_section = line.replace('## **', '').replace('**', '').strip()
current_content = []
else:
current_content.append(line)
# 添加最后一个section
if current_section:
sections.append({
"title": current_section,
"content": '\n'.join(current_content).strip()
})
# 生成可点击项目的数据结构
clickable_project = {
"id": "clickable-1",
"name": "\"漾美增长 12 周\"新媒体种草与到院转化策划案",
"unitName": "新媒体运营基础",
"isClickable": True,
"content": {
"title": "\"漾美增长 12 周\"新媒体种草与到院转化策划案",
"description": "策划案以\"专业合规 + 温度陪伴\"为核心,围绕\"年轻化轻医美 + 高性价比整外\"的品牌定位,策划一个新媒体运营闭环。",
"images": [],
"sections": sections[:5] # 只取前5个主要章节
}
}
# 生成可点击项目的JavaScript代码
clickable_js = f""" // 可点击查看的特殊项目 - 大健康产业学生完成的实际项目
const clickableProjects = [
{json.dumps(clickable_project, ensure_ascii=False, indent=4)}
];"""
print("\n生成的clickableProjects可点击的特殊项目")
print(clickable_js)