An open API service indexing awesome lists of open source software.

https://github.com/Charmve/github-readme-weather-widget


https://github.com/Charmve/github-readme-weather-widget

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        


GitHub Readme Stats

GitHub Readme Weather Stats


Get dynamically generated weather stats on your GitHub readmes!

Powered by Vercel



View Demo
·
Report Bug
·
Request Feature



## Demo

Weather

Demo URL: `https://github-readme-weather-widget.vercel.app`

## Workflow
This app is basically written with Vercel deployment plan in mind. Since I had issues with reading the configuration after deployment, decided to load the configuration from the repository itself.
Tried to maintain standard! You can change it if you want some kind of different loading strategy.
The weather data & icons are pulled from [OpenWeather](https://openweathermap.org), each time the widget gets loaded.
For time adjustments, UTC adjustments are done according to the Vercel instance. So it may behave wierdly in local.
The API key for [OpenWeather](https://openweathermap.org), is supplied by an environment variable named `OPENWEATHERMAP`.
Calculations & adjustments are done and the [widget](https://github.com/saumiko/weather-readme-widget/blob/master/api/templates/widget.html) template is rendered as a vector image in the final output for the [weather](https://weather-readme.vercel.app/api/weather) api.

## Deploy on your own Vercel instance

1. Configure your repository
- [Fork my repository](https://github.com/saumiko/weather-readme-widget/fork)
- [Edit the configurations](https://github.com/saumiko/weather-readme-widget/blob/master/api/config.ini)
- [ ] [Location Dict](https://github.com/saumiko/weather-readme-widget/blob/dac00febabee2bc9c406cf78aa4a92ca7088333f/api/config.ini#L7)
- [ ] [Timezone Dict](https://github.com/saumiko/weather-readme-widget/blob/dac00febabee2bc9c406cf78aa4a92ca7088333f/api/config.ini#L12)
- [Edit GitHub info](https://github.com/saumiko/weather-readme-widget/blob/dac00febabee2bc9c406cf78aa4a92ca7088333f/api/weather.py#L14)
- [ ] `GITHUB_USERNAME`
- [ ] `GITHUB_REPO`
- [ ] `GIT_BRANCH`
- Push updates in your fork!

2. Configure Vercel instance & deploy!
- Sign up!
- Connect & deploy your repository!
- [ ] Just add your own `appid` for openweathermap api in `OPENWEATHERMAP` env variable.
- Voila! It'll be up and running after that!
- Access path - `http://VERCEL_DOMAIN/api/weather`

## Contributions & License
This app is licensed under MIT License. ©[Asif Mohaimen](https://asifmohai.men), 2020

Contributions are welcome! Please send your PR!

Made with ❤️!