[](https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/code-generator/RustyPhoenixReplace/-/pipelines)
[](https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/code-generator/RustyPhoenixReplace/-/releases)
[](https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/code-generator/RustyPhoenixReplace/coverage/index.html)
[](https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/code-generator/RustyPhoenixReplace/)
[](https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/PHOENIX2/)
[](https://doi.org/10.5281/zenodo.18683539)
# Code
https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/code-generator/RustyPhoenixReplace
# Documentation
https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/code-generator/RustyPhoenixReplace/index.html
# Requirements
- cargo
- rustc
# Quick start
This project aims to provide a simple a powerfull multilines replace via a toml configuration :
```toml
# Defining files to look at for a inplace replacement
vec_file_pattern = ["*.txt", "*.cpp", "*.yml", "*.toml", "*.txt", "*.cmake", "*.dox"]
# Then, define multiline pattern and replace string
[[replace]]
pattern = "some\nmultiline\npattern to search"
replace = "some\nreplace\npattern"
# You can define as many replace section as you want
```
Then you can call :
```
rustyphoenixreplace -i config.toml -r where/to/look/for/file/dir/
```
# Installation for Users
```
git clone https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/code-generator/RustyPhoenixReplace.git
cd RustyPhoenixReplace
```