{"id":22111697,"url":"https://github.com/phx/covid","last_synced_at":"2025-03-24T04:34:41.539Z","repository":{"id":121578280,"uuid":"250846131","full_name":"phx/covid","owner":"phx","description":"Monitor COVID-19 stats for your state and the US from the terminal or a web page.","archived":false,"fork":false,"pushed_at":"2020-04-11T16:18:13.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T10:33:58.831Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-28T16:48:02.000Z","updated_at":"2020-04-11T16:18:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"1dcfc1d9-0b46-46f7-a68f-46d8b06dffa1","html_url":"https://github.com/phx/covid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fcovid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fcovid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fcovid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fcovid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phx","download_url":"https://codeload.github.com/phx/covid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245211863,"owners_count":20578437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T10:50:41.181Z","updated_at":"2025-03-24T04:34:41.515Z","avatar_url":"https://github.com/phx.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Platform: Linux/MacOS](https://img.shields.io/badge/platform-Linux/MacOS-blue)\n![Follow @rubynorails on Twitter](https://img.shields.io/twitter/follow/rubynorails?label=follow\u0026style=social)\n\n# covid.sh\n\nThere are much more robust COVID-19 trackers out there, but I whipped up this simple one for myself so that I could pull up-to-date stats from a known reliable resource,\n[https://covidtracking.com/api/](https://covidtracking.com/api/).  For stats by country, you are probably going to want to use something more like\n[coronavirus-tracker-cli](https://github.com/sagarkarira/coronavirus-tracker-cli), which you can simply use by executing `curl -L corona-stats.online`.\n\nI figured I would share in case anyone was interested for their own use, but I mainly just created this for me and my family.\n\n**Dependencies:**\n- `bash`\n- `curl`\n- `jq`\n- `column`\n\n## Example Ouput\n\n```\nSTATE:     AL\nPOSITIVE:  644\nDEATHS:    3\nFri Mar 27 23:00:00 CDT 2020\n\nCOUNTRY:       US\nPOSITIVE:      102143\nHOSPITALIZED:  14069\nDEATHS:        1603\nSat Mar 28 11:47:54 CDT 2020\n```\n\n## Usage\n\n`./covid.sh [output file]`\n\nYou can change the state number in the script to reflect the number of your state from the [covidtracking.com API](https://covidtracking.com/api/).\n\nThe script runs in an infinite loop, pulling API data every 5 minutes.  It can be killed with Ctrl-C.\n\nIf you specify an output file, it will write the results to that file in HTML format.  I did this so I could host it at an Nginx document root on my local network.\n\nThere is a meta tag in the HTML that will refresh the page every 5 minutes.  You don't have to host the file -- you can just as easily open it in Chrome, and it will work the same way.\n\n## Running in the background as a daemon\n\nIf you only want to monitor the web page without having a terminal window dedicated to process itself, you can just run it in the background:\n\n`./covid.sh -d /path/to/file.html`\n\nAnd then just open `file.html` in your browser, and monitor from there.\n\nYou can kill the process with `./covid.sh --kill`. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphx%2Fcovid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphx%2Fcovid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphx%2Fcovid/lists"}