|
1 | | -# tele-tracker-v2 |
2 | | -A version 2 python telegram bot to help track daily expenses onto google sheet! |
| 1 | +# Tele-Tracker Bot |
| 2 | +A python telegram bot to help track daily expenses onto google sheet |
| 3 | + |
| 4 | +## Release Notes |
| 5 | +You can find the release notes over [here](https://github.com/brucewzj99/tele-tracker/blob/master/release_notes.md) |
| 6 | + |
| 7 | +## Table of Contents |
| 8 | +- [Getting Started (Users)](#getting-started-users) |
| 9 | +- [Getting Started (Developers)](#getting-started-developers) |
| 10 | +- [Usage](#usage) |
| 11 | +- [Contributing](#contributing) |
| 12 | +- [License](#license) |
| 13 | +- [Contact](#contact) |
| 14 | + |
| 15 | +## Getting Started (Users) |
| 16 | +1. Access the bot on [telegram](https://t.me/telefinance_tracker_bot) |
| 17 | +2. Use the /start command and follow the instructions given. |
| 18 | +4. Remember to edit the `Dropdown` sheet on Google Sheet to get started. |
| 19 | + |
| 20 | +5. Happy using! |
| 21 | + |
| 22 | +## Getting Started (Developers) |
| 23 | +### Step 1 |
| 24 | +* Fork the repo and run the code below to installed the required dependencies |
| 25 | +```python |
| 26 | +pip install -r requirements.txt |
| 27 | +``` |
| 28 | +* Install [ngrok](https://ngrok.com/download) |
| 29 | + |
| 30 | +### Step 2 |
| 31 | +* Go to Google Cloud Platform |
| 32 | +* Set up Google Sheet API, download service account key |
| 33 | +* Retrieve Google Sheet API email |
| 34 | +* Set up Firebase Realtime Database, download service account key |
| 35 | +* Retrieve your firebase database url |
| 36 | +* Set up telegram bot via [BotFather](https://t.me/BotFather) |
| 37 | +* Insert all of them into .env as follows |
| 38 | +```.env |
| 39 | +BOT_TOKEN=your_bot_token |
| 40 | +DATABASE_URL=firebase_url |
| 41 | +GOOGLE_API_EMAIL=google_api_email |
| 42 | +FIREBASE_JSON=service_account_key |
| 43 | +GOOGLE_JSON=service_account_key |
| 44 | +``` |
| 45 | + |
| 46 | +### Step 3 |
| 47 | +* Run ngrok |
| 48 | +```terminal |
| 49 | +ngrok http 5000 |
| 50 | +``` |
| 51 | +* Copy the link, it should look something like this 'https://<address>.ap.ngrok.io' |
| 52 | +* Set up web hook by opening this link: |
| 53 | +```url |
| 54 | +https://api.telegram.org/bot<bot_token>/setwebhook?url=https://<address>.ap.ngrok.io/webhook |
| 55 | +``` |
| 56 | +* You should see this: |
| 57 | +```json |
| 58 | +{"ok":true,"result":true,"description":"Webhook was set"} |
| 59 | +``` |
| 60 | +* Proceed to project directory and run: |
| 61 | +```python |
| 62 | +python3.9 test.py |
| 63 | +``` |
| 64 | + |
| 65 | +## Usage |
| 66 | +/start - Start the bot and configure your Google Sheet for tracking expenses and other entries. |
| 67 | + |
| 68 | +/config - Update your Google Sheet settings or configure quick settings for adding transport and other entries. |
| 69 | + |
| 70 | +/addentry - Add a new entry to your expense tracking system. |
| 71 | + |
| 72 | +/addtransport - Quickly add a new transport entry to your expense tracker. |
| 73 | + |
| 74 | +/addothers - Quickly add another type of entry to your expense tracker. |
| 75 | + |
| 76 | +/addincome - Add a new entry to your income. |
| 77 | + |
| 78 | +/retrievetransaction - Retrieve a transaction from past date. |
| 79 | + |
| 80 | +/cancel - Cancel the previous conversation with the bot and start fresh. |
| 81 | + |
| 82 | +/help - Show help message |
| 83 | + |
| 84 | +## Contributing |
| 85 | +Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. |
| 86 | + |
| 87 | +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue or work on issues that are currently open. |
| 88 | +Don't forget to give the project a star! Thanks again! |
| 89 | + |
| 90 | +1. Fork the Project |
| 91 | +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) |
| 92 | +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) |
| 93 | +4. Push to the Branch (`git push origin feature/AmazingFeature`) |
| 94 | +5. Open a Pull Request |
| 95 | + |
| 96 | +## License |
| 97 | +Distributed under the MIT License. See `LICENSE.txt` for more information. |
| 98 | + |
| 99 | +## Contact |
| 100 | + |
| 101 | + |
| 102 | +LinkedIn: [https://www.linkedin.com/in/brucewzj/](https://www.linkedin.com/in/brucewzj/) |
| 103 | + |
| 104 | +Project Link: [https://github.com/brucewzj99/tele-tracker](https://github.com/brucewzj99/tele-tracker) |
0 commit comments