19 releases
0.2.29 | Apr 6, 2024 |
---|---|
0.2.28 | Apr 6, 2024 |
0.2.25 | Mar 20, 2024 |
0.1.20 | Mar 16, 2024 |
0.1.0 | Jan 15, 2024 |
#244 in Programming languages
39 downloads per month
2MB
2.5K
SLoC
Contains (DOS exe, 140KB) workspace/_.exe
🌈 MOTO: A Versatile Automation & Scripting System
Overview
:moto is a versatile scripting language and automation tool designed to simplify task automation across various environments and languages. It provides a unified and intuitive syntax for defining tasks, leveraging multiple runtimes, and orchestrating complex workflows.
Key Features
- Multi-language Support: :moto seamlessly integrates with multiple programming languages, including Dart, Rust, Python, JavaScript, and more. You can write code in your preferred language within a single :moto script.
- Custom Runtimes: Extend :moto's capabilities by defining custom runtimes for additional languages or execution environments. Specify the necessary setup and execution steps for each language.
- Task Definition and Execution: Define reusable tasks that encapsulate specific actions or operations. Tasks can be associated with different runtimes and executed seamlessly within the :moto script.
- Shell Execution: Execute shell commands and scripts using the built-in
:shell
runtime. Integrate with the underlying operating system for file manipulation, process management, and system operations. - Code Generation: Generate code files dynamically using string interpolation and file output redirection. Create source files in different languages based on the script's logic.
- Text Blocks: Define reusable text blocks that can be referenced and interpolated within tasks or other blocks. Store common code snippets, templates, or static content for easy reuse.
Installation
To install :moto, use the following command:
cargo install moto
Usage
Here's a brief overview of the :moto language syntax:
Variables
let name = "John"
let age = 30
let isMarried = false
let hobbies = ["reading", "coding", "gaming"]
Tasks
task hello {
echo "Hello, $ENV{USER}!"
}:ps
Runtimes
task greetings_from_dart {
void main() {
print("Hello from Dart");
}
}:dart
task greet_from_rust {
fn main() {
println!("Hello from Rust");
}
}:rust
Custom Runtimes
runtime csharp {
let x = 5;
task run {
$something = @'[:block]'@
$something | Out-File -FilePath "./_.cs" -Encoding UTF8
csc "./_.cs"
./_.exe
}:shell
}:moto
Blocks
block story {
Once upon a time, there was a small village.
}:text
task read_story {
echo [:story]
}:ps
Contributing
Contributions to :moto are welcome! If you encounter any issues, have suggestions for improvements, or would like to contribute new features, please open an issue or submit a pull request on the GitHub repository.
Feel free to explore the power and versatility of :moto in your automation and scripting tasks. Happy automating! 🚀
Dependencies
~14–25MB
~376K SLoC