RealRaven2000 / FiltaQuilla

Adds many new mail filter actions to Thunderbird
http://quickfilters.quickfolders.org/filtaquilla.html
GNU General Public License v3.0
88 stars 17 forks source link

Question: Results from Run Program? #275

Open TonyGravagno opened 3 months ago

TonyGravagno commented 3 months ago

Is there a way to send results back into Tb from a CLI that's run via Run Program?

If not, consider: Have one filter that runs a program, passing @vars@ to it. Let that write a result to disk. Then have another filter following that which reads the results from the file system.

Does the JS functionality even have permission to read/write with the file system?

👍 or 👎 ?

RealRaven2000 commented 3 months ago

Is there a way to send results back into Tb from a CLI that's run via Run Program?

If not, consider: Have one filter that runs a program, passing @vars@ to it. Let that write a result to disk. Then have another filter following that which reads the results from the file system.

Does the JS functionality even have permission to read/write with the file system?

👍 or 👎 ?

So the extensions API has no access to disk (it cannot browse files or see folders), but legacy code has, that's how I do stuff like saving mail to disk or exporting filters (quickFIlters). One would need to write a test in a FiltaQuilla JavaScript action, to see where access is. If it is about storing single variables the best place would be local storage or the config database, but there is always the danger that the system gets flooded with data if you run filters affecting many 100 emails. I think local storage would be good specially if it can be set up in a way that the contents clear on restart. This would be something I could ask John Bieling about in the next Add-on developer meeting.

I would make all filter actions and conditions in a way that they do not necessarily depend on other specific filters (as they cannot "see" each other and have no unique names). Storing meta information about messages would need to be keyed from legacy message id (available from the filter action / search term during filter execution)...