Skip to content

rrajpuro/DollarBot

 
 

Repository files navigation


MIT license Style Checker Platform GitHub GitHub contributors DOI Build Status codecov GitHub open issues GitHub closed issues Github pull requests

Fork


💰 DollarBot - Budgeting On The Go 💰

DollarBot is an easy-to-use Telegram Bot that assists you in recording your daily expenses on a local system without any hassle With simple commands. This bot helps you you maintain and manage your expenses. This bot allows you to:

  • Add/Record a new spending
  • Calculate the sum of your expenditure for the current day/month
  • Display your spending history
  • Clear/Erase all your records
  • Edit/Change any spending details if you wish to
  • Recurring expense: Add a recurring expense that adds a certain amount every month to the user's spending, for any given category.
  • Custom category: User can add a new category and delete an existing category as per the needs
  • Budgeting: User can see the budget value for the total expense and/or for each of the existing categories in the /display function
  • Better visualization: Added pie charts, bar graphs with and without budget lines for the user to have a look at the spending history in a better manner Added bar graph in the /history command to see spending across different categories User can see the daily and monthly expenses for spending history

What's New?!

  • Delete particular expenses.
  • Set a daily reminder to track your expenses for either the current day or the current month.
  • Menu button to improve the UI.

Expense tracking made easy!

Table of Contents

Installation

Pre-requisites

Here are some pre-requisites that you'll have to take care of before starting installation:

  1. In Telegram App/Desktop, search for "BotFather". Click on "Start", and enter the following command:
  /newbot
  1. Follow the instructions on screen: a. Choose a name for your bot. b. Select a username for your bot that ends with "bot". (this is a rule from Telegram's side)

  2. BotFather will confirm the creation of your bot and provide a HTTP API access token.

  3. Copy and save this token for future use.

Actual Installation

The below instructions can be followed in order to set-up this bot at your end in a span of few minutes! Let's get started:

  1. Clone this repository to your local system.
  2. Start a terminal session in the directory where the project has been cloned. Run the following command to install the required dependencies:
  pip install -r requirements.txt
  1. In the directory where this repo has been cloned, please run the below command to execute a bash script to run the Telegram Bot:
   ./run.sh

(OR)

   bash run.sh
  1. It will ask you to paste the API token you received from Telegram in pre-requisites step 4.

  2. A successful run will generate a message on your terminal that says "TeleBot: Started polling."

  3. In the Telegram app, search for your newly created bot by entering the username and open the same. Now, on Telegram, enter the "/start" or "/menu" command, and you are all set to track your expenses!

Testing

We use pytest to perform testing on all unit tests together. The command needs to be run from the home directory of the project. The command is:

python run -m pytest test/

(OR)

python -m pytest test/

Code Coverage

Code coverage is part of the build. Every time new code is pushed to the repository, the build is run, and along with it, code coverage is computed. This can be viewed by selecting the build, and then choosing the codecov pop-up on hover.

Locally, we use the coverage package in python for code coverage. The commands to check code coverage in python are as follows:

coverage run -m pytest test/
coverage report

Usage

We have tried to make this application (bot) as easy as possible. It's pretty self explanatory. You can use this bot to manage and track you daily expenses and not worry about loosing track of your expenses. As we also have given in a functionality of graphing and plotting and history of expenses, it becomes easy for the user to track expenses.

Configuration

As a user, there's no need to configure any parameters As a contributor, we have tried to make the system as decoupled as possible so that changes to one module/program doesn't affect other ones. With this being said, here are some configuration knobs that we have exposed for contributors:

  1. Adding categories,
  2. Removing categories,
  3. Graphing changes,
  4. Changing Telegram bot names etc.

Contributing

Thank you for your interest in contributing to DollarBot! Your contributions are highly valued, and this document will help you get started with the process. We have a fully detailed comprehensive document to look out for if you're looking into contributing towards this project! Please refer this CONTRIBUTING.md file.

LICENSE

By contributing to DollarBot, you agree that your contributions will be licensed under the project's open-source license. It's important to understand and respect the licensing terms before contributing. The specific license terms for this project can be found in the LICENSE file.

Acknowledgements

Here is a part where we will acknowledge the contributors for this project (sorted alphabetically)

  • Ajay
  • Jainam
  • Keerthana
  • Rahul

Support

[Add here]

FAQs

  1. Will we need a Telegram account to run this? A. Yes

  2. Will we have to run multiple instances of the server for multiple clients? A. No

  3. How can we reach out to the developers/contributors? A. Look out for the contributors/active developers and contact them.

  4. What if I encounter a bug/have a feature request? A. File in an Issue and then we can discuss further!

Changelogs

[Add here]

Code of Conduct

Please note that we have a Code of Conduct that all contributors are expected to follow. It ensures that our community is welcoming and inclusive.

What more can be done?

Please refer to the issue list available here to see what more can be done to make MyDollarBot better. Please refer to the MyDollarBot project present here to have a look at the tasks to be done, tasks currently in progress and tasks already done.

Demo

You can view the demo here


Title:'DollarBot'

Version:

Description: 'An easy to use Telegram bot to track everyday expenses'

Authors:'Ajay, Jainam, Keerthana, Rahul'

About

CSC 510 Project Repository for Group 67

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.1%
  • Shell 0.9%