couple-repo/create_birthday_classmeeting.js
StillHammer 2c143ec907 Add 4 new personal development cards (social skills)
- Card #20: Les 3 Premières Secondes (first impression technique)
- Card #21: Validation Interne vs Externe (critical mindset shift)
- Card #22: Curiosité Sincère vs Être Intéressant (communication)
- Card #23: Needy vs Magnétique (behavioral patterns)

Update card count: 19 → 23 active cards

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 15:07:34 +08:00

496 lines
14 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

const pptxgen = require('pptxgenjs');
const path = require('path');
const fs = require('fs');
const html2pptx = require('./.claude/skills/pptx/scripts/html2pptx.js');
// Tingting's signature color palette + celebration touches
const colors = {
primary: '#6B2C3E', // Bordeaux profond
accent: '#B8974F', // Or antique
background: '#F5F1E8', // Crème ivoire
celebration: '#E8B4B8', // Rose doux pour anniversaire
warm: '#D4AF37', // Or chaud pour bougies
text: '#2C1810' // Brun foncé pour lisibilité
};
// CSS shared styles
const sharedStyles = `
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
width: 960px;
height: 540px;
margin: 0;
padding: 0;
overflow: hidden;
}
.slide {
width: 960px;
height: 540px;
position: relative;
font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
overflow: hidden;
}
.bg-primary { background: ${colors.primary}; }
.bg-warm { background: ${colors.background}; }
.bg-celebration { background: ${colors.celebration}; }
.title-main {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
width: 90%;
}
.title-main h1 {
font-size: 48px;
color: ${colors.background};
margin-bottom: 20px;
font-weight: 700;
letter-spacing: 2px;
}
.title-main .subtitle {
font-size: 24px;
color: ${colors.celebration};
font-weight: 300;
}
.title-main .class-info {
font-size: 20px;
color: ${colors.accent};
margin-top: 15px;
font-weight: 400;
}
.content-slide {
padding: 50px 70px 60px 70px;
}
.content-slide h2 {
font-size: 32px;
color: ${colors.primary};
margin-bottom: 25px;
font-weight: 700;
}
.content-slide p {
font-size: 20px;
line-height: 1.8;
color: ${colors.text};
margin-bottom: 15px;
}
.content-slide ul {
margin-left: 40px;
margin-top: 20px;
}
.content-slide li {
font-size: 18px;
line-height: 1.8;
color: ${colors.text};
margin-bottom: 8px;
}
.quote-box {
background: white;
padding: 25px 30px;
margin: 25px 0;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.quote-box p {
font-size: 22px;
color: ${colors.primary};
font-style: italic;
line-height: 1.6;
}
.number-highlight {
display: inline-block;
background: ${colors.accent};
color: white;
padding: 5px 15px;
border-radius: 20px;
font-weight: bold;
font-size: 24px;
}
.decoration-top {
position: absolute;
top: 0;
right: 0;
width: 200px;
height: 200px;
background: ${colors.accent}40;
opacity: 0.3;
border-radius: 50%;
}
.decoration-bottom {
position: absolute;
bottom: 0;
left: 0;
width: 150px;
height: 150px;
background: ${colors.celebration}40;
opacity: 0.3;
border-radius: 50%;
}
.v-center {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 100%;
padding: 0 60px;
}
.section-title {
background: ${colors.primary};
display: flex;
align-items: center;
justify-content: center;
}
.section-title h2 {
font-size: 48px;
color: ${colors.background};
text-align: center;
font-weight: 700;
padding: 0;
}
`;
// Slide templates
const slides = [
// Slide 1: Title
`<div class="slide bg-primary">
<div class="title-main">
<h1>🎂 生日主题班会 🎂</h1>
<p class="subtitle">Birthday Celebration Class Meeting</p>
<p class="class-info">七年三班 | Class 7-3</p>
</div>
</div>`,
// Slide 2: Opening
`<div class="slide bg-warm">
<div class="content-slide">
<h2>✨ 当这一刻来临</h2>
<div class="quote-box">
<p>当教室的灯光暖起来</p>
<p>当桌上的气球飘起来</p>
<p>当我们的笑容扬起来</p>
<p>这一刻,属于你们 ❤️</p>
</div>
</div>
</div>`,
// Slide 3: 373 Days
`<div class="slide bg-warm">
<div class="content-slide">
<h2>📅 373天的故事</h2>
<p><span class="number-highlight">373天</span></p>
<p style="margin-top: 20px;">不是一串冰冷的数字</p>
<p>是我们一起攒下的<strong>独家记忆</strong></p>
<ul style="margin-top: 25px;">
<li>早读时的朗朗书声 📖</li>
<li>课间时的欢声笑语 😄</li>
<li>运动会上的团结拼搏 🏃</li>
<li>考试后的互相鼓励 💪</li>
</ul>
</div>
</div>`,
// Slide 4: Section title
`<div class="slide section-title">
<h2>🌟 今天的主角 🌟</h2>
</div>`,
// Slide 5: Welcome Birthday Stars
`<div class="slide bg-celebration">
<div class="content-slide">
<h2>🎉 欢迎我们的寿星</h2>
<p style="font-size: 24px; text-align: center; margin-top: 60px; line-height: 2;">
在这个特别的日子里<br>
让我们用最热烈的掌声<br>
欢迎今天的<strong>寿星们</strong>
</p>
<p style="text-align: center; margin-top: 40px; font-size: 28px; color: ${colors.primary};">
👏 掌声欢迎!👏
</p>
</div>
</div>`,
// Slide 6: Meaning of Birthdays
`<div class="slide bg-warm">
<div class="content-slide">
<h2>🎂 生日的意义</h2>
<p>生日,不仅仅是蛋糕和礼物</p>
<div class="quote-box" style="margin-top: 30px;">
<p>✨ 是成长的见证</p>
<p>💝 是爱的传递</p>
<p>🌈 是希望的延续</p>
<p>👨‍👩‍👧‍👦 是感恩的时刻</p>
</div>
</div>
</div>`,
// Slide 7: Surprise (TYPO FIXED)
`<div class="slide bg-celebration">
<div class="content-slide">
<h2>🎁 惊喜时刻</h2>
<p style="font-size: 24px; margin-top: 40px; text-align: center; line-height: 2;">
但是... 等一下!<br>
还有一个<strong>惊喜中的惊喜</strong>
</p>
<p style="text-align: center; margin-top: 50px; font-size: 22px; color: ${colors.primary};">
🎊 我们没有忘记今天还有两位特别的寿星... 🎊
</p>
</div>
</div>`,
// Slide 8: Hosts' Birthday
`<div class="slide bg-warm">
<div class="content-slide">
<h2>💝 特别的惊喜</h2>
<p style="font-size: 22px; margin-top: 30px;">
为班会付出那么多的<strong>主持人们</strong><br>
今天也是你们的生日!
</p>
<div class="quote-box" style="margin-top: 30px;">
<p>被人放在心上的感觉</p>
<p>真的很温暖 ❤️</p>
</div>
</div>
</div>`,
// Slide 9: Growing Together (OPTIMIZED)
`<div class="slide bg-warm">
<div class="content-slide">
<h2>🌱 一起成长的样子</h2>
<p style="margin-top: 25px;">从陌生到熟悉,从青涩到成熟</p>
<p>让我们一起回顾<strong>寿星们</strong>一路走来的精彩瞬间</p>
<ul style="margin-top: 30px;">
<li>军训时的坚持 🎖️</li>
<li>课堂上的认真 ✍️</li>
<li>活动中的积极 🎨</li>
<li>友谊中的真诚 🤝</li>
</ul>
</div>
</div>`,
// Slide 10: Making a Wish
`<div class="slide bg-primary">
<div class="v-center">
<h2 style="font-size: 42px; color: ${colors.background}; text-align: center; margin-bottom: 40px;">
🕯️ 许愿时刻 🕯️
</h2>
<p style="font-size: 24px; color: ${colors.celebration}; text-align: center; line-height: 2;">
闭上眼睛<br>
在心里许下你最美好的愿望<br>
<span style="color: ${colors.accent}; font-size: 20px;">(我们给你们5秒钟的时间)</span>
</p>
</div>
</div>`,
// Slide 11: Blow Candles
`<div class="slide bg-celebration">
<div class="content-slide">
<h2>🎂 吹蜡烛</h2>
<p style="font-size: 28px; text-align: center; margin-top: 80px; color: ${colors.primary};">
一、二、三!<br>
<strong style="font-size: 36px;">吹!🎉</strong>
</p>
<p style="text-align: center; margin-top: 40px; font-size: 20px;">
愿你们的愿望都能实现 ✨
</p>
</div>
</div>`,
// Slide 12: Gifts
`<div class="slide bg-warm">
<div class="content-slide">
<h2>🎁 拆礼物环节</h2>
<p style="margin-top: 25px;">每一份礼物都承载着<strong>心意</strong></p>
<div class="quote-box" style="margin-top: 30px;">
<p><strong>心意盒里有什么?</strong></p>
<p>📝 手写的祝福卡片</p>
<p>📷 珍贵的照片回忆</p>
<p>🧸 可爱的小玩偶</p>
<p>❤️ 满满的班级温暖</p>
</div>
</div>
</div>`,
// Slide 13: Interactive Blessings
`<div class="slide bg-celebration">
<div class="content-slide">
<h2>💬 同学祝福时刻</h2>
<p style="margin-top: 30px; font-size: 22px; text-align: center;">
有哪位同学想要送上<br>
你的祝福或者才艺表演?
</p>
<p style="text-align: center; margin-top: 50px; font-size: 20px; color: ${colors.primary};">
🎤 舞台交给你们!🎤
</p>
</div>
</div>`,
// Slide 14: Gratitude to Parents
`<div class="slide bg-warm">
<div class="content-slide">
<h2>🙏 感恩父母</h2>
<p style="margin-top: 20px;">生日这一天,我们要特别感谢...</p>
<div class="quote-box" style="margin-top: 25px;">
<p>给予我们生命的<strong>父母</strong></p>
<p>陪伴我们成长的<strong>家人</strong></p>
<p>教育我们成才的<strong>老师</strong></p>
<p>一起欢笑的<strong>同学</strong></p>
</div>
<p style="margin-top: 25px; text-align: center; font-size: 20px; color: ${colors.primary};">
感恩有你们 ❤️
</p>
</div>
</div>`,
// Slide 15: Birthday Wishes (TYPO FIXED: 住→祝)
`<div class="slide bg-primary">
<div class="v-center">
<h2 style="font-size: 42px; color: ${colors.background}; text-align: center; margin-bottom: 40px;">
🎊 生日快乐 🎊
</h2>
<p style="font-size: 26px; color: ${colors.celebration}; text-align: center; line-height: 2;">
让我们一起<strong style="color: ${colors.accent};">祝</strong>他们<br>
<strong style="font-size: 32px; color: ${colors.accent};">生日快乐!</strong>
</p>
<p style="text-align: center; margin-top: 40px; font-size: 22px; color: ${colors.background};">
Happy Birthday! 🎂✨
</p>
</div>
</div>`,
// Slide 16: Class Photo
`<div class="slide bg-celebration">
<div class="content-slide">
<h2>📷 全班合影时刻</h2>
<p style="font-size: 24px; text-align: center; margin-top: 80px; line-height: 2;">
来,七年三班<br>
让我们一起留下这个<br>
<strong style="color: ${colors.primary}; font-size: 28px;">难忘的瞬间!</strong>
</p>
<p style="text-align: center; margin-top: 40px; font-size: 20px;">
📸 咔嚓! 📸
</p>
</div>
</div>`,
// Slide 17: Looking Forward
`<div class="slide bg-warm">
<div class="content-slide">
<h2>🌟 未来的路</h2>
<div class="quote-box">
<p>今天,我们庆祝过去的成长</p>
<p>明天,我们期待新的精彩</p>
<p>愿每一个生日都是新的起点</p>
<p>愿七年三班的每一个人</p>
<p><strong>都能成为更好的自己!</strong></p>
</div>
</div>
</div>`,
// Slide 18: Thank You
`<div class="slide bg-primary">
<div class="title-main">
<h1 style="font-size: 52px;">谢谢大家!</h1>
<p class="subtitle" style="margin-top: 30px; font-size: 28px;">Thank You Everyone</p>
<p class="class-info" style="margin-top: 25px; font-size: 22px;">
七年三班 | 永远是一家人 ❤️
</p>
</div>
</div>`
];
// Create HTML files for each slide
function createHTMLFiles() {
const slideDir = path.join(__dirname, 'birthday_slides');
if (!fs.existsSync(slideDir)) {
fs.mkdirSync(slideDir);
}
slides.forEach((slideContent, index) => {
const htmlContent = `<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
${sharedStyles}
</style>
</head>
<body>
${slideContent}
</body>
</html>`;
const filename = path.join(slideDir, `slide_${index + 1}.html`);
fs.writeFileSync(filename, htmlContent, 'utf-8');
console.log(`✓ Created: slide_${index + 1}.html`);
});
return slideDir;
}
async function createPresentation() {
console.log('🚀 Generating Birthday Class Meeting PowerPoint...\n');
// Create HTML files
const slideDir = createHTMLFiles();
console.log('\n📄 HTML files created successfully\n');
const pptx = new pptxgen();
pptx.layout = 'LAYOUT_16x9';
pptx.author = 'Tingting - Class 7-3';
pptx.title = '七年三班生日主题班会';
try {
// Process each slide
for (let i = 0; i < slides.length; i++) {
const slideFile = path.join(slideDir, `slide_${i + 1}.html`);
console.log(`📊 Processing Slide ${i + 1}/${slides.length}...`);
await html2pptx(slideFile, pptx);
}
// Save presentation
await pptx.writeFile({ fileName: 'Birthday_ClassMeeting_Class73.pptx' });
console.log('\n✅ PowerPoint generated successfully!');
console.log('📁 File: Birthday_ClassMeeting_Class73.pptx');
console.log('🎨 Style: Tingting Signature Elegant + Celebration');
console.log(`📊 Total slides: ${slides.length}`);
console.log('\n✏ Corrections applied:');
console.log(' • Slide 7: Fixed surprise moment text');
console.log(' • Slide 9: Optimized content (removed repetition)');
console.log(' • Slide 15: Fixed typo 住→祝');
console.log('\n New slides added:');
console.log(' • Slide 13: Interactive classmate blessings');
console.log(' • Slide 14: Gratitude to parents');
console.log(' • Slide 16: Class photo moment');
console.log(' • Slide 17: Looking forward');
console.log('\n💡 All elements are 100% editable in PowerPoint!');
} catch (error) {
console.error('\n❌ Error:', error.message);
if (error.stack) {
console.error('\nStack:', error.stack);
}
}
}
createPresentation();