https://github.com/commonwealthrobotics/bowler-script-kernel
The CLI and API layer for the Bowler ScriptingEngine and all its dependant libraries.
https://github.com/commonwealthrobotics/bowler-script-kernel
Last synced: 12 months ago
JSON representation
The CLI and API layer for the Bowler ScriptingEngine and all its dependant libraries.
- Host: GitHub
- URL: https://github.com/commonwealthrobotics/bowler-script-kernel
- Owner: CommonWealthRobotics
- License: lgpl-3.0
- Created: 2016-08-22T20:50:50.000Z (over 9 years ago)
- Default Branch: development
- Last Pushed: 2024-11-10T15:01:16.000Z (over 1 year ago)
- Last Synced: 2024-11-10T15:18:54.452Z (over 1 year ago)
- Language: Java
- Size: 291 MB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Documentation
[Javadoc Generated Documentation](https://commonwealthrobotics.com/bowler-script-kernel/namespaces.html)
# Bowler Kernel Scripting environment
[](https://gitter.im/NeuronRobotics/bowler-script-kernel?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
This is the core kernel mechanism for the Bowler operating system. It consists of a modular scripting environment. This engine passes Lists of JVM objects back and forth across languages, letting you mix Java, Groovy, Clojure and Python within a single memory sharing application. The sources are stored in git repos and hyperlink at the source level to add modules. You can call this application from the command line like bash and pass it scripts to run sequentially or pipe the output from one into the input of another.
## All platforms
You need to use the installer from
* [BowlerStudio Installer](https://github.com/CommonWealthRobotics/BowlerStudio/releases)
## Usage
This will let you pass code snippets directly to the scripting engine
```
Object returnVal = ScriptingEngine.inlineScriptRun(String code, ArrayList args,ShellType activeType)
```
This will let you load code directly out of a github gist:
This code will load this github gist:
https://gist.github.com/madhephaestus/d4312a0787456ec27a2a
```
Object returnVal = ScriptingEngine.inlineGistScriptRun("d4312a0787456ec27a2a", "helloWorld.groovy" ,null)
```
# Embed as a library in your projects
## Maven

```
com.neuronrobotics
BowlerScriptingKernel
VERSION_FROM_BADGE
```
## Gradle

```
dependencies {
compile "com.neuronrobotics:BowlerScriptingKernel:VERSION_FROM_BADGE"
}
```
## All platforms
```
Usage:
java -jar BowlerScriptKernel.jar -s .. # This will load one script after the next
java -jar BowlerScriptKernel.jar -p .. # This will load one script then take the list of objects returned and pass them to the next script as its 'args' variable
java -jar BowlerScriptKernel.jar -r #Starts a repl for interactive robot coding
java -jar BowlerScriptKernel.jar -g # Runs a file from its git location
```