Tip
(Please note that if you see this on https://weareblahs.github.io/covidcases, that means that the website isn't ready yet. Refresh in a minute.)
This is a no-nonsense, straight-to-the-point page which shows only the new cases of COVID-19 in Malaysia.
-
COVID-19 Cases
-
COVID-19 Deaths
Uses GitHub actions for all the processing with the batch scripts, which replaces the No data
string (and date string) in the HTML file to the latest cases.
-
samleong123/COVID-19-Malaysia-API (API / API documentation) (Main source for data)
- Data source based on MoH-Malaysia/covid19-public
-
jq (used to parse JSON data)
-
sed (used to find and replace placeholders)
-
ImageMagick (used to generate images)
-
Helvetica Neue (used to generate images / website default font) (Version used)
-
add-to-homescreen (used for PWA "add to home screen" bottom pop-up when visiting website)
-
tweepy (used for Twitter bot updating)
Credits to clipartpng.com for the original icon. Modified to mask the icon.
There are 2 versions of this website:
-
Static version. This version contains a HTML file that auto-updates through GitHub Actions every 12 hours. Visit it here. (Available for both nationwide and states)
-
Realtime version. Your browser will contact the API every visit and use it to update the status. Refresh it to get new information. Visit it here. (Available for both nationwide and states)
-
Twitter version, which is available on @MYCovidCasesBot. Tweets the latest cases, along with images as a thread. Runs everyday 10am (MYT).
-
Mastodon version, which is available on @myccbot via botsin.space. Posts the latest cases, along with images as posts. Runs everyday 10am (MYT).
-
Nationwide
-
States
- A list of states can be triggered by clicking / tapping the "More statistics" page.
Data type | Cases | Deaths |
---|---|---|
Nationwide | Yes | Yes |
State | Yes | Yes |
Data type | Source |
---|---|
Nationwide | samleong123/COVID-19-Malaysia-API (hosted by @samleong123, documentation) |
States | samleong123/COVID-19-Malaysia-API (hosted by @samleong123, documentation) |
After generating HTML pages, it will generate images with the current cases / deaths numbers through ImageMagick, which are also used for social media integration. To save it, go to the website, then click / tap on "Save as image".
An image of cases should be popped up if you share this website on Facebook or Twitter when you put this URL (https://weareblahs.github.io/covidcases
).
- Same thing as the Deaths one, but only when you put
https://weareblahs.github.io/covidcases/deaths
as URL.
If you enabled dark theme on systemwide settings, then you should get dark mode when visiting this page on your device. Should be working on most modern browsers (Tested browsers including Chronium-based ones and Safari).
This page will update every hour.
Fork it, then run the "Update cases" workflow under Actions.
First, make a copy or clone the repository if you haven't did that yet.
Make sure you have the presiqutes installed.
sudo apt-get install jq imagemagick
First, update the cases:
chmod +x update.sh
./update.sh
Then, update the state cases:
chmod +x updatestate.sh
./updatestate.sh
Please note that if you want to host this in your web server, do note that the root directory of this repository is the root directory of the website itself. If you want to visit locally, you can just directly open index.html
.
(currently no plans)
Create an issue describing your problem.