aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2023-12-26 11:26:31 -0600
committerMarc Coquand <marc@mccd.space>2023-12-26 11:35:34 -0600
commita7c556e7a828a9be88e0893987396d652f0f3bde (patch)
treec9a6048ba7c2e7fa167451169cae866f6f2e7c53 /README.md
parent0dcc905f2fdc89f3be834c670a5bcf42386eb663 (diff)
downloadfixgen-a7c556e7a828a9be88e0893987396d652f0f3bde.tar.gz
fixgen-a7c556e7a828a9be88e0893987396d652f0f3bde.tar.bz2
fixgen-a7c556e7a828a9be88e0893987396d652f0f3bde.zip
Update README
Diffstat (limited to '')
-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/).