command
module
Version:
v0.0.0-...-853e981
Opens a new window with list of versions in this module.
Published: Feb 24, 2021
License: MIT
Opens a new window with license information.
Imports: 16
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
What this is
Source code for bot powering Telegram Channel.
Data sourced from https://doh.gov.ph/covid19tracker.
Inspired by the good work being done over at PH Coronavirus Updates.
What it does
- Download Read me from data drop
- Parse links from read me
- Download Testing Aggregates csv from links
- Collate
daily_output_unique_individuals
and daily_output_positive_individuals
grouped by provided date from csv
- Send message to telegram
Requirements
- go 1.0+
config.json
file
-
Sample:
{
"telegram":{
"chat_id":"",
"bot_id":"",
"url": "https://api.telegram.org"
},
"gdrive":{
"api_key":"",
"url": "https://www.googleapis.com/drive/v2/files",
"test_substring": "Testing Aggregates.csv",
"link_substring": "bit.ly/",
"readme_substring": "READ ME FIRST",
"daily_url": "http://bit.ly/DataDropPH"
}
}
-
Instructions here for setting up a telegram bot.
-
Instructions here for enabling Google Drive API
Building
go get -d
go build
Running
./covidphtesttracker \
-d 2021-02-12 \
-l https://drive.google.com/drive/folders/1x-zy7hTT19cJ9Hin1B0WYrJksrTI6EU4 \
-c config.json
Flags
-c
: Path to config.json file
-d
: Date to check
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.