utkuufuk / budget-cli

Manage your Google budget spreadsheets from terminal
https://utkuufuk.com/2018/11/10/budget-cli
MIT License
34 stars 6 forks source link

Add transactions in batch through text file #12

Closed vitokhangnguyen closed 5 years ago

vitokhangnguyen commented 5 years ago

Right now, all transactions are added individually. I think it is a good idea for the user to be able to add many of them at the same time through a text file.

A scenario this can be useful is that the user does not have a network connection at the moment. Writing all transactions down on a file and process them at the same time would help.

The new command syntax can be:

budget add --file-path ~/path/to/text/file.txt

File format can be:

# Text file can have comments and should be ignored
expense: 900, Rent, House
expense: Aug 8, 60, Gas, Other
income: Oct 11, 2000, Paycheck, Paycheck
income: 150, Paycheck, Bonus

How do you think?

utkuufuk commented 5 years ago

@vitokhangnguyen TBH I don't expect this to be used as much as edit or delete, but might prove useful once in a while in some cases as you mentioned.

I'd prefer a command like this though:

budget insert /path/to/file

And a format consistent with expense & income commands, so the user won't have to remember 2 formats:

expense "900, Rent, House"
expense "Aug 8, 60, Gas, Other"
income "Oct 11, 2000, Paycheck, Paycheck"
income "150, Paycheck, Bonus"

Feel free to work on this if you like 👍

vitokhangnguyen commented 5 years ago

My colleague Grommers00 and I will work on this. We will try to get it done as soon as possible given the time we have.

Grommers00 commented 5 years ago

Yes, we will work on it together.