Curl утилита командной строки для Linux позволяет получать доступ к web ресурсам. В этой статье мы покажем пример использования curl для мониторинга за распространением вируса COVID-19.
Возможно, Вам необходимо будет установить утилиту curl:
sudo apt install curl
Мониторинг за распространением вируса COVID-19 можно вести в режиме реального времени с помощью утилиты watch или без неё:
watch -c -n2 'curl -s -L covid19.trackercli.com/ru'
╔══════════════════════════════════════════════════════════════════════╗ ║ COVID-19 Tracker CLI v3.8.0 - Russia Update ║ ╟──────────────────────────────────────────────────────────────────────╢ ║ As of 4/23/2020, 12:22:02 PM [Date:4/23/2020] ║ ╟─────────────╤──────────────╤───────────╤─────────────╤───────────────╢ ║ Cases │ Deaths │ Recovered │ Active │ Cases/Million ║ ╟─────────────┼──────────────┼───────────┼─────────────┼───────────────╢ ║ 62,773 │ 555 │ 4,891 │ 57,327 │ 430 ║ ╟─────────────┼──────────────┼───────────┼─────────────┼───────────────╢ ║ Today Cases │ Today Deaths │ Critical │ Mortality % │ Recovery % ║ ╟─────────────┼──────────────┼───────────┼─────────────┼───────────────╢ ║ 4,774 │ 42 │ 2,300 │ 0.88 │ 7.79 ║ ╟─────────────╧──────────────╧───────────╧─────────────╧───────────────╢ ║ Help: Try to append the URL with /help to learn more... ║ ╟──────────────────────────────────────────────────────────────────────╢ ║ Source: https://www.worldometers.info/coronavirus/ ║ ╟──────────────────────────────────────────────────────────────────────╢ ║ Code: https://github.com/warengonzaga/covid19-tracker-cli ║ ╚══════════════════════════════════════════════════════════════════════╝ Instead of calling it as NCOV, Let's call it as EndCov! ------------------------------------------------------------ Love this project? Help us to help others by means of coffee! (Buy Me A Coffee) warengonza.ga/coffee4dev ------------------------------------------------------------ Follow me on twitter for more updates! @warengonzaga #covid19trackercli
Вы можете посмотреть на сайте covid19.trackercli.com статистику распространения вируса COVID-19 в любой стране, а так же получить много другой интересной информации, для этого ознакомьтесь со справкой по данному ресурсу.
curl -L covid19.trackercli.com/help
------------------------------------------------------------
COVID-19 Tracker CLI v3.8.0 by Waren Gonzaga
------------------------------------------------------------
Basic Usage:
/<country name> ................... by country stats
ex. /philippines /korea
/<ISO 3166-1 code> ................ by country stats shortcut
ex. /ph /kor
/cmd .............................. if using CMD
/cmd/<country name> ............... by country stats on CMD
/cmd/<ISO 3166-1 code> ............ by country stats shortcut on CMD
/plain or /basic .................. if your cli does not support ANSI encoding
similar to /cmd usage and layout
ex. /plain/philippines or /plain/ph
/basic/philippines or /basic/ph
------------------------------------------------------------
ANSI Supported Features
/history/ or /history/all ......... historical chart globally
/history/<country name> ........... historical chart for cases of a country
ex. /history/philippines /history/korea
/history/<ISO 3166-1 code> ........ shortcut historical chart for cases of a country
ex. /history/ph /history/kor
Cases and Deaths is currently available for historical chart.
/history/ph/cases or /history/ph/deaths
------------------------------------------------------------
To learn more about the usage... please visit
https://warengonza.ga/covid19-tracker-cli
ISO 3166-1 Code List:
https://warengonza.ga/iso-3166-1-codes
------------------------------------------------------------
Code: https://github.com/warengonzaga/covid19-tracker-cli
------------------------------------------------------------
Wash your hands at least 20 seconds...
------------------------------------------------------------
Love this project? Help us to help others by means of coffee!
(Buy Me A Coffee) warengonza.ga/coffee4dev
------------------------------------------------------------
Follow me on twitter for more updates!
@warengonzaga #covid19trackercli
Следующая команда позволяет посмотреть статистику распространения вируса COVID-19 в Украине с графиком
curl -L covid19.trackercli.com/history/ua
