-
-
Notifications
You must be signed in to change notification settings - Fork 6
1.0
- Introduction
- Project Structure
- Features
- Development
- Usage
- Contributing
- Code of Conduct
- License
- Why Cohere Instead of OpenAI
The AI Blog Article Generator is a Python-based tool that utilizes the Cohere API to generate high-quality, SEO-optimized blog articles. This tool helps you create engaging, unique, and human-written content based on the specified topic. It can output the content in both HTML and Markdown formats.
The project is organized as follows:
AI-Blog-Article-Generator/
├── config.py # Configuration file for API keys
├── aibag.py # Main script to generate blog content
├── README.md # This file
├── contributing.md # Guidelines for contributing
├── code_of_conduct.md # Code of Conduct for contributors
└── LICENSE.md # License information
- Content Generation: Create high-quality blog articles with specified topics.
- SEO Optimization: Articles are optimized for search engines.
- Language Support: Generate content in different languages.
- Format Options: Output in HTML or Markdown formats.
- Customizable Settings: Specify maximum and minimum word counts, output format, file name, and language.
To develop or contribute to this project, you need Python installed along with the required packages. The primary script (aibag.py
) uses the cohere
and argparse
libraries to interact with the Cohere API and handle command-line arguments.
-
Clone the Repository
git clone https://github.com/OCEANOFANYTHINGOFFICIAL/AI-Blog-Article-Generator.git cd AI-Blog-Article-Generator
-
Install Dependencies
Make sure to install the necessary Python packages:
pip install cohere
or
pip install -r requirements.txt
-
Configure API Key
Go to
config.py
file and replace your Cohere API key with the placeholder:COHERE_API_KEY = 'replace-with-your-cohere-api-key'
The tool is designed to be run from the command line. Here's a detailed explanation of how to use it:
python aibag.py [topic] [OPTIONS]
-
topic
: (Required) The main topic of the blog article.
-
-mw
or--max_words
: Maximum number of words in the generated article.-
Type:
int
-
Example:
-mw 1500
-
Type:
-
-mnw
or--min_words
: Minimum number of words in the generated article.-
Type:
int
-
Example:
-mnw 1000
-
Type:
-
-of
or--output_format
: Format of the output file. Choices areHTML
orMarkdown
.-
Type:
str
-
Default:
HTML
-
Example:
-of Markdown
-
Type:
-
-fn
or--file_name
: Name of the output file (without extension).-
Type:
str
-
Example:
-fn my_blog
-
Type:
-
-l
or--language
: Language of the article. Defaults toEnglish
.-
Type:
str
-
Example:
-l Spanish
-
Type:
Generate a blog article about "The Future of AI" with a maximum length of 1500 words, in HTML format, and name the file future_of_ai
:
python aibag.py "The Future of AI" -mw 1500 -of HTML -fn future_of_ai -l English
We welcome contributions from the community! If you'd like to contribute to the project, please follow these steps:
-
Fork the Repository
-
Create a Branch
git checkout -b feature-branch
-
Make Changes
-
Commit Your Changes
git commit -m "Describe your changes"
-
Push to Your Fork
git push origin feature-branch
-
Create a Pull Request
For detailed guidelines, refer to the CONTRIBUTING.md.
We expect everyone to adhere to our Code of Conduct to ensure a welcoming environment. For more details, see the CODE_OF_CONDUCT.md.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
We use Cohere for this project because it offers a free tier that meets our needs for generating high-quality content without the cost associated with other APIs, like OpenAI. Cohere's API provides powerful text generation capabilities, making it a suitable choice for creating SEO-optimized articles at no cost.
The engineered prompt used in the tool is crafted to ensure that the generated content is SEO-optimized, unique, and engaging. It includes:
- Detailed Instructions: Specifies the style, format, and structure of the content.
- SEO Focus: Ensures that the content is optimized for search engines.
- Human-Like Writing: Emphasizes a conversational and engaging tone.
The prompt directs the AI to produce a structured article with headings and subheadings, ensuring comprehensive coverage of the topic.
If you find this project valuable and want to support its continued development, consider sponsoring me on Ko-fi. Your support helps keep this project going and enables me to continue working on new features and improvements. Thank you!