Skip to content

Commit

Permalink
Improve docs for templates
Browse files Browse the repository at this point in the history
Fixes #83
  • Loading branch information
lucapette committed Feb 12, 2023
1 parent c0205b9 commit 611c4e3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,29 @@ function that takes arguments.
Enum takes one or more strings and returns a random string on each run. Strings
are passed to Enum like so:

```html
{{ Enum "feature" "bug" "documentation" }}
```sh
$ echo '{{ Enum "feature" "bug" "documentation" }}' | fakedata -l5
feature
bug
documentation
feature
documentation
```

### `File`

File reads a file from disk and returns a random line on each run. It takes one
parameter which is the path to the file on disk.

```html
{{ File "/var/data/dummy/dummy.txt" }}
```sh
$ echo "uno\ndue\ntre" > example.txt
$ echo '{{ File "./example.txt" }}' | fakedata -l5
tre
uno
due
due
due
foo
```

### `Int`
Expand Down

0 comments on commit 611c4e3

Please sign in to comment.