8 releases

new 0.2.2 Nov 12, 2024
0.2.1 Nov 12, 2024
0.1.6 Aug 5, 2023
0.1.5 Apr 6, 2023

#1337 in Command line utilities

Download history 23/week @ 2024-09-22 82/week @ 2024-11-03 262/week @ 2024-11-10

344 downloads per month

MIT license

28KB
675 lines

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 }}

Dependencies

~6–14MB
~158K SLoC