Skip to content

Releases: OCEANOFANYTHINGOFFICIAL/AI-Blog-Article-Generator

2.0

17 Aug 14:44
Compare
Choose a tag to compare

AI Blog Article Generator 2.0

Logo

GitHub license Version GitHub issues GitHub stars GitHub forks GitHub last commit

Table of Contents

  1. Introduction
  2. Project Structure
  3. Features
  4. Development
  5. Usage
  6. Contributing
  7. Code of Conduct
  8. License
  9. Why Cohere Instead of OpenAI

Introduction

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.

Project Structure

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

Features

  • 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, Markdown, and GitHub README formats.
  • Customizable Settings: Specify maximum and minimum word counts, output format, file name, and language.
  • Enhanced Error Handling: Advanced functions like timeout and retry for improved reliability.
  • Dynamic Image Integration: Automatically fetch relevant images from Unsplash based on the topic.

Development

To develop or contribute to this project, you need Python installed along with the required packages. The primary script (aibag.py) uses the cohere, colorama, retrying and argparse libraries to interact with the Cohere API and handle command-line arguments.

Setting Up

  1. Clone the Repository

    git clone https://github.com/OCEANOFANYTHINGOFFICIAL/AI-Blog-Article-Generator.git
    cd AI-Blog-Article-Generator
  2. Install Dependencies

    Make sure to install the necessary Python packages:

    pip install cohere colorama retrying

    or

    pip install -r requirements.txt
  3. 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'

Usage

The tool is designed to be run from the command line. Here's a detailed explanation of how to use it:

Command-Line Options

python aibag.py [topic] [OPTIONS]
  • topic: (Required) The main topic of the blog article.

Options

  • -mw or --max_words: Maximum number of words in the generated article.

    • Type: int
    • Example: -mw 1500
  • -mnw or --min_words: Minimum number of words in the generated article.

    • Type: int
    • Example: -mnw 1000
  • -of or --output_format: Format of the output file. Choices are HTML, Markdown, or GitHub README.

    • Type: str
    • Default: HTML
    • Example: -of Markdown
  • -fn or --file_name: Name of the output file (without extension).

    • Type: str
    • Example: -fn my_blog
  • -l or --language: Language of the article. Defaults to English.

    • Type: str
    • Example: -l Spanish
  • -gf or --github_readme_format: Convert content to GitHub README format.

    • Type: flag
    • Example: -gf

Example

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

Convert the content to GitHub README format:

python aibag.py "The Future of AI" -mw 1500 -gf -fn future_of_ai -l English

Contributing

We welcome contributions from the community! If you'd like to contribute to the project, please follow these steps:

  1. Fork the Repository

  2. Create a Branch

    git checkout -b feature-branch
  3. Make Changes

  4. Commit Your Changes

    git commit -m "Describe your changes"
  5. Push to Your Fork

    git push origin feature-branch
  6. Create a Pull Request

For detailed guidelines, refer to the CONTRIBUTING.md.

Code of Conduct

We expect everyone to adhere to our Code of Conduct to ensure a welcoming environment. For more details, see the CODE_OF_CONDUCT.md.

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Why Cohere Instead of OpenAI

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.

Engineered Prompt

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.


Summary of Changes

  1. GitHub README Format: Added support for converting content to GitHub README format using the -gf flag.
  2. Enhanced Error Handling: Included advanced functions like timeout and retry.
  3. Dynamic Image Integration: Integrated a method to fetch relevant images from Unsplash based on the topic.
  4. Command-Line Updates: Updated the command-line options to reflect the new features and options.

These updates were necessary to expand the functionality of the tool, improve its robustness, and enhance the user experience.

Some Notes From The Author

When I build this tool, I had a few key objectives in mind:

  1. Ease of Use: I wanted to create a tool that was simple to use and required minimal setup.
  2. Quality Content: I aimed to generate high-quality, SEO-optimized content that could be used for blog articles.
  3. Customization: I wanted users to have the flexibility to customize the output based on their needs.
  4. Reliability: I focused on building a tool that was reliable and could handle errors gracefully.
  5. Cost-Effective: I chose Cohere as the API provider due to its free tier, making it cost-effective for users.
  6. Has The Ability To Generate Content In Different Languages: I wanted to provide support for generating content in multiple languages.
  7. Dynamic Image Integration: I integrated image fetching from Unsplash to enhance the visual appeal of the articles.
  8. Community Contribution: I wanted to create a project that could be contributed to and improved by the community.
  9. SEO Optimization: I ensured that the content generated was optimized for search engines to improve visibility.
  10. GitHub README Format: I added support for converting content to GitHub README format for easy integration into repositories.

This tool is indeed designed to be a valuable resource for bloggers, content creators, and developers looking to generate high-quality content quickly and efficiently.

But, This was not easy to build, I had to face many challenges and issues while building this tool. I had to make sure that the content generated was unique, engaging, and human-like. I also had to handle errors, timeouts, and retries to ensure the tool's reliability.

First, I thought of using OpenAI for this project, but due to the cost associated with it, I decided to go with Cohere, which offers a free tier that meets our needs. Cohere's API provides powerful text generation capabilities, making it a suitable choice for creating SEO-optimized articles at no cost.

Then, I had to find an effective way to integrate dynamic images into the articles. I decided to fetch relevant images from Unsplash based on the topic, enhancing the visual appeal of the content. But Unsplah API was not free, so I had to find a way to fetch images.

Eventually, I found an Image API that was free and could be used to fetch images based on the topic. This integration added a new dimension to the tool, making the articles more visually appealing and engaging. The API allowed me...

Read more

1.1

16 Aug 08:32
6f20145
Compare
Choose a tag to compare
1.1

Release Notes: AI Blog Article Generator - v1.1.0

banner

Release Date: August 16, 2024

What's Changed

  • chore(deps): update actions/checkout action to v4 by @renovate in #10
  • chore(deps): update actions/setup-node action to v4 by @renovate in #12
  • chore(deps): update actions/github-script action to v7 - autoclosed by @renovate in #11
  • chore(deps): update dependency cohere to v5.8.1 by @renovate in #13

Full Changelog: 1.0...1.1

1.0

11 Aug 09:06
f00cc7a
Compare
Choose a tag to compare
1.0

Release Notes: AI Blog Article Generator - v1.0.0

banner

Release Date: August 11, 2024

Overview

We are excited to announce the initial release of the AI Blog Article Generator. This tool leverages Cohere's powerful language models to generate SEO-optimized, human-like blog content with just a few simple commands. The generator is designed to be highly customizable, allowing users to specify various parameters, such as word count, language, and output format (HTML or Markdown).

Features

1. AI-Powered Blog Generation

  • Custom Engineered Prompt: Generates detailed, high-quality content by using a specially crafted prompt designed for SEO and human-like readability.
  • Language Support: Generate content in multiple languages with an easy-to-use language parameter.
  • Customizable Word Count: Specify minimum and maximum word limits to control the length of the generated content.
  • Output Formats: Choose between HTML and Markdown formats for the output, ensuring flexibility in usage.
  • Automatic SEO Metadata: Automatically generates SEO metadata for HTML outputs, helping your content rank better in search engines.

2. Argument Short Forms

  • Ease of Use: Added short forms for all command-line arguments (e.g., -h for --help, -l for --language) to make the tool more user-friendly.

3. Detailed User Feedback

  • Settings Display: Before generating content, the tool displays the user-specified settings, such as language, word count, and output format.

4. Comprehensive Documentation

  • README: An extensive README file is provided, covering everything from installation and usage to contribution guidelines and licensing.
  • Code of Conduct: A Code of Conduct file is included to ensure a welcoming and inclusive environment for contributors.
  • Contribution Guidelines: Detailed contributing.md file outlines how to contribute to the project, including coding standards and how to submit pull requests.
  • Security Policy: A security.md file is included to guide users on how to report vulnerabilities and contribute to the security of the project.

Bug Fixes

General

  • Formatting Corrections: Fixed various formatting issues to ensure clean and professional output in both HTML and Markdown formats.
  • Error Handling: Improved error messages and handling for invalid input parameters.

Known Issues

  • Limited Language Support: Currently, the language support is based on the models provided by Cohere. While extensive, not all languages may be fully supported or may require fine-tuning.
  • Markdown Parsing: Some complex Markdown elements may not render perfectly in the HTML output, depending on the specifics of the content.

Future Plans

  • Improved Language Models: We plan to integrate more advanced language models and offer additional customization for generating content in various styles and tones.
  • Enhanced SEO Capabilities: Future releases will focus on more advanced SEO features, including better keyword placement and automatic internal linking.
  • Integration with Other APIs: Explore the possibility of integrating other APIs for more diverse content generation and formatting options.

Conclusion

This release marks the beginning of an exciting journey for the AI Blog Article Generator. We look forward to your feedback and contributions to make this tool even better!

Thank you for using AI Blog Article Generator!

What's Changed

New Contributors

Full Changelog: https://github.com/OCEANOFANYTHINGOFFICIAL/AI-Blog-Article-Generator/commits/1.0