Skip to content

sandeshghanta/Status_Update_Bot

Repository files navigation

Status Update Bot

A telegram bot which gets the status updates of the amfoss members and sends them to you personally via chat.

Getting Started

  1. Clone the repository
  2. Install Python 3.7 in your system. link
  3. Install the python modules required the script to work.

There are several other modules which this script uses like json, base64, os etc.. these modules are already installed so there is no need to do any kind of special installation

Running the tests

Will add them soon

Break down into end to end tests

Will add them soon

Give an example

Deployment

To deploy this script online one must have access to a free hosting platform like pythonanywhere and also must be a member in a google groups where emails are sent regularly. The title of the email should satisfy the given requirements i.e "[FOSS-2017] Status Update-13/10/18". Since being a member of a google group where such kinds of mails are regularly sent is difficult, it is recommended to change the name of the mail to be searched by modifying the code in this file

It is NOT necessary to create a webserver and telegram bot to fix most of the issues. You can just modify the code and send a PR. I will look into it and tell you the changes needed to be made.

Anyone who wants to contribute can test their changes by

  1. To test the bot you must create your own bot in telegram
  2. To host the code you can use any free hosting server pythonanywhere is recommended
  3. You must set up a webhook liking the bot to the webserver link
  4. While hosting the code in the webserver make sure you change the values in the values.json file. You must give the details of your telegram bot.
  5. Also make sure you add the gmail api keys required by the gmail_api.py file to the server. To do this just generate your keys just follow this At the end of the process you will be getting two files credentials.json and token.json. Just upload those files to the server too.
  6. Use this link for reference while uploading to pythonanywhere
  7. The gmail_api.py script sends the daily notifications to users. This script is run everyday at 23:45 UTC via a cron job. In your server you can change the time according to your choice. Use this link to know how to set up a cron job in pythonanywhere
  8. The following tables exist in the database accepted_users admin mails pending-requests user

Screenshots

Will add them soon

Built With

Authors

License

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

Acknowledgments

  • I would like to thank pythonanywhere for providing a free hosting platform and google, telegram for providing such wonderful api's

About

A telegram bot for getting status updates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages