11# coronavirus-tracker-cli
22
3- Track coronavirus from cli
3+ Track The Corona virus from your CLI
44
55## Screenshot
66
@@ -10,15 +10,15 @@ Track coronavirus from cli
1010
1111### Complete Data
1212
13- ```
13+ ```` sh
1414curl https://corona-stats.online/
15- ```
15+ ````
1616
1717### Filter by Country Stats
1818
19- ```
19+ ```` sh
2020curl https://corona-stats.online/< country>
21- ```
21+ ````
2222
2323where <country > can be country name or its ISO code.
2424
@@ -33,23 +33,50 @@ Add `?format=json` at the end of any API to get json formatted data.
3333
3434** Example:**
3535
36- ```
36+ ```` sh
3737curl https://corona-stats.online? format=json
38- ```
38+ ````
3939
4040## Local Command (For coloured ouput)
4141
4242** Install**
4343
44- ```
44+ ```` sh
4545npm install coronavirus-tracker-cli -g
46- ```
46+ ````
4747
4848** Run command**
4949
50- ```
50+ ```` sh
5151corona
52- ```
52+ ````
53+
54+ ** Top 10**
55+
56+ Note: This command will cause colored output to be discarded.
57+
58+ ```` sh
59+ # Grep the rank of 10 and the 23 lines preceding it
60+ corona | grep -B 23 ' 10 '
61+ ````
62+
63+ ** Your country**
64+
65+ Note: These commands will cause colored output to be discarded.
66+
67+ - Replace the ` US ` part of the command with your country code.
68+ - If you want to also see the ` World ` stats, replace the ` 3 ` with a ` 5 `
69+ ```` sh
70+ # sed the first 3 (or 5) lines; your country; bottom table border
71+ corona | sed -n ' 1,3p;/\(US\)/p;/╚═/p'
72+ ````
73+
74+ Or, get your country within context of your rank
75+ ```` sh
76+ # grep with 2 lines of context for each result
77+ # output the 'World' stats and headers; the country stats; the bottom table border
78+ corona | grep --color=none -C 2 -e ' World' -e ' \(US\)' -e ' Stay'
79+ ````
5380
5481### ToDos
5582
0 commit comments