Skip to content

Commit

Permalink
Update README and configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
emafazillah committed Mar 31, 2020
1 parent 924a1c1 commit 5be2704
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/send-message.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'GitHub Action for COVID-19 Updates'
name: 'GitHub Action for COVID-19 Update'

on:
push:
Expand All @@ -19,3 +19,6 @@ jobs:
env:
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
URL: 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/'
CSV: '.csv'
COUNTRY: 'Malaysia'
212 changes: 210 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,210 @@
# Covid-19 Updates Bot
Get Malaysia Covid-19 Updates. Data from 2019 Novel Coronavirus COVID-19 (2019-nCoV) Data Repository by Johns Hopkins CSSE, https://github.com/CSSEGISandData/COVID-19. Updates will be sent via Telegram.
# Covid-19 Update Bot
## Description
Get Covid-19 Update by country. Data from 2019 Novel Coronavirus COVID-19 (2019-nCoV) Data Repository by Johns Hopkins CSSE, https://github.com/CSSEGISandData/COVID-19. Update will be sent via Telegram.

## Example Usage
```YAML
on:
push:
schedule:
- cron: '0 12 * * *'

jobs:
bot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: 'Install node'
uses: actions/setup-node@v1
- name: 'Install NPM dependencies'
run: npm install
- name: 'Run code'
run: node index.js
env:
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
URL: 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/'
CSV: '.csv'
COUNTRY: 'Malaysia'
```
## Country
Country |
:---|
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua and Barbuda
Argentina
Armenia
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Brazil
Brunei
Bulgaria
Burkina Faso
Burma
Cabo Verde
Cambodia
Cameroon
Canada
Central African Republic
Chad
Chile
China
Colombia
Congo (Brazzaville)
Congo (Kinshasa)
Costa Rica
Cote d'Ivoire
Croatia
Cuba
Cyprus
Czechia
Denmark
Diamond Princess
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Eswatini
Ethiopia
Fiji
Finland
France
Gabon
Gambia
Georgia
Germany
Ghana
Greece
Grenada
Guatemala
Guinea
Guinea-Bissau
Guyana
Haiti
Holy See
Honduras
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
Israel
Italy
Jamaica
Japan
Jordan
Kazakhstan
Kenya
Korea, South
Kosovo
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Madagascar
Malaysia
Maldives
Mali
Malta
Mauritania
Mauritius
Mexico
Moldova
Monaco
Mongolia
Montenegro
Morocco
Mozambique
MS Zaandam
Namibia
Nepal
Netherlands
New Zealand
Nicaragua
Niger
Nigeria
North Macedonia
Norway
Oman
Pakistan
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Poland
Portugal
Qatar
Romania
Russia
Rwanda
Saint Kitts and Nevis
Saint Lucia
Saint Vincent and the Grenadines
San Marino
Saudi Arabia
Senegal
Serbia
Seychelles
Singapore
Slovakia
Slovenia
Somalia
South Africa
Spain
Sri Lanka
Sudan
Suriname
Sweden
Switzerland
Syria
Taiwan*
Tanzania
Thailand
Timor-Leste
Togo
Trinidad and Tobago
Tunisia
Turkey
Uganda
Ukraine
United Arab Emirates
United Kingdom
Uruguay
US
Uzbekistan
Venezuela
Vietnam
West Bank and Gaza
Zambia
Zimbabwe
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require('dotenv').config();
const core = require('@actions/core');
const github = require('@actions/github');
const { StringStream } = require('scramjet');
const request = require('request');
const Telegram = require('node-telegram-bot-api');
Expand Down Expand Up @@ -55,7 +54,6 @@ try {
});

const message = generateMessage(COUNTRY, totalConfirmed, totalDeaths, totalRecovered, totalActive);
// console.log('message: ', message);
bot.sendMessage(process.env.TELEGRAM_CHAT_ID, message);
});

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"homepage": "https://github.com/emafazillah/covid19-updates-bot#readme",
"dependencies": {
"@actions/core": "^1.2.3",
"@actions/github": "^2.1.1",
"dotenv": "^8.2.0",
"node-telegram-bot-api": "^0.40.0",
"request": "^2.88.2",
Expand Down

0 comments on commit 5be2704

Please sign in to comment.