Thanks both for these comments. I understand that this is simple seeming but potentially harder to do in real world.
Docker can be a problem in my experience. It seems like such a great idea but noobs don't know how to use it out of the box, so not much help in real world.
I agree with Yaw that the scripts would be written by one person but used by another who potentially has less computer background. Good example is our work in DRC ebola outbreak where we had to help field workers to install software (easy enough as packaged builds available) and then run scripts (much harder for most people). We ended up using RStudio as a GUI, calling odk briefcase via command line with system calls from R. This basically worked fine, except that briefcase is slower via command line and we still have to get users to run a script to get it to work. In real terms that only really meant pushing the source button, but even seeing code on their screen freaks some people out and there is always the risk that they might change the script as it is open on their console.
Briefcase remembers settings between sessions, so using it as a GUI that could control R or whatever would be far superior.
I'm no programmer really and this is probably naïve, but I would assume that this could be done using the following approach
- User tells briefcase what target script to run [x.py / x.R / x.sh] via a box in GUI
- Briefcase runs an internal script that
i) detects the OS type (linux/osx/windows)
ii) reads the file extension of the target script to determine what kind of script it is (from a small library of formats like perl, python, R, bash, whatever windows has)
iii) runs a system call to the correct programme based on file extension [python x.py / rscript x.R / ./x.sh]
iv) The target script is then responsible for spawning any downstream system calls (which is up to the developer of those scripts)
So the briefcase part only needs to be responsible for kicking off the downstream scripts as system calls. The system commands for mac/linux and pc might differ slightly and I guess linux flavoured scripts can't be run on windows, but that's not a problem as long as briefcase knows which ones are which.
Chrissy h