@locash_bot
Locash is free and open-source Telegram bot that solve one problem - keeps track of your money ;)
There a lot of apps that do the same. They might be paid, contains ads, they store your data and doesn't allow you to download it until you paid. The project exist in order to provide freely ability to track expensives and incomes.
- track your income/spents
- daily/weekly/monthly/yearly/all/past_seven_days statistics
nvm use
npm install
- create telegram bot in @BotFather and set WebHook
- Copy
message-handler/credentials.example.json
intomessage-handler/credentials.json
- Run
docker run -d -p 8000:8000 amazon/dynamodb-local
- Run
aws dynamodb create-table --cli-input-json file://transactions.json --endpoint-url http://<local-dynamodb>:8000
Run project
./start.bash $(date +%s) [chat_id] [count]
sam build
sam local start-api --env-vars env.json
curl -X POST -H "Content-Type: application/json" -d '{"message":{"chat": {"id": 31}, "text": "-20 coffee", "date": 1601022097 }}' http://127.0.0.1:3000/message/\?token\=<token>
Or
sam build
sam local invoke -e events/message2.json MessageHandlerFunction --env-vars env.json
Echo current date
echo $(date +%s)
Generate transactions
node generate-transactions/index.js $(date +%s) [chat_id] [count] > data.json
Import transactions
aws dynamodb batch-write-item --request-items file://import-transactions.json --endpoint-url http://127.17.0.2:8000