// 卧蚕画法求助文章生成器 - 固定内容版本
// 专门针对卧蚕画法的求助文章模板
import fs from 'fs/promises';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
class WocanHelpArticleTemplate {
constructor() {
// 固定标题 - 卧蚕画法求助
this.fixedTitle = "求助卧蚕画法";
// 固定正文内容 - 卧蚕画法相关问题
this.fixedContent = `有没有姐妹能救救孩子的卧蚕啊!😭
我研究了好久还是画不好卧蚕:
1️⃣ 卧蚕笔到底选什么颜色比较自然?我买的总是画出来很突兀
2️⃣ 卧蚕的阴影线要怎么画才不显脏?我画完像黑眼圈一样
3️⃣ 卧蚕的高光点在哪里啊?我点完像泪沟一样凹陷
4️⃣ 肿眼泡适合画卧蚕吗?会不会更显肿?
5️⃣ 有没有手残党也能学会的简易卧蚕画法?
求姐妹们分享你们的卧蚕神器和技巧!真的想学这个技能很久了🥹
#卧蚕画法 #化妆新手 #眼妆教程`;
// 固定标签(包含必须的#美少女颜究社bot + 9个卧蚕相关热门话题标签)
this.fixedTags = [
"#美少女颜究社bot", // 必须标签
"#卧蚕画法", // 核心话题
"#眼妆教程", // 眼妆技巧
"#化妆新手", // 新手求助
"#眼妆技巧", // 眼妆技巧
"#卧蚕笔推荐", // 产品推荐
"#手残党化妆", // 手残党适用
"#眼妆步骤", // 步骤教程
"#化妆玄学", // 化妆技巧
"#今日妆容" // 日常妆容
];
// 固定封面图片文件名
this.fixedCoverImage = "test_wocan_no_bg.png";
}
/**
* 生成固定内容的卧蚕求助文章
* 内容完全一模一样,不做任何修改
*/
async generateWocanHelpArticle() {
const article = {
title: this.fixedTitle,
content: this.fixedContent,
tags: this.fixedTags,
coverImage: this.fixedCoverImage,
timestamp: new Date().toISOString(),
type: "wocan_help_article",
category: "眼妆求助",
focus_keywords: ["卧蚕", "眼妆", "化妆技巧", "新手求助"]
};
return article;
}
/**
* 保存文章到文件
*/
async saveArticle(article, filename = null) {
const outputFilename = filename || `wocan_help_article_${Date.now()}.json`;
const outputPath = join(__dirname, outputFilename);
await fs.writeFile(outputPath, JSON.stringify(article, null, 2), 'utf-8');
console.log(`✅ 卧蚕求助文章已保存到: ${outputFilename}`);
return outputPath;
}
/**
* 生成格式化的小红书风格文章内容
*/
getFormattedContent() {
const tagsString = this.fixedTags.join(' ');
return `${this.fixedTitle}
${this.fixedContent}
${tagsString}`;
}
/**
* 获取文章摘要信息
*/
getArticleSummary() {
return {
title: this.fixedTitle,
tagCount: this.fixedTags.length,
contentLength: this.fixedContent.length,
coverImage: this.fixedCoverImage,
tags: this.fixedTags,
category: "眼妆求助",
focus: "卧蚕画法"
};
}
/**
* 获取关键词列表(用于SEO优化)
*/
getKeywords() {
return [
"卧蚕画法", "眼妆教程", "化妆新手", "卧蚕笔", "眼妆技巧",
"手残党化妆", "卧蚕阴影", "卧蚕高光", "肿眼泡眼妆", "眼妆步骤"
];
}
}
/**
* 主函数 - 生成固定内容的卧蚕求助文章
*/
async function main() {
try {
const template = new WocanHelpArticleTemplate();
// 生成固定内容的文章
const article = await template.generateWocanHelpArticle();
// 保存文章
await template.saveArticle(article);
// 输出文章信息
console.log('\n📄 卧蚕求助文章模板已生成:');
console.log('=====================================');
console.log(`标题: ${article.title}`);
console.log(`标签数量: ${article.tags.length}`);
console.log(`内容长度: ${article.content.length} 字符`);
console.log(`封面图片: ${article.coverImage}`);
console.log(`分类: ${article.category}`);
console.log(`关键词: ${article.focus_keywords.join(', ')}`);
console.log('\n标签列表:');
article.tags.forEach((tag, index) => {
console.log(`${index + 1}. ${tag}`);
});
console.log('\n📱 小红书风格格式:');
console.log('=====================================');
console.log(template.getFormattedContent());
console.log('\n✅ 卧蚕求助文章生成完成!内容完全固定,每次生成都一模一样。');
console.log('💡 这篇文章专门针对卧蚕画法问题,适合眼妆新手求助使用。');
} catch (error) {
console.error('❌ 生成文章时出错:', error);
}
}
// 如果直接运行此文件
if (import.meta.url === `file://${process.argv[1]}`) {
main();
}
export { WocanHelpArticleTemplate };