Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/impshum/Reddit-Weather-Sidebar

Displays the weather forecast in the sidebar on your subreddit for a chosen city.
https://github.com/impshum/Reddit-Weather-Sidebar

bot praw reddit sidebar weather

Last synced: about 1 month ago
JSON representation

Displays the weather forecast in the sidebar on your subreddit for a chosen city.

Awesome Lists containing this project

README

        

## Reddit Weather Sidebar

Displays the weather forecast in the sidebar for a chosen city.

![](s.png)

### Instructions

- Install requirements `pip install -r requirements.txt`
- Create Reddit (script) app at and get keys
- Get an API key from
- Edit conf.ini with your details
- Edit old Reddit stylesheet at and add this CSS

.side table {
width: 100%;
font-family: IBMPlexSans, Arial, sans-serif;
}

.side thead {
display: none;
}

.side h2, .side h3 {
padding-top: 1rem;
text-align: center;
}

- Add a new custom widget on the new Reddit style at , name it `Weather` (or whatever you declared it to be in conf.ini) and add this CSS

.md table {
width: 100%;
font-family: IBMPlexSans, Arial, sans-serif;
}

.md thead {
display: none;
}

.md h2, .md h3 {
padding-top: 1rem;
text-align: center;
font-family: IBMPlexSans, Arial, sans-serif;
}

- Run it `python run.py`

### Settings Info

`reddit_user` - Reddit username
`reddit_pass` - Reddit password
`reddit_client_id` - Reddit Client ID
`reddit_client_secret` - Reddit Client Secret
`reddit_target_subreddit` - Subreddit to update sidebar
`reddit_widget_name` - Widget name (new Reddit style)

`weather_api_key` - API key from openweathermap
`weather_units` metric
`weather_city` London,UK

### Notes

- The account that you use for the bot has to be a mod of the target subreddit and have the correct permissions to edit things.
- The script only runs once. You can run it on https://www.pythonanywhere.com/ once a day for free.

### Tip

BTC - 1AYSiE7mhR9XshtS4mU2rRoAGxN8wSo4tK