Skip to main content

COVID-19 Alarm Clock

Project description

Covid-19 Alarm Clock

Introduction

The purpose of this project was to create a dynamic alarm clock which can provide regular updates on covid-19 cases, the news and the weather. Users can choose to submit alarm clocks will always provide a local covid-19 update with options to include top news stories and/or local weather. These alarm clocks will use vocal announcements. Additionnaly, text based notifications will be updated regularly providing covid-19, news and weather updates.

Prerequisites

This project was written in Python 3. The user will need a working Python 3 interpreter. The user will also need git installed.

Installation

You can dowload the package from Github using:

$ git clone https://github.com/ElladanGE
$ cd COVID_AlarmClock

Create a new virtual environment using:

python3 -m venv <DIR>
source <DIR>/bin/activate

And then activate it using:

python3 -m venv <DIR>
source <DIR>/bin/activate

Additionnal packages required:

  • pyttsx3
  • flask
  • requests
  • json
  • uk-covid19
  • sched
  • time
  • logging

If you do not have these packages pre-installed, you can download them using:

$ pip install <package name>

Getting started

First you will have to create your config file which must have the name:

config_file.json

Inside this file you must use this structure:

{
    "API_keys": {
      "news" : "<your news API key here>",
      "weather" : "<your weather API key here>"
    },
    "Location": {
      "my-city" : "<city name>",
      "country" : "gb"
    },
    "News-sources": {
      "my-sources": ["<source1", ..., "<sourceN>"]
    },
    "Notif_period": {
      "time": "<notification update time in seconds>"
    }
}

Once you have done this, save it in \COVID_AlarmClock\App.

Voila, the program is now ready to run. To run the program, in \COVID_AlarmClock> simply type:

python main.py

Usage

You can now go to:

http://127.0.0.1:5000/

To access the alarm clock.

To set alarm, select a date and time, select if you want to include news and/or weather, add a label and press submit. The name of your alarm clock, when it is set and it's content should now appear on the left. On the right hand side, you will see 3 notification boxes. One for COVID update, one for news and one for weather. These notifications will regurlaly be updated depending on what delay you put in the config file. The news stories will be the top news articles from the sources you provided and the weather will be the local weather from the city you provided.

Testing

To run the test, in \COVID_AlarmClock directory, simply type:

$ pytest

Developper documentation

Tree

* COVID_AlarmClock
    * static
        * Images
            * favincon.jpg
        * style.css
    * templates
        * template.html
    * tests
        * __init__.py
        * gb-news.json
        * test_main.py
    * App
        * __init__.py
        * main.py
        * config_file.json
        * timer_conversion.py
    * license.md
    * README.md
    * setup.py

Details

Author

  • Duncan Watson

Link to source

Link to Github

Licence

This project is licensed under the MIT Licence - see the license.md for details.

Acknowledgements

I would like to thank Dr. Matt Collison and all the TA's for their help during the developpement of this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Covid19AlarmClock-0.0.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Covid19AlarmClock-0.0.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file Covid19AlarmClock-0.0.1.tar.gz.

File metadata

  • Download URL: Covid19AlarmClock-0.0.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0

File hashes

Hashes for Covid19AlarmClock-0.0.1.tar.gz
Algorithm Hash digest
SHA256 95f5dc9e55d51eacf16f60b3cf5235e84f2a63032f73a7c31d2d04326a51aa34
MD5 46b76b608585523393dd7519ea99165d
BLAKE2b-256 6429cb310c240b8eae91a5f7076bb86a0fb62edd236f4fee6cca66e3e79b7072

See more details on using hashes here.

File details

Details for the file Covid19AlarmClock-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Covid19AlarmClock-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0

File hashes

Hashes for Covid19AlarmClock-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97075eff23d0743c3a78774227c36de39aa89a89fcb38c9134b47cc51bb799bd
MD5 efd2f84e67b71d8f3eaa0502c9c7c0e9
BLAKE2b-256 52676c9970c3a3d983088964cf4ef8828fa0a6b091ae6fb92db1c6153db390b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page