aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
1 files changed, 22 insertions, 2 deletions
diff --git a/README.md b/README.md
index 0e3b6ae..e381d0e 100644
--- a/README.md
+++ b/README.md
@@ -8,12 +8,16 @@ Usually wiring up fake test data is a bunch of work, especially when that data i
- Supports relations
- Written in OCaml
+## Install
+
+Copy the binary to `/usr/local/bin`
+
## Usage
Fixgen makes it simple to generate fixtures. It comes with a tiny DSL:
```sh
-$ fixgen 'user (2): id uuidv4, name name; purchase (10): id uuidv4, buyer user.id, amount int<1,40>, currency: ("USD","MXN")' -o fixtures
+$ fixgen 'user (2): id uuidv4, name name; purchase (10): id uuidv4, buyer user.id, amount int(1,40), currency: ("USD","MXN")' -o fixtures
```
This will generate two files:
@@ -31,11 +35,21 @@ COPY purchases FROM '/fixtures/purchase.csv' CSV HEADER;
Or maybe export as JSON instead to import into your NoSQL DB.
```sh
-$ fixgen 'user (2): id uuidv4, name name; purchase (3): id uuidv4, buyer user.id, amount int<1,40>, currency: ("USD","MXN")' -f json
+$ fixgen 'user (2): id uuidv4, name name; purchase (3): id uuidv4, buyer user.id, amount int(1,40), currency: ("USD","MXN")' -f json
```
This will print two JSON arrays to stdout.
+### Supported types
+
+Fixgen comes with the following built-in types:
+
+- name
+- uuidv4
+- int(min,max)
+- constant, defined in quotes - `fixgen 'user (1): id uuiv4, name "Bob"'`
+- ("multiple","choices")
+
## Development - Prerequisites
- [Nix](https://nixos.org/manual/nix/stable/installation/installing-binary)
@@ -86,3 +100,9 @@ dune runtests
```
dune build
```
+
+### Contributing
+
+[Mailing list](https://lists.sr.ht/~marcc/public-inbox).
+
+Send your patches via [mail](mailto:~marcc/fixgen@lists.sr.ht). New to mailing patches? Check out this [tutorial](https://git-send-email.io/).