68 lines
2.1 KiB
Markdown
Raw 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.

# Travel Content Creator
自动化旅游内容创作工具使用AI生成旅游相关的文案和海报。
## 项目结构
```
TravelContentCreator/
├── core/ # 核心功能模块
│ ├── ai/ # AI交互相关
│ ├── config/ # 配置管理
│ └── exception/ # 异常处理
├── tweet/ # 文字内容生成模块
│ ├── topic_generator.py # 选题生成器
│ ├── content_generator.py # 内容生成器
│ ├── content_judger.py # 内容审核器
│ └── topic_parser.py # 选题解析器
├── poster/ # 海报生成模块
│ ├── templates/ # 海报模板
│ ├── poster_generator.py # 海报生成器
│ ├── text_generator.py # 海报文案生成器
│ └── utils.py # 图像处理工具
├── utils/ # 通用工具
│ ├── file_io/ # 文件操作
│ └── prompts/ # 提示词模板
├── config/ # 配置文件目录
├── result/ # 输出结果目录
├── main.py # 主入口文件
└── README.md # 项目说明
```
## 功能模块
### 文字内容生成模块 (tweet)
- **topic_generator.py**: 负责生成旅游相关的选题
- **content_generator.py**: 根据选题生成详细内容
- **content_judger.py**: 审核和优化生成的内容
- **topic_parser.py**: 解析AI返回的选题数据
### 海报生成模块 (poster)
- **poster_generator.py**: 负责生成海报图像
- **text_generator.py**: 为海报生成文案
- **templates/**: 不同风格的海报模板
- **utils.py**: 图像处理、文本渲染和颜色提取工具
## 使用方法
1. 安装依赖:
```bash
pip install -r requirements.txt
```
2. 配置:
`config` 目录下修改相应的配置文件。
3. 运行:
```bash
python main.py
```
## 配置说明
- **ai_model.json**: AI模型配置
- **topic_gen.json**: 选题生成配置
- **content_gen.json**: 内容生成配置
- **poster.json**: 海报生成配置