mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
First pass at new site template
This commit is contained in:
committed by
Chris Cummer
parent
215c7e571f
commit
d872a28cf7
8
_site/content/modules/weather_services/_index.md
Normal file
8
_site/content/modules/weather_services/_index.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "Weather Services"
|
||||
date: 2018-05-07T18:04:58-07:00
|
||||
draft: false
|
||||
weight: 270
|
||||
---
|
||||
|
||||
For all modules weather-related.
|
||||
66
_site/content/modules/weather_services/prettyweather.md
Normal file
66
_site/content/modules/weather_services/prettyweather.md
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
title: "Pretty Weather"
|
||||
date: 2018-06-02T05:32:04-07:00
|
||||
draft: false
|
||||
weight: 10
|
||||
---
|
||||
|
||||
<img class="screenshot" src="/imgs/modules/prettyweather.png" width="320" height="191" alt="prettyweather screenshot" />
|
||||
|
||||
Displays weather information as ASCII art from
|
||||
[Wttr.in](http://wttr.in).
|
||||
|
||||
|
||||
## Source Code
|
||||
|
||||
```bash
|
||||
wtf/prettyweather/
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
```yaml
|
||||
prettyweather:
|
||||
enabled: true
|
||||
city: "tehran"
|
||||
position:
|
||||
top: 3
|
||||
left: 5
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 300
|
||||
unit: "c"
|
||||
view: 0
|
||||
language: "en"
|
||||
```
|
||||
|
||||
### Attributes
|
||||
|
||||
`city` <br />
|
||||
_Optional_. It will grab the current location from your IP address if
|
||||
omitted.<br />
|
||||
Values: The name of any city supported by [Wttr.in](http://wttr.in).
|
||||
|
||||
`enabled` <br />
|
||||
Determines whether or not this module is executed and if its data displayed onscreen. <br />
|
||||
Values: `true`, `false`.
|
||||
|
||||
`position` <br />
|
||||
Defines where in the grid this module's widget will be displayed. <br />
|
||||
|
||||
`refreshInterval` <br />
|
||||
How often, in seconds, this module will update its data. <br />
|
||||
Values: A positive integer, `0..n`.
|
||||
|
||||
`unit` <br />
|
||||
_Optional_. It will use metric if you are out of US and imperial for US.<br />
|
||||
The temperature scale in which to display temperature values. <br />
|
||||
Values: `F` for Fahrenheit, `C` for Celcius.
|
||||
|
||||
`view` <br />
|
||||
_Optional_ Wttr.in view configuration. <br />
|
||||
Values: See `curl wttr.in/:help` for more details.
|
||||
|
||||
`language` <br />
|
||||
_Optional_ Wttr.in language configuration. <br />
|
||||
Values: See `curl wttr.in/:translation` for more details.
|
||||
94
_site/content/modules/weather_services/weather.md
Normal file
94
_site/content/modules/weather_services/weather.md
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
title: "Weather"
|
||||
date: 2018-05-09T11:44:13-07:00
|
||||
draft: false
|
||||
weight: 20
|
||||
---
|
||||
|
||||
<img class="screenshot" src="/imgs/modules/weather.png" width="320" height="187" alt="weather screenshot" />
|
||||
|
||||
Displays a configurable list of current weather report, including
|
||||
current temperature, sunrise time, and sunset time.
|
||||
|
||||
|
||||
## Source Code
|
||||
|
||||
```bash
|
||||
wtf/weather/
|
||||
```
|
||||
|
||||
## Keyboard Commands
|
||||
|
||||
<span class="caption">Key:</span> `/` <br />
|
||||
<span class="caption">Action:</span> Open/close the widget's help window.
|
||||
|
||||
<span class="caption">Key:</span> `h` <br />
|
||||
<span class="caption">Action:</span> Show the previous weather location.
|
||||
|
||||
<span class="caption">Key:</span> `l` <br />
|
||||
<span class="caption">Action:</span> Show the next weather location.
|
||||
|
||||
<span class="caption">Key:</span> `←` <br />
|
||||
<span class="caption">Action:</span> Show the previous weather location.
|
||||
|
||||
<span class="caption">Key:</span> `→` <br />
|
||||
<span class="caption">Action:</span> Show the next weather location.
|
||||
|
||||
## Configuration
|
||||
|
||||
```yaml
|
||||
weather:
|
||||
apiKey: "2dfb3e3650a1950adddb6badf5ba1aaa"
|
||||
# From http://openweathermap.org/help/city_list.txt
|
||||
cityids:
|
||||
- 6173331
|
||||
- 3128760
|
||||
- 6167865
|
||||
- 6176823
|
||||
colors:
|
||||
current: "lightblue"
|
||||
enabled: true
|
||||
language: "EN"
|
||||
position:
|
||||
top: 0
|
||||
left: 2
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 900
|
||||
tempUnit: "C"
|
||||
```
|
||||
|
||||
### Attributes
|
||||
|
||||
`apiKey` <br />
|
||||
Your <a href="https://openweathermap.org/appid">OpenWeatherMap API</a> key.
|
||||
|
||||
`cityids` <br />
|
||||
A list of the <a
|
||||
href="http://openweathermap.org/help/city_list.txt">OpenWeatherMap city
|
||||
IDs</a> for the cities you want to view. <br />
|
||||
Values: A list of positive integers, `0..n`
|
||||
|
||||
`colors.current` <br />
|
||||
The color to highlight the current temperature in. <br />
|
||||
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
|
||||
color name</a>.
|
||||
|
||||
`enabled` <br />
|
||||
Determines whether or not this module is executed and if its data displayed onscreen. <br />
|
||||
Values: `true`, `false`.
|
||||
|
||||
`language` <br />
|
||||
The human language in which to present the weather data. <br />
|
||||
Values: Any <a href="https://openweathermap.org/current">language identifier</a> specified by OpenWeatherMap.
|
||||
|
||||
`position` <br />
|
||||
Defines where in the grid this module's widget will be displayed. <br />
|
||||
|
||||
`refreshInterval` <br />
|
||||
How often, in seconds, this module will update its data. <br />
|
||||
Values: A positive integer, `0..n`.
|
||||
|
||||
`tempUnit` <br />
|
||||
The temperature scale in which to display temperature values. <br />
|
||||
Values: `F` for Fahrenheit, `C` for Celcius.
|
||||
Reference in New Issue
Block a user