Changeset 12982 for platform/tdiary/plugin
- Timestamp:
- 06/01/08 18:28:13 (6 months ago)
- Location:
- platform/tdiary/plugin
- Files:
-
- 4 modified
-
en/livedoor_weather.rb (modified) (1 diff)
-
ja/livedoor_weather.rb (modified) (1 diff)
-
livedoor_weather.rb (modified) (5 diffs)
-
zh/livedoor_weather.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
platform/tdiary/plugin/en/livedoor_weather.rb
r3325 r12982 11 11 # 12 12 13 @lwws_rest_url = 'http://weather.livedoor.com/forecast/webservice/rest/v1'14 13 @lwws_plugin_name = 'livedoor weather' 15 14 @lwws_label_city_id = 'City ID' -
platform/tdiary/plugin/ja/livedoor_weather.rb
r5057 r12982 11 11 # 12 12 13 @lwws_rest_url = 'http://weather.livedoor.com/forecast/webservice/rest/v1'14 13 @lwws_plugin_name = 'livedoor 天気情報' 15 14 @lwws_label_city_id = '都市IDの設定' -
platform/tdiary/plugin/livedoor_weather.rb
r12918 r12982 10 10 require 'timeout' 11 11 require 'rexml/document' 12 13 @lwws_rest_url = 'http://weather.livedoor.com/forecast/webservice/rest/v1' 12 14 13 15 def lwws_init … … 75 77 end 76 78 77 def lwws_to_html( date _status, date = nil)79 def lwws_to_html( date ) 78 80 lwws_init 79 81 80 82 cache = "#{@cache_path}/lwws" 81 82 unless date83 file_name = "#{cache}/#{convert_date( date_status)}.xml" # file_name is YYYYMMDD83 case date 84 when "today", "tommorow", "dayaftertommorow" 85 file_name = "#{cache}/#{convert_date( date_status)}.xml" 84 86 else 85 87 file_name = "#{cache}/#{date}.xml" 86 88 end 89 90 today = Time.now.strftime("%Y%m%d") 87 91 88 92 begin … … 106 110 width = doc.elements["image/width"].text 107 111 height = doc.elements["image/height"].text 108 result << %Q|<a href="#{link}"><img src="#{url}" border="0" alt="#{title}" title="#{title}" width=#{width} height="#{height}" /></a>| 112 if date == today 113 result << %Q|<a href="#{link}">| 114 end 115 result << %Q|<img src="#{url}" border="0" alt="#{title}" title="#{title}" width=#{width} height="#{height}" /></a>| 116 if date == today 117 result << %Q|</a>| 118 end 109 119 end 110 120 … … 123 133 return '' 124 134 end 125 end126 127 def lwws_today128 lwws_get( "today" )129 lwws_to_html( "today" )130 end131 132 def lwws_tomorrow133 lwws_get( "tomorrow" )134 lwws_to_html( "tomorrow" )135 end136 137 def lwws_dayaftertomorrow138 lwws_get( "dayaftertomorrow" )139 lwws_to_html( "dayaftertomorrow" )140 end141 142 def lwws( date )143 lwws_to_html( "", date )144 135 end 145 136 … … 188 179 add_body_enter_proc do |date| 189 180 unless feed? 190 lwws_to_html( "", date.strftime("%Y%m%d"))181 lwws_to_html( date.strftime("%Y%m%d") ) 191 182 end 192 183 end -
platform/tdiary/plugin/zh/livedoor_weather.rb
r3325 r12982 11 11 # 12 12 13 @lwws_rest_url = 'http://weather.livedoor.com/forecast/webservice/rest/v1'14 13 @lwws_plugin_name = 'livedoor weather' 15 14 @lwws_label_city_id = 'City ID'
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)