Skip to content

AlexanderBobryakov/it-blog-news-bot

Repository files navigation

IT Blog News Bot


The project is a telegram bot that scans various IT blogs and publishes them in a telegram channel.

Channel link - IT Blog News
Contact the author via Telegram - @appp_master

License

Supported Blogs

Technical blogs

Fingerprint blogs

Description

The bot regularly scans blogs, forms publications from them for each individual blog post and publishes links to them in the channel with a description, preview (where possible), date and tag.

The bot is resistant to restarts and does not duplicate articles already published in the channel. The state is stored in the channel's pinned message.

Blog parsing is implemented via the RSS protocol (where possible) or via manual parsing of pages using the Jsoup library

Additional features

  • (disabled by community requests) Translation of articles into Russian via Google Translate. To enable the function, you must pass the environment variable USE_TRANSLATOR = true, as well as the google token GOOGLE_TRANSLATE_TOKEN (see stackoverflow)

Environment variables

The required variables are listed in the com.asbobryakov.bot.blognews.config.Env file:

  • CHANNEL_ID - the identifier of the telegram channel to which the bot is connected
  • BOT_TOKEN - the secret token of the bot, received from Telegram when it was created
  • GOOGLE_TRANSLATE_TOKEN - a secret token from Google to provide the ability to use translation
  • USE_TRANSLATOR - the flag for translating the description of articles

Requirements

  • Java 17 (+ Gradle)
  • Telegram API

Local launch

Build:

$ ./gradlew shadowJar

Running a project via Docker:

docker build -t it-blog-news-bot-app .
docker run -p 8080:8080 --name it-blog-news-bot-container it-blog-news-bot-app

Port 8080 is configured for healthcheck running java program (see Dockerfile and healthcheck.py)

CI/CD

Deployment is carried out to the Amvera cloud via web hook implementation. Link to the it-blog-news-bot project Project owner appp-master

Testing

There are no tests in the repository yet, actual testing is done through a secondary testing channel IT Blog News TEST

About

Bot for telegram-blog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors