Skip to content

skoskie/coronavirus-tracker-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coronavirus-tracker-cli

Track The Corona virus from your CLI

Screenshot

CURL

Complete Data

curl https://corona-stats.online/

Filter by Country Stats

curl https://corona-stats.online/<country>

where can be country name or its ISO code.

  • US: curl https://corona-stats.online/US
  • Italy: curl https://corona-stats.online/Italy
  • UK: curl https://corona-stats.online/UK or curl https://corona-stats.online/GB

API

Add ?format=json at the end of any API to get json formatted data.

Example:

curl https://corona-stats.online?format=json

Local Command (For coloured ouput)

Install

npm install coronavirus-tracker-cli -g

Run command

corona

Top 10

Note: This command will cause colored output to be discarded.

# Grep the rank of 10 and the 23 lines preceding it
corona | grep -B 23 ' 10  '

Your country

Note: These commands will cause colored output to be discarded.

  • Replace the US part of the command with your country code.
  • If you want to also see the World stats, replace the 3 with a 5
# sed the first 3 (or 5) lines; your country; bottom table border
corona | sed -n '1,3p;/\(US\)/p;/╚═/p'

Or, get your country within context of your rank

# grep with 2 lines of context for each result
# output the 'World' stats and headers; the country stats; the bottom table border
corona | grep --color=none -C 2 -e 'World' -e '\(US\)' -e 'Stay'

ToDos

  • Filter by country to get cases by local states.
  • Move from npm to curl
  • Add daily change.
  • Add growth rate. (linear regression)
  • Add latest updates from reddit / twitter.

Other Regional Trackers.

Thanks to

Related Projects

License

WTFPL

About

Track conronavirus cases from command line. curl https://corona-stats.online/

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%