Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ishanoshada/sl-android
Slandroid is a universal script runner that simplifies running scripts in multiple programming languages. It automatically detects the language, installs missing interpreters or dependencies, and executes the script seamlessly. Whether it's Python, JavaScript, Bash, Ruby, Java, Go, PHP, Perl, C, C++, Rust, or more—Slandroid has you covered!
https://github.com/ishanoshada/sl-android
bash c perl php py pypi python ruby script-runner sh slandroid
Last synced: 3 days ago
JSON representation
Slandroid is a universal script runner that simplifies running scripts in multiple programming languages. It automatically detects the language, installs missing interpreters or dependencies, and executes the script seamlessly. Whether it's Python, JavaScript, Bash, Ruby, Java, Go, PHP, Perl, C, C++, Rust, or more—Slandroid has you covered!
- Host: GitHub
- URL: https://github.com/ishanoshada/sl-android
- Owner: Ishanoshada
- License: mit
- Created: 2025-01-23T18:04:57.000Z (3 days ago)
- Default Branch: main
- Last Pushed: 2025-01-23T18:35:07.000Z (3 days ago)
- Last Synced: 2025-01-23T19:22:17.910Z (3 days ago)
- Topics: bash, c, perl, php, py, pypi, python, ruby, script-runner, sh, slandroid
- Language: Python
- Homepage: https://pypi.org/project/slandroid/
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slandroid
![PyPI](https://img.shields.io/pypi/v/slandroid)
![License](https://img.shields.io/pypi/l/slandroid)**Slandroid** is a universal script runner designed to simplify the execution of scripts written in multiple programming languages. It automatically detects the language of a script, installs the required interpreter or runtime if missing, and runs the script seamlessly. Whether you're working with Python, JavaScript, Bash, Ruby, Java, Go, PHP, Perl, C, C++, Rust, or other languages, Slandroid has you covered.
---
## Table of Contents
1. [Features](#features)
2. [Installation](#installation)
3. [Usage](#usage)
4. [Supported Languages](#supported-languages)
5. [Examples](#examples)
6. [Contributing](#contributing)
7. [License](#license)
8. [Support](#support)---
## Features
- **Multi-Language Support**: Run scripts in Python, JavaScript, Bash, Ruby, Java, Go, PHP, Perl, C, C++, Rust, and more.
- **Automatic Dependency Installation**: Installs missing interpreters or runtimes automatically.
- **Cross-Platform**: Works on Windows, macOS, and Linux.
- **Easy to Use**: Just run `slandroid ` and let Slandroid handle the rest.
- **Extensible**: Add support for new languages by updating the configuration.
- **Advanced Options**: Supports environment variables, timeouts, output redirection, and more.---
## Installation
You can install Slandroid via `pip`:
```bash
pip install slandroid
```---
## Usage
### Running a Script
To run a script, simply use the `slandroid` command followed by the path to the script:
```bash
slandroid path/to/script.py
```Slandroid will automatically detect the script's language, install any required dependencies, and execute the script.
### Advanced Options
- **Set Environment Variables**:
```bash
slandroid --env MY_VAR=value script.py
```- **Set a Timeout**:
```bash
slandroid --timeout 10 script.py
```- **Redirect Output to a File**:
```bash
slandroid --output result.txt script.py
```- **List Supported Languages**:
```bash
slandroid --list-languages
```- **Display Help**:
```bash
slandroid --help
```- **Display Version**:
```bash
slandroid --version
```- **Update Slandroid**:
```bash
slandroid --update
```---
## Supported Languages
Slandroid supports the following programming languages:
| Language | File Extension | Command | Installation Command |
|------------|----------------|---------------|----------------------------|
| Python | `.py` | `python` | `pip install` |
| JavaScript | `.js` | `node` | `npm install -g` |
| Bash | `.sh` | `bash` | None |
| Ruby | `.rb` | `ruby` | `gem install` |
| Java | `.java` | `java` | None |
| Go | `.go` | `go run` | `go install` |
| PHP | `.php` | `php` | `sudo apt install php` |
| Perl | `.pl` | `perl` | `sudo apt install perl` |
| C | `.c` | `gcc` | `sudo apt install gcc` |
| C++ | `.cpp` | `g++` | `sudo apt install g++` |
| Rust | `.rs` | `rustc` | `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` |
| TypeScript | `.ts` | `ts-node` | `npm install -g ts-node` |
| PowerShell | `.ps1` | `pwsh` | `sudo apt install powershell` |
| Lua | `.lua` | `lua` | `sudo apt install lua5.3` |
| R | `.r` | `Rscript` | `sudo apt install r-base` |
| Swift | `.swift` | `swift` | `sudo apt install swift` |
| Kotlin | `.kt` | `kotlin` | `sudo apt install kotlin` |
| Dart | `.dart` | `dart` | `sudo apt install dart` |
| Haskell | `.hs` | `runhaskell` | `sudo apt install haskell-platform` |
| Elixir | `.exs` | `elixir` | `sudo apt install elixir` |---
## Examples
### Python Script (`script.py`)
```python
# script.py
print("Hello from Python!")
```Run the script:
```bash
slandroid script.py
```Output:
```
Hello from Python!
```---
### JavaScript Script (`script.js`)
```javascript
// script.js
console.log("Hello from JavaScript!");
```Run the script:
```bash
slandroid script.js
```Output:
```
Hello from JavaScript!
```---
### Bash Script (`script.sh`)
```bash
#!/bin/bash
echo("Hello from Bash!");
```Run the script:
```bash
slandroid script.sh
```Output:
```
Hello from Bash!
```---
### Rust Script (`script.rs`)
```rust
// script.rs
fn main() {
println!("Hello from Rust!");
}
```Run the script:
```bash
slandroid script.rs
```Output:
```
Hello from Rust!
```---
## Contributing
We welcome contributions to Slandroid! If you'd like to contribute, please follow these steps:
1. Fork the repository on [GitHub](https://github.com/ishanoshada/slandroid).
2. Create a new branch for your feature or bugfix.
3. Submit a pull request with a detailed description of your changes.For bug reports or feature requests, please open an issue on the [GitHub Issues page](https://github.com/ishanoshada/slandroid/issues).
---
## License
Slandroid is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.
---
## Support
If you have any questions or need assistance, feel free to reach out:
- **Email**: [email protected]
- **GitHub Issues**: [https://github.com/ishanoshada/slandroid/issues](https://github.com/ishanoshada/slandroid/issues)---
Happy scripting with Slandroid! 🚀