An open API service indexing awesome lists of open source software.

https://github.com/thesage21/expenses

Track Expenses automatically for analysis etc
https://github.com/thesage21/expenses

Last synced: about 1 month ago
JSON representation

Track Expenses automatically for analysis etc

Awesome Lists containing this project

README

        

# Expenses

A Telegram bot that helps you keep a track of your spending.

## Features

- Auto track smses when coupled with TelegramSms android app.
- Automatically tags messages with information found in the sms so that you can quickly search for it later on in telegram.
- You can import Walnut expense reports to backfill your database.
- `/report` returns monthly totals.

## Coming soon

- You can set budgets so that you get warned if you overshoot.

## Pre-requisites

- Install Python from [python.org](https://www.python.org/).
- Install pip from [pip.pypa.io](https://pip.pypa.io/en/stable/installing/).

## Setup

1. Fork [this](https://github.com/theSage21/expenses.git) repository.
2. Clone the forked repository locally using `git clone https://github.com//expenses.git`
3. Navigate to the project directory. `cd expenses`
4. Create virtual environment. `python -m virtualenv venv`
5. Activate the virtual environment. `source venv/bin/activate`
6. Create a private group in telegram.
7. Create a telegram bot using botfather. Turn off group privacy in bot settings.
8. Run this code using the telegram token given to you by botfather.
```
python -m expenses --tgtoken
```
9. Use TelegramSms android app to forward all smses coming to your phone to this group. See setup instructions for that.
10. Set up a user bot to echo messages received from the sms bot since bots cannot see each other's messages.

## Docker setup

```bash
# Assuming you have docker, git installed already
git clone https://github.com//expenses.git
cd expenses
docker build -t expenses .
echo "export TG_TOKEN=''" > .env
(source .env && docker run --user "$(id -u):$(id -g)" --detach -v $PWD:/src --restart always -e TG_TOKEN expenses)
```