Skip to content

Introducing DollarBot: a smart Telegram Bot to track your spending and savings.

License

Notifications You must be signed in to change notification settings

Giftamogelang/dollar_bot_SE23

Β 
Β 

Repository files navigation

πŸ’° Dollar Bot πŸ’°

Table of Contents

  1. What's DollarBot?
  2. Why use DollarBot?
  3. Demo
  4. What's new in this version?
  5. Installation and Setup
  6. How to use?
  7. Contributors
  8. Future Work
  9. Acknowledgements

Are you a developer? Click here: For Developers and Future Contributors

MIT license Platform GitHub GitHub contributors DOI Build Status codecov GitHub closed issues


What's DollarBot?

DollarBot is a handy little bot built on top of Telegram, to help you with daily expense tracking and analytics on your past spends.

It's easy to setup, run and use on a daily basis!

Click here for a video overview!!

Why use DollarBot?

With simple in-chat commands, this bot helps you:

  • Set your own customized budget
  • Add/Record new spendings
  • Display your spending trends through engaging graphs
  • Predict your next month's budget based on your current expenditure
  • Display your spending history
  • Clear/Erase all your records
  • Edit/Change any spending details if you wish to
  • View Analytics and export as a pdf

Demo

Demo Video -> [https://www.youtube.com/watch?v=XlndmRhr9Lc]

What's new?

We've considerably extended this project to make using DollarBot easy and engaging.\

  1. Expressive Graphs
  2. Budget prediction
  3. Clearer and more informative PDF Reports
  4. Ability to add recurring expenses
  5. Budget Creation Updated
  6. Clearer wording in the documentation

Check this documentation out for an in-depth depiction of our changes. :)

Installation and Setup

Pre-requisite: The Telegram Desktop App

Since DollarBot is built on top of Telegram, you'll first need:

  1. Download the Telegram Desktop Application here. https://desktop.telegram.org/
  2. Create a Telegram account or Sign in.

Open up your terminal and let's get started:

MacOS / Ubuntu Users

  1. Clone this repository to your local system.
   git clone https://github.com/aditikilledar/dollar_bot_SE23/
  1. Start a terminal session in the directory where the project has been cloned. Run the following commands and follow the instructions on-screen to complete the installation.
  chmod a+x setup.sh
  bash setup.sh

There, all done!

The installation is easy for MacOS or on UNIX terminals.

Windows

With Windows, you'll need to use a platform to execute UNIX-like commands in order to execute the setup.sh bash script. Once in the platform, use the steps in the MacOS/Unix Section above to setup DollarBot.

We've used Cygwin, but there are more options like WSL that you can explore.

Additionally, find more hints on Cygwin installation here.

Running DollarBot:

Once you've executed setup.sh, and all dependencies have been installed, you can start running DollarBot by following these instructions.

  1. Open the Telegram Desktop Application and sign in. Once inside Telegram, search for "BotFather". Click on "Start", and enter the following command:
  /newbot
  1. Follow the instructions on screen and choose a name for your bot (e.g., dollarbot). After this, select a UNIQUE username for your bot that ends with "bot", for example: dollarbot_<your_nickname>.

  2. BotFather will now confirm the creation of your bot and provide a TOKEN to access the HTTP API - copy and save this token for future use. Make sure you save this token– don't lose it!

  3. In the repo directory (where you cloned it), run these commands.

(a) grant execution access to a bash script

chmod a+x run.sh

(b) execute the run.sh bash script to start DollarBot

MacOS / Unix
   bash run.sh
Windows
   ./run.sh

Note: It will ask you to paste the API token you received from Telegram while creating your bot (Step 3), so keep that handy. A successful run will generate a message on your terminal that says "TeleBot: Started polling."

  1. In the Telegram app, search for your newly created bot by entering your UNIQUE username and open the bot you created.

  2. Now, on Telegram, enter the "/start" or "menu" command, and you are all set to track your expenses!

Run Automatically at Startup

To run the script automatically at startup / reboot, simply add the .run_forever.sh script to your .bashrc file, which executes whenever you reboot your system. Click here for help adding to .bashrc files.

How to Use

Here's a quick overview of how each of the commands work. Simply enter /<command_name> into the Telegram chat and watch as the magic happens!

/menu: Display commands with their descriptions.

/help: Display the list of commands.

/pdf: Save history as PDF.

/add: This option is for adding your expenses

  1. It will give you the list of categories to choose from.
  2. You will be prompted to enter the amount corresponding to your spending
    3.The message will be prompted to notify the addition of your expense with the amount,date, time and category

/analytics: This option gives user a graphical representation of their expenditures

You will get an option to choose the type of data you want to see.

/predict: This option analyzes your recorded spendings and gives you a budget that will accommodate for them.

/history: This option is to give you the detailed summary of your expenditure with Date, time ,category and amount. A quick lookup into your spendings

/delete: This option is to Clear/Erase all your records

/edit: This option helps you to go back and correct/update the missing details

  1. It will give you the list of your expenses you wish to edit
  2. It will let you change the specific field based on your requirements like amount/date/category

/budget: This option is to set/update/delete the budget.

  1. The Add/update category is to set the new budget or update the existing budget
  2. The view category gives the detail if budget is exceeding or in limit with the difference amount
  3. The delete category allows to delete the budget and start afresh!

Contributors


Aditi Killedar

Shashank Madan


Srinath Srinivasan


Aditya Iyer

Future Work

  • Sharing expenses
  • Windows specific setup scripts
  • Adding notes section while recording expenses
  • Incorporating Machine Learning insights into the Analytics Feature
  • Making DollarBot respond to casual conversation like 'Hi' and 'Bye'

Acknowledgements

  • We would like to express our gratitude πŸ™πŸ» and a big thank you πŸ˜‡ to Prof. Dr. Timothy Menzie for giving us the opportunity to get into the shoes of software building and learning new skills and development process throught the project building.
  • A big thank you 😊 to the Teaching Assistants for their support.
  • Thank you to the previous team 😊 for a thorough ReadMe and deatiled documentation.MyDollarBot
  • Thank you to the ⭐️Telegram bot

About

Introducing DollarBot: a smart Telegram Bot to track your spending and savings.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.7%
  • Shell 1.3%