2023-08-08 10:59:55 -04:00
|
|
|
|
|
|
|
# oink 🐷
|
|
|
|
|
|
|
|
A configuration file preprocessor written in Rust.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
|
|
|
# process config files
|
|
|
|
oink build
|
|
|
|
# apply processed configs
|
|
|
|
oink apply
|
|
|
|
|
|
|
|
# build and apply
|
|
|
|
oink full
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-08-09 10:53:14 -04:00
|
|
|
## Configuration
|
|
|
|
|
|
|
|
Variables are split into two sections for ease-of-use: `vars` and `colors`.
|
|
|
|
|
|
|
|
Targets need two fields, `name` and `path`, containing a unique name and their
|
|
|
|
destination file respectively. They should go into the `target` array.
|
|
|
|
|
|
|
|
```toml
|
|
|
|
|
|
|
|
[vars]
|
|
|
|
name = "Test User"
|
|
|
|
|
|
|
|
[colors]
|
|
|
|
example = "1A1A1A"
|
|
|
|
|
|
|
|
[[target]]
|
|
|
|
name = "oink"
|
|
|
|
path = "/home/test/.config/oink/oink.toml"
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-08-08 10:59:55 -04:00
|
|
|
## Libraries
|
|
|
|
|
|
|
|
- [pico-args](https://crates.io/crates/pico-args) — argument parsing
|
2023-08-26 00:00:55 -04:00
|
|
|
- [termion](https://crates.io/crates/termion) — ANSI formatting
|
2023-08-08 10:59:55 -04:00
|
|
|
- [toml](https://crates.io/crates/toml) — configuration parsing
|
2023-08-25 23:48:43 -04:00
|
|
|
- [upon](https://crates.io/crates/upon) — template engine
|