https://github.com/lcpluginmaker/external
Run Go plugins, external scripts and programs from LeoConsole
https://github.com/lcpluginmaker/external
cs dotnet go golang leoconsole leoconsole-plugin plugin scripts
Last synced: 2 months ago
JSON representation
Run Go plugins, external scripts and programs from LeoConsole
- Host: GitHub
- URL: https://github.com/lcpluginmaker/external
- Owner: lcpluginmaker
- License: gpl-3.0
- Created: 2022-01-18T15:51:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-25T11:31:29.000Z (almost 3 years ago)
- Last Synced: 2024-07-31T20:28:25.938Z (10 months ago)
- Topics: cs, dotnet, go, golang, leoconsole, leoconsole-plugin, plugin, scripts
- Language: C#
- Homepage:
- Size: 74.2 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LeoConsole-external-scripts
This plugin enables you to run own scripts or external programs from the
[LeoConsole](https://github.com/BoettcherDasOriginal/LeoConsole).## Installation
External is in the main repository. Just type
```
apkg get external
```## Usage
This plugin adds following commands to your console:
### ` [args...]`
Runs a Go plugin. Any executable in `$SAVEPATH/share/go-plugin` is considered a
Go plugin. Use the [gilc](https://github.com/alexcoder04/gilc) library for
writing Go plugins.### ` [args...]`
Runs a script. It can be a Shell, Python, ... script or even a binary. Every
executable in `$SAVEPATH/share/scripts` is considered a script.The plugin passes the data it can get from LeoConsole in json format encoded
in base64 as the first command-line argument, following the arguments the user
entereddin LeoConsole. Example:```text
$SAVEPATH/share/scripts/ eyJVc2VybmFtZSI6InVzZXIwMSIsIlNhdmVQYXRoIjoiL2hvbWUvdXNlcjAxL0xlb0NvbnNvbGUvZGF0YSIsIkRvd25sb2FkUGF0aCI6Ii9ob21lL3VzZXIwMS9MZW9Db25zb2xlL2RhdGEvdG1wIiwiVmVyc2lvbiI6IjIuMC4wIn0K [args...]
```This base64 string decodes to
```json
{"Username":"user01","SavePath":"/home/user01/LeoConsole/data","DownloadPath":"/home/user01/LeoConsole/data/tmp","Version":"2.0.0"}
```### `exec [args...]`
Executes an arbitrary binary (from your `$PATH`) or using an absolute path.