https://github.com/cchexcode/fmerge
A recursive file merging program.
https://github.com/cchexcode/fmerge
Last synced: 9 months ago
JSON representation
A recursive file merging program.
- Host: GitHub
- URL: https://github.com/cchexcode/fmerge
- Owner: cchexcode
- License: mit
- Created: 2023-04-04T20:01:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-12T20:47:36.000Z (about 1 year ago)
- Last Synced: 2024-12-13T05:37:59.417Z (about 1 year ago)
- Language: Rust
- Homepage: https://crates.io/crates/fmerge
- Size: 1.14 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: docs/README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# fmerge
`fmerge` is a tool that allows merging files **recursively** and with custom regex patterns. The include file statements are always relative to the file that includes them.
## Regex matches
### Capture groups
- 1 (required): The relative file path for the file to be included.
- 2 (optional): The indentation of the included file in the current one (note that this excludes the first line).
## Example
- `fmerge merge -p "\{\{\s*([\w./]+)\s*\+?(\d+)?\s*\}\}" ./root.part`\
Pattern that is matched: `{{ relative_path +indentation }}` => `{{ leaf.part +2 }}`