The past 20+ years of scripting in sl have lead to a wealth of tools and personalized workflows.
This plugin could never accommodate them all so instead it would be nice to allow people to keep using some of their tools if they so wish.
I propose adding some configuration that the plugin would read, and during the save process, before and or after the preprocessor (enabeld or not) is run, the plugin executes given commands and takes their output.
Example
Say the following format is used for config
{
"slVscodeEdit.externalTooling.afterPreProcessor": [
{
"command": "python ~/lsl/lsl-pyoptimizer/main.py --bom {inputFile}",
"input": "file",
"output": "std",
"languages": ["lsl"]
}
]
}
On save the plugin would :
- Run the built in preprocessor (if enabled)
- Check config for steps to run
- Filter for ones that match langauge
- Find the step, check it's input and output types - If input is
file save the script content to a temporary file
- If output is
file, generate a temporary filename
- Execute the command filling in relevant tokens and piping script through
stdin if needed
- Read the response in std out / once command is complete from
{outputFile}
- Continue as the script sync to the viewer as normal with the new output
This should allow scripters with more advanced workflows to implement their process, while getting the benefits of the plugin
The past 20+ years of scripting in sl have lead to a wealth of tools and personalized workflows.
This plugin could never accommodate them all so instead it would be nice to allow people to keep using some of their tools if they so wish.
I propose adding some configuration that the plugin would read, and during the save process, before and or after the preprocessor (enabeld or not) is run, the plugin executes given commands and takes their output.
Example
Say the following format is used for config
{ "slVscodeEdit.externalTooling.afterPreProcessor": [ { "command": "python ~/lsl/lsl-pyoptimizer/main.py --bom {inputFile}", "input": "file", "output": "std", "languages": ["lsl"] } ] }On save the plugin would :
filesave the script content to a temporary filefile, generate a temporary filenamestdinif needed{outputFile}This should allow scripters with more advanced workflows to implement their process, while getting the benefits of the plugin