firefly-iii-fints-importer icon indicating copy to clipboard operation
firefly-iii-fints-importer copied to clipboard

Pr automate without js

Open Bur0k opened this issue 2 years ago • 1 comments

This bases on #63 and #70

This PR on its own adds following functionality:

  1. The standard 5 transaction batched TransactionImporter was renamed to XXXBatched
  2. A second TransactionImport which processes all Transactions at once can be chosen in the configfile through the variable "use_non_batched_import": "true"
  3. 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

Bur0k avatar May 22 '22 19:05 Bur0k

I just rebased the changes.

Now only the needed commits are in here

Bur0k avatar Oct 13 '22 22:10 Bur0k

Hi @bnw

Just wanted to ask what you think about this PR?

Bur0k avatar Mar 25 '23 10:03 Bur0k

* 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 :)

Bur0k avatar Mar 25 '23 23:03 Bur0k

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?

Bur0k avatar Apr 11 '23 01:04 Bur0k

Hello, I hope the fixes regarding your 2 remarks are okay. Is there any other issue I could address?

Bur0k avatar Jul 04 '23 18:07 Bur0k

Thanks a lot for your work! :)

bnw avatar Jul 23 '23 13:07 bnw