Skip to content

Coronabot emails a daily statistics report about COVID-19

Notifications You must be signed in to change notification settings

alecigne/coronabot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coronabot

https://github.com/alecigne/coronabot/actions/workflows/main.yml/badge.svg

This Spring Boot application retrieves statistics about Covid-19 and sends a report everyday by email.

How to use

An additional, external coronabot.properties config file is needed for the application to run. Here are the required properties with example values:

spring.mail.host=smtp.example.com
spring.mail.port=587
[email protected]
spring.mail.password=mypassword

[email protected]
[email protected], [email protected]
coronabot.mail.subject=COVID-19 report

coronabot.report.country=france
coronabot.report.sync-cron=0 55 23 * * ?
coronabot.report.mail-cron=0 0 6 * * ?

This configuration can be loaded using Spring’s spring.config.additional-location - see below.

On startup, the application will fetch the COVID statistics for the current day. You can see the data by accessing localhost:8080/corona.

Using a Jar

  1. Download a Jar from the releases section of the repo, or build from source with Maven.
  2. Run the JAR (you need Java 11):
    java -jar [jar-file] --spring.config.additional-location=[/path/to/coronabot.properties]
        

Using Docker

Coming soon.