Skip to content

Commit b77e1a4

Browse files
committed
v1.0
1 parent 174a0e4 commit b77e1a4

File tree

4 files changed

+74
-1000005
lines changed

4 files changed

+74
-1000005
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
build/*.o
22
combigen
3+
combigen.exe
4+
combigen.obj

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,74 @@
22
An efficient CLI tool to generate possible combinations written in C++
33

44
##Introduction
5+
Combigen aims to assist with data generation and exploration. Given a `.json` input where each key contains an array of string values, combigen can either generate every possible combination or a random subset of the possible combinations. It aims to be memory-efficient while maintaining high-performance. This can especially useful when large amounts of data are needed for statistical analysis or mock data in an application.
56

7+
It supports exporting to `.csv` and `.json`.
8+
9+
##Usage
10+
Basic commands are listed below:
11+
12+
```
13+
Usage: combigen [options]
14+
-h Displays this help message
15+
-a Generates every possible combination (use with caution)
16+
-n <index> Generate combination at nth index
17+
-i <input> Take the given .json file or string as
18+
input for the combinations.
19+
Example: "{ "foo": [ "a", "b", "c" ], "bar": [ "1", "2" ] }"
20+
-o <output> Write out the results to the file name
21+
-t <type> Output type (csv or json). Defaults to csv
22+
-r <size> Generate a random sample of size r from
23+
the possible set of combinations
24+
-d <delimiter> Set the delimiter when displaying combinations (default is ',')
25+
-k Display the keys on the first line of output (for .csv)
26+
-v Verbosely display all of the combinations to
27+
stdout when generating a subset and an output
28+
file has been given
29+
```
30+
##Installation
31+
32+
###Linux/UNIX
33+
1. Clone the repository and `cd` into it:
34+
35+
```
36+
$ git clone https://github.com/iamtheburd/combigen.git && cd combigen
37+
```
38+
39+
2. Build with `make`:
40+
41+
```
42+
$ make
43+
```
44+
45+
3. Install:
46+
47+
```
48+
$ sudo make install
49+
```
50+
51+
###Windows
52+
1. Download Visual Studio and install first
53+
54+
2. Clone the repository to some directory
55+
56+
3. Open up the Developer Command Prompt (can usually be found by searching in the Start menu)
57+
58+
4. `cd` to where your cloned repository is
59+
60+
5. Build the file:
61+
62+
```
63+
> cl src\combigen.cpp /EHsc
64+
```
65+
66+
6. Place the resulting `combigen.exe` wherever you desire
67+
68+
Alternatively, you can also check out the [Releases](https://github.com/iamtheburd/combigen/releases) tab and directly download the `combigen.exe` from there.
69+
70+
71+
## Contributing
72+
Pull-requests are always welcome!
673

774
## License
875
Licensed under GPLv3, see [LICENSE](https://github.com/iamtheburd/blob/master/LICENSE)

0 commit comments

Comments
 (0)