weatherscout 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -17
- data/bin/weatherscout +1 -1
- data/lib/weatherdesc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67085e050b05b6fa13a62cf4983337bbae1780ee
|
4
|
+
data.tar.gz: c2156eb0dae68d55d002c6674e85e5548c89251b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 805cab857662bcac179fde7af9b923db88c8effcea89e8b6acaaaf2e50540e9b2ace5c8185ce30af1651d152e642f19c373770bfe1368634a0e40e338c20d558
|
7
|
+
data.tar.gz: e6e08939cc8297cea57991c2ef31933c77c233117ec8d9cf2b20bbed48047832dd8355befba1e154227d16d950699439f7206f1f0719ddfd45cfcd838bf6b50b
|
data/README.md
CHANGED
@@ -1,36 +1,37 @@
|
|
1
1
|
# weather-scout
|
2
2
|
[![Build Status](https://travis-ci.org/vicky-sunshine/weather-scout-scraper.svg)](https://travis-ci.org/vicky-sunshine/weather-scout-scraper)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/weatherscout.svg)](https://badge.fury.io/rb/weatherscout)
|
3
4
|
|
4
|
-
|
5
|
+
Weather Scout help you know the weather today!
|
6
|
+
You won't be frozen or burned outside and find the tips to deal with the temperamental weather :muscle:
|
5
7
|
|
6
8
|
## Usage
|
7
9
|
|
8
10
|
Install it with the following command:
|
9
11
|
```sh
|
10
|
-
$
|
12
|
+
$ gem install weatherscout
|
11
13
|
```
|
12
14
|
|
13
|
-
|
15
|
+
To see the weather today
|
14
16
|
```sh
|
15
|
-
$
|
16
|
-
|
17
|
-
|
18
|
-
晚上氣象:多雲,氣溫 15 ~
|
19
|
-
降雨機率:
|
17
|
+
$ weatherscout today 新竹
|
18
|
+
新竹(01/01)天氣狀況:
|
19
|
+
白天氣象:多雲,氣溫 15 ~ 16 度
|
20
|
+
晚上氣象:多雲,氣溫 15 ~ 23 度
|
21
|
+
降雨機率:0 %
|
20
22
|
溫馨叮嚀:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
明天白天之後,東北季風減弱,氣溫略回升,高溫可以來到22至23度;天氣方面,水氣更為減少,各區大多為多雲到晴的天氣。
|
26
|
-
此外,今晚至明晨東北季風影響,空曠地區易有較強陣風。
|
23
|
+
清晨東北季風影響,早晚氣溫低
|
24
|
+
今(31)日,新竹市地區仍受東北季風影響,為多雲的天氣,空曠地區易有8至9級強陣風,香山區白天溫度在15-19度左右;外出請注意保暖及注意安全。
|
25
|
+
明(1)日,新竹市地區清晨東北季風影響,早晚氣溫低,為多雲的天氣,預報溫度在16到18度之間;外出請注意保暖及注意安全。
|
26
|
+
明(1)日,新竹沿海地區風力7至8陣風10級下午轉5至6陣風8級,作業船隻及海邊活動仍請注意安全。
|
27
27
|
```
|
28
28
|
|
29
|
+
The weather in the future week and other feature will be coming soon! :grinning:
|
29
30
|
|
30
|
-
|
31
|
+
## Development
|
31
32
|
Use it from your Ruby code:
|
32
33
|
````ruby
|
33
|
-
require '
|
34
|
+
require 'weatherscout'
|
34
35
|
CITY = "新竹"
|
35
36
|
weather = DailyWeatherScraper::DailyWeather.new(CITY)
|
36
37
|
|
@@ -38,11 +39,12 @@ temp = weather.temperature_day
|
|
38
39
|
puts "今天白天氣溫:#{temp}"
|
39
40
|
|
40
41
|
tips = weather.tips
|
41
|
-
puts tips
|
42
|
+
puts "溫馨提示:\n#{tips}"
|
42
43
|
|
43
44
|
````
|
44
45
|
|
45
46
|
## Test
|
47
|
+
Using [rake](http://docs.seattlerb.org/rake/) to run tests. If you don't have rake using `gem install rake` to install it.
|
46
48
|
|
47
49
|
```sh
|
48
50
|
$ rake
|
data/bin/weatherscout
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'thor'
|
3
|
-
require './lib/weatherdesc/daily_weather.rb' # for cmd line testing purposes
|
3
|
+
# require './lib/weatherdesc/daily_weather.rb' # for cmd line testing purposes
|
4
4
|
|
5
5
|
class WeatherCLI < Thor
|
6
6
|
desc 'today CITY', 'see the weather of the city today'
|
data/lib/weatherdesc/version.rb
CHANGED