Skip to content

Jujumba/NewsFromFaridSenpai

Repository files navigation

Telegram-based news aggregator

Build

Prerequisites:

  1. Java 8+
  2. Any supported DBMS (PostgreSQL by default. Add your required driver in build.gradle and change the corresponding keys in application.properties)
  3. Gradle (optionally)

Run database.sql (be careful, it may be not compatible with your DBMS!)

$ ./gradlew bootRun

Note that:

  1. If you have API-keys for OpenAI's GPT-3 and Google Translate, you can paste them in the application.properties. Once it's done, be sure to set the has_translate flag to true

Api

You can retrieve news from project's Rest-API

An example:

curl -H 'Authorization: <API-KEY FROM YOUR PROFILE>' -H 'Content-Type: application/json' -d 'amount: <Amount>' localhost:8080/api/v1

Params:

  1. Your API-KEY
  2. Amount of news (optionally, 1 by default) specifies amount of the latest to be returned

If you want for more functionality, I'll be glad to leave this task for you<(^.^)>. Or simply: code it yourself. And be sure to create a pull request!

Check out request.py to see simple Python example

Adding your source

  1. Get the link of a channel to be parsed (https://t.me/s/<name_of_channel>)
  2. Paste it into the new line in the sources file

About

Telegram-based news aggregator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published