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.
- 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
- 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
- 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.
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.
- TelegramBots - Java Library for Telegram Bots
- Twitter4J - Java Library for Twitter API
- rate-limit-handler - Simple utility package to handle Twitter API Rate Limits
- Spring Framework - Dependency Injection, Data Access, Task Scheduling
- Project Lombok - Java Library for generating of getter, setters
- diff-match-patch - Generate diffs between two text
- java-diff-utils - Another library to generate diffs between two text
- apache-commons - Generate JSON style toString methods
- Logback - Logging frameworks for java
- Maven - Dependency Management
- Docker - Containerisation of Application
This project is licensed under the MIT License - see the LICENSE file for details