Skip to content
/ muninn Public

Telegram bot that notifies you about the changes your twitter followings made such as profile photo, bio, name.

License

Notifications You must be signed in to change notification settings

akadir/muninn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muninn

Bot that notifies you about the changes your twitter followings made.

Usage

You can run Muninn as jar file or docker container. In both options, you will need the access tokens for both telegram and twitter bots.

You can create telegram bot using bot father. You will get an access token after you created the bot. This token will be used by Muninn to send notifications.

Another requirement is Twitter tokens. You can get your tokens from twitter developers website. Read permissions would be ok for your Twitter App as Muninn will not need any write operations regarding the authenticated twitter account.

Docker Environment Variable definitions

  • TWITTER_CONSUMER_KEY: Token you can get by creating twitter app
  • TWITTER_CONSUMER_SECRET: Token you can get by creating twitter app
  • TELEGRAM_TOKEN: Token of your telegram bot
  • TELEGRAM_BOT_NAME: Name of your telegram bot
  • MUNINN_RECHECK_PERIOD_IN_HOURS: Delay between checks of changes in hours. 6 means Muninn will check your followings once for every 6 hours.
  • DATA_SOURCE_URL: Url of your postgres database
  • DATA_SOURCE_USERNAME: postgres username
  • DATA_SOURCE_PASSWORD: postgres password
  • FOLLOWING_COUNT_LIMIT: Limit for user's following count. Default 0. 0 means no limit. 10 means users who have more than 10 following will not be authenticated.
  • USER_TIMEZONE: default:UTC Timezone for Muninn

1. Run Application as jar file

  • Initialise postgresql database using init-database.sh or create-tables.sql.
  • Build jar file and related dependencies by mvn package
  • Update variables in fly-muninn.sh
  • Make this script file executable by chmod +x fly-muninn.sh
  • Run application in background by ./fly-muninn.sh > /dev/null 2>&1 &
  • Check logs to see if application running correctly: tail -f log/muninn.log

2. Run Docker Container

  • Update variables in docker-compose.yml
  • Create directories to mount log and database directories:
    mkdir muninn
    mkdir muninn/log
    mkdir muninn/postgres-data
  • Run docker-compose up -d
  • Check log files if application running correctly: tail -f log/muninn.log
  • ps: application may restarts couple of times in the first time because initialisation of the database takes some time.

Starting Bot for Your Account

After you make your Muninn up and running, you can start using your Muninn by opening your telegram app and sending your bot to a \login command.

It will generate a link to authenticate your twitter account and send back to you.

Using that link you can authenticate your account and then start to get messages related to changes your followings made.

You can also use \logout command to disable notifications and \help command to see help.

Built With

Authors

Developed with ❤︎ by akadir

License

This project is licensed under the MIT License - see the LICENSE file for details