Skip to content

Commit 5467fba

Browse files
authored
docs: update formatting on readme (#199)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 68929c7 commit 5467fba

File tree

1 file changed

+44
-23
lines changed

1 file changed

+44
-23
lines changed

README.md

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ transaction:
8484
}
8585
],
8686
"metadata": {
87-
674: {
87+
"674": {
8888
"msg": [
8989
"Test message"
9090
]
@@ -101,10 +101,11 @@ using Uber's `Zap` logging library.
101101

102102
## Configuration
103103

104-
Adder supports multiple configuration methods for versatility: commandline arguments, YAML config file,
105-
and environment variables (in that order).
104+
Adder supports multiple configuration methods for versatility: commandline
105+
arguments, YAML config file, and environment variables (in that order).
106106

107-
You can get a list of all available commandline arguments by using the `-h`/`-help` flag.
107+
You can get a list of all available commandline arguments by using the
108+
`-h`/`-help` flag.
108109

109110
```bash
110111
$ ./adder -h
@@ -122,9 +123,10 @@ Usage of adder:
122123
specifies the log level to use (default "info")
123124
```
124125

125-
Each commandline argument (other than `-config`) has a corresponding environment variable. For example,
126-
the `-input` option has the `INPUT` environment variable, the `-input-chainsync-address` option has the
127-
`INPUT_CHAINSYNC_ADDRESS` environment variable, and `-output` has `OUTPUT`.
126+
Each commandline argument (other than `-config`) has a corresponding environment
127+
variable. For example, the `-input` option has the `INPUT` environment variable,
128+
the `-input-chainsync-address` option has the `INPUT_CHAINSYNC_ADDRESS`
129+
environment variable, and `-output` has `OUTPUT`.
128130

129131
You can also specify each option in the config file.
130132

@@ -134,7 +136,8 @@ input: chainsync
134136
output: log
135137
```
136138
137-
Plugin arguments can be specified under a special top-level key in the config file.
139+
Plugin arguments can be specified under a special top-level key in the config
140+
file.
138141
139142
```yaml
140143
plugins:
@@ -149,11 +152,14 @@ plugins:
149152
150153
## Filtering
151154
152-
Adder supports filtering events before they are output using multiple criteria. An event must match all configured filters to be emitted.
153-
Each filter supports specifying multiple possible values separated by commas. When specifying multiple values for a filter, only one of
154-
the values specified must match an event.
155+
Adder supports filtering events before they are output using multiple criteria.
156+
An event must match all configured filters to be emitted. Each filter supports
157+
specifying multiple possible values separated by commas. When specifying
158+
multiple values for a filter, only one of the values specified must match an
159+
event.
155160
156-
You can get a list of all available filter options by using the `-h`/`-help` flag.
161+
You can get a list of all available filter options by using the `-h`/`-help`
162+
flag.
157163

158164
```bash
159165
$ ./adder -h
@@ -170,7 +176,8 @@ Usage of adder:
170176
...
171177
```
172178

173-
Multiple filter options can be used together, and only events matching all filters will be output.
179+
Multiple filter options can be used together, and only events matching all
180+
filters will be output.
174181

175182
## Example usage
176183

@@ -207,59 +214,73 @@ docker run --rm -ti \
207214
Only output `chainsync.transaction` event types
208215

209216
```bash
210-
$ adder -filter-type chainsync.transaction
217+
adder -filter-type chainsync.transaction
211218
```
212219

213220
Only output `chainsync.rollback` and `chainsync.block` event types
214221

215222
```bash
216-
$ adder -filter-type chainsync.transaction,chainsync.block
223+
adder -filter-type chainsync.transaction,chainsync.block
217224
```
218225

219226
#### Filtering on asset policy
220227

221228
Only output transactions involving an asset with a particular policy ID
222229

223230
```bash
224-
$ adder -filter-type chainsync.transaction -filter-policy 13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f
231+
adder -filter-type chainsync.transaction \
232+
-filter-policy 13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f
225233
```
226234

227235
#### Filtering on asset fingerprint
228236

229237
Only output transactions involving a particular asset
230238

231239
```bash
232-
$ adder -filter-type chainsync.transaction -filter-asset asset108xu02ckwrfc8qs9d97mgyh4kn8gdu9w8f5sxk
240+
adder -filter-type chainsync.transaction \
241+
-filter-asset asset108xu02ckwrfc8qs9d97mgyh4kn8gdu9w8f5sxk
233242
```
234243

235244
#### Filtering on a policy ID and asset fingerprint
236245

237-
Only output transactions involving both a particular policy ID and a particular asset (which do not need to be related)
246+
Only output transactions involving both a particular policy ID and a particular
247+
asset (which do not need to be related)
238248

239249
```bash
240-
$ adder -filter-type chainsync.transaction -filter-asset asset108xu02ckwrfc8qs9d97mgyh4kn8gdu9w8f5sxk -filter-policy 13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f
250+
adder -filter-type chainsync.transaction \
251+
-filter-asset asset108xu02ckwrfc8qs9d97mgyh4kn8gdu9w8f5sxk \
252+
-filter-policy 13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f
241253
```
242254

243255
#### Filtering on an address
244256

245257
Only output transactions with outputs matching a particular address
246258

247259
```bash
248-
$ adder -filter-type chainsync.transaction -filter-address addr1qyht4ja0zcn45qvyx477qlyp6j5ftu5ng0prt9608dxp6l2j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq4jxtdy
260+
adder -filter-type chainsync.transaction \
261+
-filter-address addr1qyht4ja0zcn45qvyx477qlyp6j5ftu5ng0prt9608dxp6l2j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq4jxtdy
249262
```
250263

251264
#### Filtering on a stake address
252265

253266
Only output transactions with outputs matching a particular stake address
254267

255268
```bash
256-
$ adder -filter-type chainsync.transaction -filter-address stake1u9f9v0z5zzlldgx58n8tklphu8mf7h4jvp2j2gddluemnssjfnkzz
269+
adder -filter-type chainsync.transaction \
270+
-filter-address stake1u9f9v0z5zzlldgx58n8tklphu8mf7h4jvp2j2gddluemnssjfnkzz
257271
```
258272

259273
### Push notifications
260274

261-
The example shows how push notification output can be used with filtering options. In this example, push notifications will be sent to the block events. Push notifications will be sent to the specified project_id in the serviceAccount.json file. Please refer to https://github.com/blinklabs-io/adder-mobile for more details on how to send push notifications to adder-mobile.
275+
The example shows how push notification output can be used with filtering
276+
options. In this example, push notifications will be sent for the block events.
277+
Push notifications will be sent to the FCM `project_id` specified in the
278+
`serviceAccount.json` file. Please refer to the
279+
[adder-mobile README](https://github.com/blinklabs-io/adder-mobile) for more
280+
details on how to send push notifications to mobile.
262281

263282
```bash
264-
$ adder -filter-type chainsync.block -output push -output-push-serviceAccountFilePath /path/to/serviceAccount.json
283+
adder -filter-type chainsync.block \
284+
-output push \
285+
-output-push-serviceAccountFilePath /path/to/serviceAccount.json
265286
```

0 commit comments

Comments
 (0)