Este repositório contém um bot de conversa para o Telegram que facilita a organização e registro de gastos monetários. O bot cria e edita arquivos .xlsx
com o nome do usuário e o ano escolhido (até 6 anos atrás ou 3 anos no futuro). Ele automaticamente cria planilhas com todos os meses do ano selecionado, permitindo que você acompanhe seus gastos mês a mês.
-
Adicionar Gastos:
- O bot permite que você adicione novos gastos ao mês escolhido.
- Você pode especificar o nome do gasto e o valor correspondente (Em Real Brasileiro, BRL).
-
Listar Gastos:
- É possível listar todos os gastos, com seus respectivos valores, registrados no mês selecionado.
-
Somar Gastos:
- O bot calcula automaticamente o total dos gastos no mês escolhido.
-
Editar Gastos:
- Caso você cometa algum erro, pode editar tanto o nome quanto o valor de um gasto já registrado.
-
Escolher o Ano:
- A seleção do ano é simples e intuitiva.
- No entanto, se o ano do nome do arquivo exceder 6 anos da data atual, o bot nao poderá executar edições, pois ele irá ignorar tais arquivos .
O bot, está disponivel apenas em pt-BR no momento.
- Certifique-se de que "pyTelegramBotAPI" e "openpyxl" estejam instalados, executando
pip install pyTelegramBotAPI
epip install openpyxl
no diretorio do bot - Clone este repositório para o seu ambiente local.
- Edite a linha keytel() no codigo no arquivo
BotTelegram.py
para usar sua propria key API. - Execute o bot e mande uma mensagem contendo "/start"
- Os arquivos
.xlsx
serão criados no diretório onde os arquivosBotTelegram.py
eintegracaoExcel.py
estão localizados. - Certifique-se de ajustar as permissões de escrita no diretório para que o bot possa criar e editar os arquivos.
This repository contains a Telegram chatbot designed to simplify the organization and tracking of monetary expenses. The bot creates and edits .xlsx
files with the user's name and the chosen year (up to 6 years in the past or 3 years in the future). It automatically generates spreadsheets with all the months of the selected year, allowing users to monitor their monthly spending.
-
Add Expenses:
- The bot allows users to add new expenses for the chosen month.
- Users can specify the expense name and corresponding value (in Brazilian Real, BRL).
-
List Expenses:
- Users can list all expenses, along with their respective values (in BRL), for the selected month.
-
Sum Expenses:
- The bot automatically calculates the total expenses (in BRL) for the chosen month.
-
Edit Expenses:
- If users make a mistake, they can edit both the name and value of a previously recorded expense.
-
Choose the Year:
- Year selection is straightforward and intuitive.
- However, if the year in the file name exceeds 6 years from the current date, the bot will not be able to create new edits, ignoring such files.
The bot is currently available only in pt-BR for the moment.
- Make sure that "pyTelegramBotAPI" and "openpyxl" is installed in your bot directory by entering
pip install pyTelegramBotAPI
andpip install openpyxl
- Clone this repository to your local environment.
- Edit the line "keytel()" in the
BotTelegram.py
to your own key API. - Run the bot and send a message containing only "/start"
- The
.xlsx
files will be created in the directory where theBotTelegram.py
andintegracaoExcel.py
files are located. - Ensure that the directory has write permissions so that the bot can create and edit files.