Skip to content

An desktop application to display a clock with news headlines and weather forecasts for small displays (e.g. resolution of 800 x 640).

Notifications You must be signed in to change notification settings

shimmy-void/desktopclock

Repository files navigation

Desktop Clock

Top image of desktop clock

What is this?

An desktop application to display a clock with news headlines and weather forecasts for small displays (e.g. resolution of 800 x 640). This app is developed using Electron framework and web APIs of News API and OpenWeather.

Features

  • Displays current time as well as current weather and temperature on your location.
  • Displays news headline delivered from News API.
  • Displays 3-hour step weather and temperature forecasts for 24 hours.
  • The country and category, or source for the news feed can be changed as News API supports.
  • Units of temperatures can be changed to Kelvin (K), Fahrenheit (°F), or Celcius (°C).
  • Uses free plan API keys of Google, News API, and OpenWeather to acquire geolocation, news feed, and weather forecast data.

Prerequisites

How to install

  1. Clone this repository on a directory.
    git clone https://github.com/shimmy-void/desktopclock.git
  1. Install Electron framework on the directory.
    cd desktopclock
    npm i -D electron
  1. Make the api_keys.json file with your API keys acquired in Prerequisites and save it on the same directory (desktopclock).
{
  "geolocation": "<YOUR_GOOGLE_APIKEY>",
  "news": "<YOUR_NEWSAPI_APIKEY>",
  "weather": "<YOUT_OPENWEATHER_APIKEY>"
}

Usage

To start the application, type the following command:

  npm start

That is done!

Config setting

If you want to change settings like news fed country, category, or source, click the button attacked on the left of the display.

config button

It shows the config menu like the following:

config menu

On this panel, you can change how the News API feeds and which temperature unit is used.

You can set the news feed type to either of "country & category" or "source" due to the specification of the News API.

The config settings are stored in config.json, you can also change the settings manually by editting the file.

Full screen mode

This application can hide top menu bar and the title by clicking View->Full screen button or using shortcut key: Ctrl+F.

To finish the full screen mode, Push Esc.

full screen button

Limitations

Due to the specification of web APIs with free plan, only restriced numbers of API requests are allowed.

Google (geolocation)

  • 40,000 requests per month within Google's $200 no charge service, but Google is adopting pay-as-you-go pricing model, see Google geolocation billing page.

News API

  • 100 requests per day
  • Articles with 24 hour delay

OpenWeather

  • 60 requests per minute
  • 1,000,000 requests per month ( = 32,258 requests per day, 1,344 requests per hour, or 22 requests per minute )

This application makes API requests as follows:

Google (geolocation)

  • Only once during startup

News API

  • 1 request per every 15 minutes
  • 1 request when closing the config menu

Openweather

  • 1 request per every 15 minutes for the current weather
  • 1 request per hour for the forecast
  • 2 requests when closing the config menu

If you want to make more requests past the above limitations, upgrade your each API's plan to higher ones or just stop the application and wait until the restrictions are alleviated.

Dependency

About

An desktop application to display a clock with news headlines and weather forecasts for small displays (e.g. resolution of 800 x 640).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published