alecigne / coronabot

Coronabot emails a daily statistics report about COVID-19

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
spring.mail.username=john.doe@example.com
spring.mail.password=mypassword

coronabot.mail.from=coronabot@example.com
coronabot.mail.to=mom@example.com, dad@example.com
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.

About

Coronabot emails a daily statistics report about COVID-19


Languages

Language:Java 98.0%Language:Dockerfile 2.0%