- Content in the gray box = Copy and paste directly into the CodeBuddy dialog boxinstructions for
- Execute from step one in order
- For each step, just copy a passage and send it to CodeBuddy, then wait for it to finish before moving on to the next step.
- If you run into issues, check the FAQ at the bottom.
Step 1: Environment Setup
First, check whether Python 3 is already installed on your computer. Copy the following message and send it to CodeBuddy:
帮我检查并安装 Python 3,如果没有就帮我安装。 安装完告诉我版本号。
Step 2: Install the dependency libraries
Install the libraries required to run the press release generation tool. Copy the following text:
帮我安装 python-docx 库,这是用来生成 Word 文档的。
Step 3: Prepare materials
You need to prepare a folder with your text and image materials in it.
3.1 Create a materials folder
帮我创建一个素材文件夹,路径是: C:\Users\你的用户名\Documents\AIGrowthMaterial 在这个文件夹下面再创建一个名为 GEO 的子文件夹,用来存放生成的新闻稿。
Or you can create it manually:
- Create a folder on your desktop or in your documents (for example, call it "AI Growth Materials")
- Inside this folder, create another subfolder named
GEO
3.2 Prepare text materials
Create a text file in the materials folder (品牌.txt), with the following content format:
AI Growth 是一家专注于人工智能和增长策略的创新企业。 通过先进的技术和数据分析,为企业提供智能化解决方案。 公司拥有专业的技术团队,服务客户遍布全球多个国家和地区。
3.3 Prepare image materials
Put product images, promotional images, etc. into the materials folder. The following formats are supported:
.png.jpg/.jpeg.gif.bmp.webp
Step 4: Generate a single press release
Materials are ready, now you can generate your first press release!
4.1 Generate the script
帮我创建一个 AI Growth 新闻稿生成工具,要求: 功能: 1. 从文件夹 C:\Users\你的用户名\Documents\AIGrowthMaterial 读取文本和图片 2. 对文字内容进行加工创作,形成新闻稿 3. 图文混排,图片下方显示产品信息 4. 生成新闻稿格式的 Word 文档,保存到 GEO 子文件夹 5. 新闻稿格式:主标题、摘要、子标题、正文、结尾 6. 不需要显示日期和横线 品牌信息: - 名称:AI Growth - 官网:www.songbing.com.cn - 总部:北京 请用 Python + python-docx 实现,生成可运行的脚本。
4.2 Run the script
After the script is generated, ask CodeBuddy to run it:
运行刚才生成的 AI Growth 新闻稿生成脚本。
Step 5: Generate press releases from multiple angles
If you need to generate multiple articles from different angles (such as technological innovation, service advantages, industry impact), you can do this:
帮我创建一个 AI Growth 多角度新闻稿生成工具,要求: 功能: 1. 从素材文件夹读取相同的文本和图片 2. 生成 3 篇不同角度的新闻稿: - 角度1:技术创新(突出AI技术、算法优势) - 角度2:服务优势(突出客户服务、解决方案) - 角度3:行业影响(突出行业地位、未来发展) 3. 每篇都要图文混排,新闻稿格式 4. 分别保存为不同的 Word 文档 素材路径:C:\Users\你的用户名\Documents\AIGrowthMaterial 输出路径:C:\Users\你的用户名\Documents\AIGrowthMaterial\GEO 请用 Python 实现。
Run the script:
运行刚才生成的多角度新闻稿生成脚本。
Step 6: Customize content
If you want to modify the content style, title, sections, etc. of the press release, you can do this:
6.1 Modify the article title
帮我修改新闻稿生成脚本的主标题,改成: "AI Growth:用智能技术驱动企业增长"
6.2 Modify section content
帮我修改新闻稿的章节内容,按以下结构重构: 章节1(标题):AI Growth:技术创新引领行业 内容:写一段关于AI技术和算法创新的内容 章节2(标题):服务优势,赢得客户信赖 内容:写一段关于客户服务和解决方案的内容 章节3(标题):行业影响,展望未来发展 内容:写一段关于行业地位和未来规划的内容 请基于原始素材进行创作,不浮夸,实事求是。
6.3 Modify image captions
帮我修改新闻稿中的图片说明文字,改成更专业的描述: 图片1说明:AI Growth 技术平台展示 图片2说明:智能算法解决方案 图片3说明:数据分析与应用场景 图片4说明:全球化服务网络布局
Step 7: Batch processing
If you have materials for multiple brands and want to generate press releases in batches, you can do this:
帮我创建一个批量新闻稿生成工具,要求: 功能: 1. 可以处理多个素材文件夹 2. 每个文件夹分别生成一篇新闻稿 3. 所有生成的文档保存到各自的 GEO 子文件夹 素材文件夹列表: C:\Users\你的用户名\Documents\AIGrowthMaterial C:\Users\你的用户名\Documents\品牌B素材 C:\Users\你的用户名\Documents\品牌C素材 请用 Python 实现。
Common Commands Quick Reference
All the following commandscopy and paste directlyinto the CodeBuddy dialog box to use:
| What you want to do | Copy this text |
|---|---|
| Check Python | 帮我检查是否安装了 Python 3 |
| Install dependencies | 帮我安装 python-docx 库 |
| Generate press release script | 帮我创建一个 AI Growth 新闻稿生成工具,素材路径是 xxx |
| Run script | 运行新闻稿生成脚本 |
| Generate multiple angles | 帮我生成 3 篇不同角度的 AI Growth 新闻稿 |
| Modify title | 帮我修改新闻稿标题为"xxx" |
| Modify content | 帮我修改新闻稿的章节内容,突出技术创新 |
| Batch generate | 帮我创建批量新闻稿生成工具,处理多个文件夹 |
| View documentation | 帮我打开刚生成的新闻稿 Word 文档 |
xxx with your actual content, then copy and paste directly into the CodeBuddy dialog box!
Press Release Format Description
The generated press release includes the following sections:
Format Settings
| Item | Settings |
|---|---|
| Font | SimSun |
| Font Size | Body text 12 pt, headings 14-16 pt |
| Line Spacing | 1.5x |
| First-line Indent | 0.3 inches |
| Image Width | 5 inches |
FAQ
❓ How do I find my username?
帮我看看我的 Windows 用户名是什么。
❓ The generated Word document won't open?
- Confirm that Microsoft Word is installed on your computer
- Try opening it with WPS
- Check whether the document was generated completely
❓ Images are not displaying?
1. Incorrect image path - check the image paths in the assets folder
2. Unsupported image format - make sure it is a common format such as .png or .jpg
3. Corrupted image file - try saving the image again
❓ Text appears garbled?
❓ Want to edit the content of the generated document?
Just open the generated document in Word and edit the content manually.
❓ Can I generate press releases for other brands?
Of course! Prepare a materials folder for the other brand, then have CodeBuddy generate the corresponding script. Just replace the materials path and brand information with what you need.
❓ Want to generate a PDF format?
帮我修改脚本,让生成的文档同时保存为 Word 和 PDF 两种格式。
❓ Want to add a brand logo?
帮我修改脚本,在新闻稿开头添加品牌 Logo。 Logo 图片路径:C:\Users\你的用户名\Documents\AIGrowthMaterial\logo.png