moto

Crates.iomoto
lib.rsmoto
version0.2.29
sourcesrc
created_at2024-01-15 08:11:35.568358
updated_at2024-04-06 01:14:50.77714
descriptionmoto - motivated automation
homepage
repositoryhttps://github.com/moniverse/moto
max_upload_size
id1100159
size2,404,146
incredimo (incredimo)

documentation

README

🌈 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! 🚀

Commit count: 49

cargo fmt