Skip to content

Commit

Permalink
Add mode cli flag that accepts inclusive, exclusive or additive options.
Browse files Browse the repository at this point in the history
  • Loading branch information
d0x2f committed Oct 3, 2018
1 parent fa09046 commit d9293f6
Show file tree
Hide file tree
Showing 10 changed files with 586 additions and 804 deletions.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://travis-ci.org/d0x2f/CloverMerge.svg?branch=master)](https://travis-ci.org/d0x2f/CloverMerge)
[![Coverage Status](https://coveralls.io/repos/github/d0x2f/CloverMerge/badge.svg?branch=master)](https://coveralls.io/github/d0x2f/CloverMerge?branch=master)
[![Maintainability](https://api.codeclimate.com/v1/badges/7ff86933961de446d594/maintainability)](https://codeclimate.com/github/d0x2f/CloverMerge/maintainability)

PHP utility to merge two or more clover files into a single document.

Expand All @@ -11,25 +12,48 @@ I spent a weekend writing this so you don't have to.

# Install

```
## As a Composer Dependancy

```bash
$ composer require d0x2f/clover-merge
```

## As a Docker Image

```bash
$ docker pull d0x2f/clover-merge
```

# Usage

```
usage: clover-merge [<options>] [<args>]
OPTIONS
--help, -? Display this help.
--mode, -m merge mode: additive, exclusive or inclusive (default)
--output, -o output file path
ARGUMENTS
paths input file paths
```

## Modes

* Additive - Lines must be present in the first input file for them to be included.
* Exclusive - Lines must be present in all input files for them to be included.
* inclusive - Lines from all files are included.

# Example

## As a Composer Dependancy

```bash
$ ./vendor/bin/clover-merge -o combined.xml input1.xml input2.xml
```

## As a Docker Image

```bash
$ docker run --rm -v (pwd)/build:/build clover-merge -o /build/combined.xml /build/input1.xml /build/input2.xml
```
Loading

0 comments on commit d9293f6

Please sign in to comment.