concerto_weather 0.3.2 → 0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbddb0b388802f7c7bb916c32cdf2daf65717cea
4
- data.tar.gz: 4d49707e9781261b06ae1f0bea600d3f4655aa23
3
+ metadata.gz: f3b305c49d520a14b485d360e103d7d9d50aeae1
4
+ data.tar.gz: a9174426494b15866b904fbac424c2eed53cf1c6
5
5
  SHA512:
6
- metadata.gz: c419cefafa223ad60cc782c4bf2cd6419e4568820cea428f362c8af456207cfeebfa28d94e969edc0554034424925cda47d09a90011ba0f3b6255c051a427a91
7
- data.tar.gz: e73a3895525f5db27e359126a789517a723949c4dd2e1a7059529cb8c35db827a91199e16fdaae78ddfdd7446746bd64e65f4c97595e0f7851cfc77e56250e6d
6
+ metadata.gz: cc5772d0ec6f33c20500d4db8e07cb667e2791db2fc84eb0ee428db97a712f585577ba49c21bd04d9b2d34e2e97225ce8d52de30ac3233fa608f6340b2c06318
7
+ data.tar.gz: 66a587392ffbe69540564a511e09b58b9c3a4757efb79d969fbe75f618d8db60e6e7e2458a29d14b48923d8b2cc1a02c8eb49b4d0337d14c85536378bce2e31b
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
  This plugin provides support to add weather content in Concerto 2 using the [OpenWeatherMap API](http://openweathermap.org/).
3
3
 
4
4
  Custom weather icons are included from [owfont](http://websygen.github.io/owfont/).
5
+ Additional weather icons are added from [weathericons](https://erikflowers.github.io/weather-icons/).
5
6
 
6
7
  Concerto 2 Weather is licensed under the Apache License, Version 2.0.
7
8
 
@@ -15,3 +16,45 @@ Concerto 2 Weather is licensed under the Apache License, Version 2.0.
15
16
 
16
17
  (for development)
17
18
  ``` RAILS_ENV=development rake assets:precompile```
19
+
20
+ ## Added support for formatting
21
+
22
+ A custom formatting script is now supported. It can be added at creation time of the forecast
23
+
24
+ It uses ruby's variable substitution. The following variables are supported:
25
+
26
+ * #{format_city} - City name
27
+ * #{format_iconid} - Icon ID in OpenWeatherMap API number. Should be used if you want to use a custom font that supports OWM.
28
+ * #{format_icon} - the html code to inject the weather icon (<i...> </i>) - uses OWF or WI font based on the setting
29
+ * #{format_high} - High temperature (including units) for the day
30
+ * #{format_low} - Low temperature (including units) for the day
31
+
32
+ It can be used for example as follows:
33
+
34
+ ```
35
+ <h1>#{format_city}</h1>
36
+ <div style='float: left; width: 50%'>
37
+ #{format_icon}
38
+ </div>
39
+ <div style='float: left; width: 50%'>
40
+ <h1> &uarr; #{format_high} | &darr; #{format_low} </h1>
41
+ </div>
42
+ ```
43
+ Variables can be omitted, used twice, etc..
44
+
45
+ If no format is specified the following is used:
46
+
47
+ ```
48
+ <h1> Today in #{format_city} </h1>
49
+ <div style='float: left; width: 50%'>
50
+ #{format_icon}
51
+ </div>
52
+ <div style='float: left; width: 50%'>
53
+ <p> High </p>
54
+ <h1> #{format_high} </h1>
55
+ <p> Low </p>
56
+ <h1> #{format_low}</h1>
57
+ </div>
58
+ ````
59
+
60
+