firefly-iii-fints-importer
firefly-iii-fints-importer copied to clipboard
Pr automate without js
This bases on #63 and #70
This PR on its own adds following functionality:
- The standard 5 transaction batched TransactionImporter was renamed to XXXBatched
- A second TransactionImport which processes all Transactions at once can be chosen in the configfile through the variable
"use_non_batched_import": "true"
- Adding
automate=true
as a GET parameter automates everything without the use of JS. This is extremely useful to automate the Firefly III FinTS Importer. Now the URL can be periodically be queried with CURL/WGET/... or other commandline tools that do not support JS
I just rebased the changes.
Now only the needed commits are in here
Hi @bnw
Just wanted to ask what you think about this PR?
* Why did you introduce the concept of non-batched imports? Could you use the return value of `RunImportBatched` to cause it to be called multiple times until all transactions are imported (like you do with the other steps)?
Actually i don't even know why i chose that way. Maybe it had a reason or it was just the easy quick and dirty way. I'll look into reusing the code
* Could you extend the ReadMe to describe what the automation does and how one can use it?
Will do
Thanks a lot for your contribution! I think this is a feature many users would like to have :)
Thank you for starting the project and maintaining it :)
I tried to use the same logic and modified the codepath as follows:
Regardless if JS is used or not, a batched import will be done. If the automate_without_js
variable is true, the RunImportWithoutJson
function is called which basically does the same as RunImportWithJS
, but in a loop in php
.
What do you think?
Hello, I hope the fixes regarding your 2 remarks are okay. Is there any other issue I could address?
Thanks a lot for your work! :)