Skip to content

LittleMoreInteresting/pet-content-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐾 Pet Content Creator for Toutiao

An AI-powered desktop app for one-click pet content creation — from article generation and image sourcing to Word document export, all in one place.

Highlights

  • 🤖 AI-Powered Writing — Leverages the DeepSeek large language model to generate Toutiao-style pet articles based on topic, pet type, and writing style
  • 🖼️ Auto Image Sourcing — Integrated with the free Pexels image library; AI automatically extracts keywords to search and download high-quality images
  • 📄 Word Export — Export articles with images as a formatted .docx Word document in one click
  • 🎛️ Flexible Configuration — Customizable DeepSeek model, word count, image count, writing style, and more
  • 🖥️ Native Desktop Experience — Built with Wails3 for a native window, low memory footprint, and no browser required

Writing Styles

Style Description
📚 Science Professional pet knowledge articles
📋 Guide Practical pet care tips
📖 Story Heartwarming pet stories
⭐ Review Pet product reviews & recommendations
📰 News Pet industry news & trends

Supported Pet Types

🐕 Dog · 🐈 Cat · 🐰 Rabbit · 🐹 Hamster · 🐦 Bird · 🐟 Fish · 🦎 Reptile · 🐾 Other

How It Works

User inputs writing requirements
              ↓
   AI generates article (DeepSeek)
              ↓
   AI extracts image search keywords
              ↓
   Search images (Pexels API)
              ↓
   Download images → Embed in document
              ↓
   Generate Word document (.docx)
              ↓
   Done! Article + Images + Word Export

Tech Stack

Layer Technology
Desktop Wails3 (Go + WebView2)
Backend Go 1.25
Frontend React 18 + TypeScript + Vite
AI Engine DeepSeek Chat Model (via CloudWeGo Eino)
Image API Pexels API
Doc Generation Native OOXML builder (pure Go, zero dependencies)

Project Structure

pet-content-creator/
├── main.go                    # Application entry point
├── go.mod / go.sum            # Go dependencies
├── Taskfile.yml               # Build tasks
├── backend/
│   ├── config.go              # Configuration management (API keys, etc.)
│   ├── agent.go               # AI article generation service
│   ├── pexels.go              # Pexels image search/download
│   ├── word.go                # Word document generation
│   └── creator.go             # Orchestration service (unified entry)
├── frontend/
│   ├── index.html             # Entry page
│   ├── package.json           # Frontend dependencies
│   ├── vite.config.ts         # Vite configuration
│   └── src/
│       ├── main.tsx           # React entry
│       └── App.tsx            # Main UI (form + results)
└── build/                     # Build artifacts

Quick Start

Prerequisites

Install Wails3 CLI

go install github.com/wailsapp/wails/v3/cmd/wails3@latest

Clone & Run

# Clone the repo
git clone <your-repo-url> pet-content-creator
cd pet-content-creator

# Install frontend dependencies
cd frontend
npm install
cd ..

# Development mode (with hot-reload)
wails3 dev

# Production build
wails3 build

Build artifacts will be placed in the build/ directory.

Configure API Keys

On first launch, click the ⚙️ Config button in the top-right corner and fill in:

  • DeepSeek API Key: format sk-xxx
  • DeepSeek Model: default deepseek-chat, can also use deepseek-reasoner
  • Pexels API Key: free after registration

Config is saved at ~/.pet-content-creator/config.json.

Usage

  1. Launch the app and enter a writing topic in the left panel (e.g., "Summer Heat Safety Guide for Dogs")
  2. Select a pet type and writing style
  3. Set the target word count (200–5000) and number of images (0–10)
  4. Optionally add keyword hints to guide the AI
  5. Click 🚀 Start Creating and wait 10–30 seconds
  6. The right panel shows the article preview and images; click 📄 View Word Document to open the exported .docx file

Generated Word files are saved under Documents\PetContentCreator\.

Backend Services

ConfigService

Handles reading and writing of API key and model configuration. API keys are masked when returned to the frontend.

AgentService

Wraps DeepSeek ChatModel calls, builds a Toutiao-style system prompt, and parses the AI response into title, body, and image search keywords.

PexelsService

Calls the Pexels API to search for high-quality royalty-free images. Supports keyword search and image download (10 MB limit).

WordService

Pure Go implementation of OOXML .docx file generation (ZIP-based format). Built-in styles with Microsoft YaHei font, heading layout, and body text styling.

CreatorService

Orchestration service that chains the full pipeline: AI generation → image search → image download → Word generation.

Docker Deployment (Server Mode)

The project also supports a headless server mode with HTTP API access:

# Build Docker image
task build:docker

# Run Docker container
task run:docker

License

MIT License


Star ⭐ and Issues 🐛 are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors