An app for auto-managing your repo file !
RAT is a tool allowing you to automate file copying, automatic replacement of certain textual parts of a file.
All are the process is set from a yml configuration file.
You can configure it for processing globally, or more specifically by targeting a specific file name, or file path.
Install the executable file in your working directory.
To create the configuration file, run :
./<exec_name> init
It creates the config.yml in your current directory.
# configuration file
# Base file path to process - Default is root directory
on: .
copy:
# List all files to copy
# - `base:dest`
files:
- hello.txt.example:hello.txt
replace:
# Replace a string in all files, in all directory
global:
- hello mom:hello mom
# Target files by name. By default, target all directory.
# If you want to target a specifiq file, you must specify the correct path.
# content:
# - `past:future`
target:
- file_name: hello.txt
content:
- hello world:hello mom
- string to replace:string replaced
- file_name: dir/example/hello.txt
content:
- hello mom:hello mom
# ignore directory during all the process
ignored_dir:
- /.git/
- /tests/
- /node_modules/
- /vendor/
- /target/
Simply run
./<exec_file> run
- Install globally :
cargo install --path .
- Install with executable file :
Build with cargo build --release
and find the file in target/release/fs_rust
or download the executable file from repository releases.
All ideas or help are welcome !
If you want to add more functionality or fix some bugs, you can :
- Submit an issue of bugs or with your idea
- Submit a pull request, to push your branch on the repository and submit a PR.
Thanks for your contribution to this project.