Skip to content

Commit 309a4f4

Browse files
committed
Better README
1 parent a5f212a commit 309a4f4

File tree

1 file changed

+30
-29
lines changed

1 file changed

+30
-29
lines changed

README.md

+30-29
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@
22

33
CLI utility that generates data in various formats.
44

5+
fakedata int,1..100 # will generate only integers between 1 and 100- [Overview](#overview)
6+
- [Quick start](#quick-start)
7+
- [Generators](#generators)
8+
- [Formatters](#formatters)
9+
- [How to install](#how-to-install)
10+
- [How to contribute](#how-to-contribute)
11+
- [Code of conduct](#code-of-counduct)
12+
513
# Overview
614

715
`fakedata` is a small utility that generates data from the command line:
816

17+
## Quick start
18+
919
```sh
1020
$ fakedata email country
1121
[email protected] Afghanistan
@@ -47,39 +57,30 @@ Shoes,Freetop
4757
Tools,Domnix
4858
```
4959

50-
List the available generators:
60+
## Generators
61+
62+
`fakedata` provides a number of generators:
5163

5264
```sh
5365
$ fakedata --generators
5466
color
5567
country
56-
country.code
57-
domain
58-
domain.name
59-
domain.tld
60-
double
61-
email
62-
event.action
63-
http.method
64-
id
65-
ipv4
66-
ipv6
67-
latitude
68-
longitude
69-
mac.address
70-
name
71-
name.first
72-
name.last
73-
product.category
74-
product.name
75-
state
76-
state.code
77-
timezone
78-
unixtime
79-
username
68+
...
69+
# It's a long list :)
70+
```
71+
72+
Some generators allow you to pass in a range so you can scope their generation
73+
to a subset of values:
74+
75+
```sh
76+
$ fakedata int,1..100 # will generate only integers between 1 and 100
77+
$ fakedata int,50.. # specifying only min number works too
78+
$ fakedata int,50 # also works
8079
```
8180

82-
## SQL formatter
81+
## Formatters
82+
83+
### SQL formatter
8384

8485
`fakedata` can generate insert statements. By default, it uses the name of the generators
8586
as column names:
@@ -89,15 +90,15 @@ $ fakedata email domain --format=sql --limit 1
8990
INSERT INTO TABLE (email,domain) values ('[email protected]','example.me');
9091
```
9192

92-
You can specify the name of the column using a field with the following format `column_name=generator`.
93-
For example:
93+
You can specify the name of the column using a field with the following format
94+
`column_name=generator`. For example:
9495

9596
```sh
9697
$ fakedata login=email referral=domain --format=sql --limit 1
9798
INSERT INTO TABLE (login,referral) values ('[email protected]','test.me');
9899
```
99100

100-
# Installation guide
101+
# How to install
101102

102103
## Homebrew
103104

0 commit comments

Comments
 (0)