#cli #template #replace #cli-tool #megumin

bin+lib megumax

Simple CLI tool for search-and-replace across the entire project

4 releases (2 breaking)

0.3.0 Oct 4, 2020
0.2.1 Jun 26, 2020
0.2.0 Jun 26, 2020
0.1.0 Jun 24, 2020

#169 in #replace

MIT/Apache

44KB
1.5K SLoC

Megumax

Megumax is a simple templating CLI originally made for developing minecraft datapack but the program should work anywhere else as well.

Installation & Usage

Using Cargo

  1. Install rustup.
  2. Install megumax using this command cargo install megumax (make sure you've restart your terminal first)
  3. Create and configure your megu.toml file.
  4. Run megu command inside the directory megu.toml file is in.

Using pre-compiled file

  1. Go to the Release Page.
  2. Download megumax base on your operating system.
  3. Install the executable file, this process will be different for each OS.
    • Linux: Put the executable file inside /usr/bin/ and set its execution permission.
    • Windows: Add the location of the executable file to the $PATH registry.
    • Mac: N/A

Basic

Megumax work via a config file called megu.toml which look something like this:

[build]
output = "path/to/output/directory"
src = "path/to/src/directory"

[keys]
foo = "Kore wa requiem da"
bar = "42"

[template]
color = ["red", "orange", "yellow"]

And then you can run the program inside the directory this config file is in with megu command. (No need for any argument)

For more information, check out examples/ directory.

Why?

When working with custom model data you need to specify an integer value for each model in your resourcepack. This can become unmaintainable when working with models up to 100+. Megumax would help this by allowing you to specify a string value for each model instead and then compile it back into integers when needed.

There's probably already existing tool for this but why waste time googling for 3 seconds when you can spend your afternoon developing this instead? /s

Interface

Dependencies

~7–20MB
~249K SLoC