hsadok / guiabolso2csv

Baixe os dados de transações do GuiaBolso em formato csv ou xlsx (Excel).
GNU General Public License v3.0
36 stars 16 forks source link

check so as to not export months with no records #2

Closed diogobarreto closed 7 years ago

diogobarreto commented 7 years ago

Hugo, This isn't an issue per say, but it would be great if the program checked if the month had any records before downloading. Perhaps it could even download the CSV, but then immediately check the file for size and, depending on the value, delete it.
I find myself constantly reclassifying things in GuiaBolso and something like this would allow me to create a bat with the 2013 initial date and 2018 end date, for instance, and it would always download the appropriate months. A desired equivalent would be to "download all" existing data, in separate month files (which I believe would require smaller changes to coding), or all at once in a single CSV (at the time, I post process and merge all CSVs into one single database) Thanks again, this program is great! Diogo

hsadok commented 7 years ago

That's an interesting idea. I'll also take a better look at it next month.

hsadok commented 7 years ago

I'm not sure if I understand your issue. Do you have months with no transactions whatsoever? I can't reproduce this since my account has transactions for every month.

diogobarreto commented 7 years ago

It depends on the date interval... for instance, I could give a date that is 5yrs ago, where I have no transactions, until a date 4mo from now, where no transactions are possible. In both cases, it would download empty files for months with no transactions. What I was thinking was that, perhaps, it could check if the file had a registry or size > X before downloading. Thanks for getting back to me on this, this application has been invaluable, cheers!

hsadok commented 7 years ago

I inserted a verification so that months with no transactions are not saved. Instead, a warning is issued.