You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a plugin system in foliadocserve and FLAT, that allows custom Python scripts to be executed in the context of the foliadocserve. This would add a lot of flexibility and allow custom functionality to be added.
The setup would be as follows:
The plugin is declared in the FLAT configuration, this specifies 1) the python module to import, 2) the function to call in said module, 3) the user parameters the function accepts. 4) A label for a menu entry
A plugin script has to be rewritten and should define an entry function adhering to as specific signature, something like f(namespace,docid, doc, **kwargs) where doc is an instance of folia.Document and allows full read+write access to the document. The output of the function is either 1) an FQL query (possibly with some extra parameters) that tells FLAT what to visualize or 2) an HTML snippet that will be shown in a separate response dialog.
From a user perspective, the user selects an item tied to a plugin in the menu, if any user defined parameters are taken, a dialog pops up to query those. Upon submission of this dialog (or direct click if no parameters are needed), FLAT communicates to foliadocserve to invoke the plugin with said parameters.
Implement a plugin system in foliadocserve and FLAT, that allows custom Python scripts to be executed in the context of the foliadocserve. This would add a lot of flexibility and allow custom functionality to be added.
The setup would be as follows:
f(namespace,docid, doc, **kwargs)
wheredoc
is an instance offolia.Document
and allows full read+write access to the document. The output of the function is either 1) an FQL query (possibly with some extra parameters) that tells FLAT what to visualize or 2) an HTML snippet that will be shown in a separate response dialog.Requested by @ErkanBasar
The text was updated successfully, but these errors were encountered: