Skip to content

Commit 713b62a

Browse files
Add usage examples to README.
1 parent 267336c commit 713b62a

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

README.md

+31-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,38 @@
1-
What Is My IP
2-
=============
1+
# What Is My IP
32

43
Simple WhatIsMyIpAddress CLI Client.
54

6-
Usage
7-
-----
5+
## Usage
6+
7+
```
8+
whatismyip 1.3.0
9+
Usage: whatismyip [options]
10+
11+
-f, --file <value> Output file (will be created if not exists)
12+
-i, --interval <value> update interval (in Scala's Duration format)
13+
--help prints this usage text
14+
--version
15+
```
16+
17+
### Examples
18+
19+
#### Check and print every 1 minute (default behaviour)
820

921
```sh
1022
sbt run
1123
```
24+
25+
#### Write to the file instead of `stdout`
26+
27+
```sh
28+
sbt "run --file=/tmp/whatismyip"
29+
```
30+
31+
#### Use the custom interval
32+
33+
```sh
34+
sbt "run --interval=2.minutes --file=/tmp/whatismyip"
35+
```
36+
37+
See [scala.concurrent.duration.DurationConversions](https://www.scala-lang.org/api/current/scala/concurrent/duration/DurationConversions.html)
38+
for possible interval durations.

0 commit comments

Comments
 (0)