lucabernstein / beancount-bot-tg Goto Github PK
View Code? Open in Web Editor NEWThis telegram bot helps you in recording your beancount transactions easily (e.g. while on the go).
Home Page: https://t.me/LB_Bean_Bot
License: MIT License
This telegram bot helps you in recording your beancount transactions easily (e.g. while on the go).
Home Page: https://t.me/LB_Bean_Bot
License: MIT License
2021/11/30 12:59:56 Encountered error while scanning user tag into var (user: 2332638): sql: Scan error on column index 0, name "tag": converting NULL to string is unsupported
/suggestions -> Lists help of secondary commands to specify
/suggestions list <type>
/suggestions add <type> <value>
/suggestions rm <type> <value>
/suggestions rm <type>
Few suggestions to improve usability :)
/config about or /config version.
With commit and if applicable version tag.
Describe the bug
/suggestions rm accTo [Expenses:Test] does not remove the suggestion from the list
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expenses:Test is removed from the suggestions
/simple
transactions do not ask for date but take today
as default.
If user wants to specify date though, this can be done in the initial /simple [date]
call like /simple 2021-11-24
List suggestions with /suggestions list w/o parameters (prints a list with all suggestions for accTo, accFrom and txDesc)
Change /suggestions list
to /suggestions_list
or add additional command. Do not require account type but list all (as table).
Idea: Use inline buttons
delete
in the same way/list archived
shows all archived transactions
Help text: Are you missing transactions? You might want to check '/list archived'
e.g. 123.45 USD
Need to recheck gocron module functionality or switch lib...
Allow inputs like 3.50+4.20+3,80
('+' operator) and 3.80*10
('*' operator)
Use case: On the christmas market drinking multiple beverages it might be easier to use telegram's draft mode and let the bot calculate the sum.
See #75
/list
on the fly. x
hoursDescribe the bug
At the moment for a /simple tx you get not asked for an amount.
.OnText
binding, check user language (cached?), lookup command and execute. Might require a custom command handler, we might even be able to reuse the subcommands handler./config
/config lang [de|en|...]
bc_tg_bot | 2021/11/03 20:28:27 runtime error: index out of range [5] with length 5
bc_tg_bot | gopkg.in/tucnak/telebot%2ev2.(*Bot).debug
bc_tg_bot | /go/pkg/mod/gopkg.in/tucnak/[email protected]/util.go:14
bc_tg_bot | gopkg.in/tucnak/telebot%2ev2.(*Bot).deferDebug
bc_tg_bot | /go/pkg/mod/gopkg.in/tucnak/[email protected]/util.go:25
bc_tg_bot | runtime.gopanic
bc_tg_bot | /usr/local/go/src/runtime/panic.go:1038
bc_tg_bot | runtime.goPanicIndex
bc_tg_bot | /usr/local/go/src/runtime/panic.go:90
bc_tg_bot | github.com/LucaBernstein/beancount-bot-tg/bot.(*SimpleTx).Input
bc_tg_bot | /src/bot/transactionBuilder.go:120
bc_tg_bot | github.com/LucaBernstein/beancount-bot-tg/bot.(*BotController).handleTextState
bc_tg_bot | /src/bot/controller.go:146
bc_tg_bot | gopkg.in/tucnak/telebot%2ev2.(*Bot).handle.func1
bc_tg_bot | /go/pkg/mod/gopkg.in/tucnak/[email protected]/bot.go:569
bc_tg_bot | gopkg.in/tucnak/telebot%2ev2.(*Bot).runHandler.func1
bc_tg_bot | /go/pkg/mod/gopkg.in/tucnak/[email protected]/util.go:35
bc_tg_bot | runtime.goexit
bc_tg_bot | /usr/local/go/src/runtime/asm_amd64.s:1581
This command should fail:
/suggestions add txDesc "This should be escaped:\""
8.8
does not become 8.80
Just a thought, needs confirmation. Then a fix: Either take everything as one string or require quotes? Also, fail for too many args (write common function to specify min/max args)
To keep amount summing open add +
to end of amount input
If last amount input reached, leave the +
out (alternatively: add 0
to go to next input)
unit is only allowed on last input
write test and cover edge cases
Followup of #15
/suggestions add accFrom
Assets:Cash
Assets:Depot:Example1
e.g. /currency USD
See #11
/config
sNext to /archiveAll
also add a command like /deleteAll
to hard delete transactions from the db.
Require confirmation: /deleteAll yes
level
, from
and to
chatID
and userID
from tb.Message to every log entry (pass message, if != nil, add to message at front)amount: ____,__
to last sent message.<insert package to use>
tb.ModeMarkdown
as additional send option to bot.Send()
tb.ModeMarkdownV2
somehow did not work at all. Maybe RCA is needed here, possibly an issue.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.