🦠Track the Coronavirus disease (COVID-19) in the command line. Worldwide for all countries, for one country, and the US States. Fast response time (< 100ms). To chat: https://twitter.com/MrAhmadAwais/
This PR is about changing the output format from Table to JsonOutput (a simplified Json formatter). It doesn't change anything about current logic in regards to data fetching and sorting. The only difference is that:
All other outputs are silenced, so you can corona --json > output.json
Changes the format of numbers to not use comma-number, but instead return plain integers
When cli.flags.json === true all coloring functions in utils/table.js will return plain text instead
Outputs JSON
How to test
corona --json - normal run
corona -j - same as above using short-handle
corona --json > output.json - output to output.json and check the formatting (Prettifying JSON helps)
issue #11
Overview
This PR is about changing the output format from
Table
toJsonOutput
(a simplified Json formatter). It doesn't change anything about current logic in regards to data fetching and sorting. The only difference is that:corona --json > output.json
comma-number
, but instead return plain integerscli.flags.json === true
all coloring functions inutils/table.js
will return plain text insteadHow to test
corona --json
- normal runcorona -j
- same as above using short-handlecorona --json > output.json
- output tooutput.json
and check the formatting (Prettifying JSON helps)