Giter Club home page Giter Club logo

telegramgenerator's Introduction

News Generation Telegram Bot

This Telegram bot generates new news articles from URLs and publishes them to a Strapi CMS. It uses AI to rewrite content and generate images, providing a seamless workflow for content creation and publication.

Features

  • Extracts content from given URLs
  • Generates new articles using OpenAI's GPT models
  • Creates images for articles using DALL-E
  • Publishes content to Strapi CMS
  • Offers options to regenerate content or images
  • Supports multiple languages (outputs in Spanish by default)

Prerequisites

  • Node.js
  • NPM or Yarn
  • Telegram Bot Token
  • OpenAI API Key
  • Strapi CMS instance

Installation

  1. Clone the repository:

    git clone https://github.com/drumst0ck/telegramGenerator
    cd telegramGenerator
    
  2. Install dependencies:

    npm install
    
  3. Update the Strapi configuration in the publishToStrapi function to match your CMS structure.

Usage

  1. Start the bot:

    npm start
    
  2. In Telegram, send a URL of a news article to the bot.

  3. The bot will generate new content and an image, then provide options to:

    • Generate a new image
    • Generate new content
    • Regenerate both content and image
    • Publish to Strapi

Customization

  • To change the output language, modify the system message in the generateContent function.
  • To publish to a different CMS, update the publishToStrapi function with the appropriate API calls.
  • Adjust the image generation prompt in the generateImage function to suit your needs.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

  • OpenAI for GPT and DALL-E APIs
  • Telegram Bot API
  • Strapi CMS

Disclaimer

This bot is for educational purposes only. Ensure you have the right to use and republish content before doing so.

telegramgenerator's People

Contributors

drumst0ck avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.