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
- Host: GitHub
- URL: https://github.com/thesage21/expenses
- Owner: theSage21
- Created: 2019-05-01T14:39:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:34:54.000Z (over 2 years ago)
- Last Synced: 2025-01-28T21:29:10.623Z (3 months ago)
- Language: Python
- Size: 203 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
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/).
## Setup1. 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)
```