This project utilizes OpenAI's GPT-4o model to generate and audit blog posts and DALL-E 3 to generate images for the blog posts. The program automates the creation of SEO-optimized content and relevant images, ensuring high-quality, engaging blog posts.
git clone https://github.com/yourusername/blog-post-generator.git
cd blog-post-generator
To generate blog posts, the keywords.py file must be populated with topics and their associated keywords. This list is crucial as it directs the content generation process for each blog post.
KEYWORDS_LIST
The KEYWORDS_LIST is an array of dictionaries, where each dictionary represents a blog topic and its related keywords. Here's the structure:
KEYWORDS_LIST = [
{"topic": "Topic Name", "keywords": ["keyword1", "keyword2", "keyword3"]},
]
To add a new blog post topic along with its keywords, append a new dictionary to the KEYWORDS_LIST with the topic and an array of keywords.
Note that with every program run all blogs in the keywords list will be generated so remove the ones you do not want to generate.
By carefully selecting topics and corresponding keywords, you can tailor the content generation to meet specific themes and focus areas, enhancing the relevance and quality of your blog posts.
pip install openai requests
Replace 'your-openai-api-key' in the config.py file with your actual OpenAI API key.
Navigate to your project directory in the terminal and execute:
python main.py
This will generate blog posts, audit them, create image descriptions, generate images, and save all these contents into their respective directories on the file system.