tdiary-contrib 3.2.2.20130518 → 3.2.2.20130614

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -3
  3. data/doc/ja/plugin/image_gps.txt +56 -17
  4. data/doc/ja/plugin/playstore.txt +31 -0
  5. data/js/socialbutton.js +8 -2
  6. data/lib/exifparser/README +6 -12
  7. data/lib/tdiary-contrib.rb +7 -6
  8. data/plugin/brow_si.rb +32 -0
  9. data/plugin/image_gps.rb +110 -56
  10. data/plugin/instagr.rb +1 -0
  11. data/plugin/playstore.rb +161 -0
  12. data/plugin/tweet_quote.rb +102 -48
  13. data/plugin/twitter_badge.rb +1 -1
  14. data/util/estraier-search/estraier-register.rb +2 -1
  15. data/util/estraier-search/estraier-search.rb +2 -1
  16. data/util/image-gallery/misc/plugin/recent_image.rb +1 -1
  17. metadata +7 -27
  18. data/doc/ja/plugin/image_detail.txt +0 -69
  19. data/doc/ja/plugin/image_gps2.txt +0 -41
  20. data/lib/exifparser/BUGS +0 -1
  21. data/lib/exifparser/ChangeLog +0 -169
  22. data/lib/exifparser/install.rb +0 -1015
  23. data/lib/exifparser/lib/exifparser/makernote/canon.rb +0 -502
  24. data/lib/exifparser/lib/exifparser/makernote/fujifilm.rb +0 -415
  25. data/lib/exifparser/lib/exifparser/makernote/minolta.rb +0 -84
  26. data/lib/exifparser/lib/exifparser/makernote/mk_nikonflensname.rb +0 -39
  27. data/lib/exifparser/lib/exifparser/makernote/nikon.rb +0 -267
  28. data/lib/exifparser/lib/exifparser/makernote/nikon2.rb +0 -581
  29. data/lib/exifparser/lib/exifparser/makernote/nikonflensname.rb +0 -438
  30. data/lib/exifparser/lib/exifparser/makernote/olympus.rb +0 -225
  31. data/lib/exifparser/lib/exifparser/makernote/prove.rb +0 -84
  32. data/lib/exifparser/lib/exifparser/makernote/sigma.rb +0 -237
  33. data/lib/exifparser/lib/exifparser/pre-setup.rb +0 -1
  34. data/lib/exifparser/lib/exifparser/scan.rb +0 -278
  35. data/lib/exifparser/lib/exifparser/tag.rb +0 -2298
  36. data/lib/exifparser/lib/exifparser/thumbnail.rb +0 -76
  37. data/lib/exifparser/lib/exifparser/utils.rb +0 -88
  38. data/lib/exifparser/lib/exifparser.rb +0 -265
  39. data/lib/exifparser/sample/exifview.rb +0 -279
  40. data/plugin/image_detail.rb +0 -143
@@ -18,86 +18,140 @@
18
18
  require 'pstore'
19
19
  require 'open-uri'
20
20
  require 'timeout'
21
- require 'rexml/document'
22
21
  require 'time'
23
22
  require 'uri'
23
+ require 'openssl'
24
+ require 'json'
25
+
26
+ def twitter_quote_option_keys
27
+ %w( consumer_key consumer_secret token token_secret).map{|k| "twitter_quote.oauth_#{k}" }
28
+ end
24
29
 
25
30
  def twitter_statuses_show_api( tweet_id )
26
- url = "http://api.twitter.com/1/statuses/show/#{tweet_id}.xml"
31
+ url = "https://api.twitter.com/1.1/statuses/show.json"
32
+ unsafe = /[^a-zA-Z0-9\-\.\_\~]/
33
+ parameters = {
34
+ :id => tweet_id
35
+ }
36
+ oauth_parameters = {
37
+ :oauth_consumer_key => @conf["twitter_quote.oauth_consumer_key"],
38
+ :oauth_nonce => OpenSSL::Digest.hexdigest( "MD5", "#{Time.now.to_f}#{rand}" ),
39
+ :oauth_signature_method => "HMAC-SHA1",
40
+ :oauth_timestamp => Time.now.to_i.to_s,
41
+ :oauth_token => @conf["twitter_quote.oauth_token"],
42
+ :oauth_version => "1.0"
43
+ }
44
+ data = "GET&#{URI.escape( url, unsafe )}&"
45
+ data << URI.escape( oauth_parameters.merge( parameters ).sort.map{|k, v| "#{k}=#{v}" }.join( "&" ), unsafe )
46
+ oauth_parameters[:oauth_signature] = [OpenSSL::HMAC.digest(
47
+ OpenSSL::Digest::SHA1.new,
48
+ URI.escape( "#{@conf["twitter_quote.oauth_consumer_secret"]}&#{@conf["twitter_quote.oauth_token_secret"]}" ),
49
+ data
50
+ )].pack( "m" ).chomp
27
51
 
28
52
  proxy = @conf['proxy']
29
53
  proxy = 'http://' + proxy if proxy
30
54
 
55
+ headers = {
56
+ "Authorization" => %Q[OAuth #{oauth_parameters.map{|k ,v| "#{URI.escape( k.to_s, unsafe )}=\"#{URI.escape( v, unsafe )}\""}.join( "," )}],
57
+ :proxy => proxy
58
+ }
31
59
  timeout( 20 ) do
32
- open( url, :proxy => proxy ) {|f| f.read }
60
+ open( "#{url}?#{parameters.map{|k,v| "#{k}=#{v}"}.join( "&" )}", headers ) {|f| f.read }
33
61
  end
34
62
  end
35
63
 
64
+ def twitter_status_json_to_html( json )
65
+ tweet_id = json['id_str']
66
+ screen_name = json['user']['screen_name']
67
+ name = json['user']['name']
68
+ background_url = json['user']['profile_background_image_url']
69
+ profile_background_color = "##{json['user']['profile_background_color']}"
70
+ avatar = json['user']['profile_image_url']
71
+ source = json['source']
72
+ timestamp = Time.parse( json['created_at'] )
73
+ content = json['text']
74
+ content.gsub!( URI.regexp( %w|http https| ) ){ %Q|<a href="#{$&}">#{$&}</a>| }
75
+ content = content.split( /(<[^>]*>)/ ).map {|s|
76
+ next s if s[/\A</]
77
+ s.gsub!( /@(?>([a-zA-Z0-9_]{1,15}))(?![a-zA-Z0-9_])/ ){ %Q|<a href="http://twitter.com/#{$1}">#{$&}</a>| }
78
+ s.gsub( /#([a-zA-Z0-9]{1,16})/ ){ %Q|<a href="http://twitter.com/search?q=%23#{$1}">#{$&}</a>| }
79
+ }.join
80
+
81
+ <<-HTML
82
+ <!-- http://twitter.com/#{screen_name}/status/#{tweet_id} -->
83
+ <div class="bbpBox" style="background:url(#{background_url}) #{profile_background_color};padding:20px;">
84
+ <p class="bbpTweet" style=
85
+ "background:#fff;padding:10px 12px 10px 12px;margin:0;min-height:48px;color:#000;font-size:16px !important;line-height:22px;-moz-border-radius:5px;-webkit-border-radius:5px;">
86
+ <span class="bbpMetadata" style=
87
+ "display:block;width:100%;clear:both;margin-bottom:8px;padding-bottom:12px;height:40px;border-bottom:1px solid #fff;border-bottom:1px solid #e6e6e6;">
88
+ <span class="bbpAuthor" style="line-height:19px;"><a href=
89
+ "http://twitter.com/#{screen_name}"><img alt="#{name}" src=
90
+ "#{avatar}" style=
91
+ "float:left;margin:0 17px 0 0;width:38px;height:38px;"></a>
92
+ <a href="http://twitter.com/#{screen_name}" style="text-decoration:none">
93
+ <strong style="text-decoration:underline">#{name}</strong><br>
94
+ @#{screen_name}</a></span></span>
95
+ #{content} <span class="bbpTimestamp" style=
96
+ "font-size:12px;display:block;"><a title="#{timestamp}" href=
97
+ "http://twitter.com/#{screen_name}/status/#{tweet_id}">#{timestamp}</a>
98
+ <span style="float:right"><a href=
99
+ "https://twitter.com/intent/tweet?in_reply_to=#{tweet_id}">Reply</a> <a href=
100
+ "https://twitter.com/intent/retweet?tweet_id=#{tweet_id}">Retweet</a> <a href=
101
+ "https://twitter.com/intent/favorite?tweet_id=#{tweet_id}"}>Favorite</a>
102
+ </span></span></p>
103
+ </div>
104
+ <!-- end of tweet -->
105
+ HTML
106
+ end
36
107
 
37
108
  def tweet_quote( src )
109
+ return unless twitter_quote_option_keys.all?{|v| @options.key? v }
110
+
38
111
  if %r|http(?:s)?://twitter.com/(?:#!/)?[^/]{1,15}/status(?:es)?/([0-9]+)| =~ src.to_s.downcase
39
112
  src = $1
40
113
  end
41
114
 
42
115
  return unless /\A[0-9]+\z/ =~ src.to_s
43
116
 
44
- cache = "#{@cache_path}/blackbird.pstore"
45
- xml = nil
117
+ cache = "#{@cache_path}/tweet_quote.pstore"
118
+ json = nil
46
119
 
47
120
  db = PStore.new( cache )
48
121
  db.transaction do
49
122
  key = src
50
123
  db[key] ||= {}
51
- if db[key][:xml]
52
- xml = db[key][:xml]
124
+ if db[key][:json] && /\A(?:latest|day|month|nyear)\z/ =~ @mode
125
+ json = db[key][:json]
53
126
  else
54
127
  begin
55
- xml = twitter_statuses_show_api( src )
128
+ json = twitter_statuses_show_api( src )
56
129
  rescue OpenURI::HTTPError
57
- return %Q|<p class="bbpMessage">#$!</p>|
130
+ return %Q|<p class="tweet_quote_error">#$!</p>|
58
131
  end
59
- db[key][:xml] = xml
132
+ db[key][:json] = json
60
133
  end
61
134
  end
135
+ twitter_status_json_to_html( JSON.parse( json ) )
136
+ end
62
137
 
63
- doc = REXML::Document::new( REXML::Source.new( xml ) ).root
64
-
65
- tweet_id = doc.elements['//id'].text
66
- screen_name = doc.elements['//user/screen_name'].text
67
- name = doc.elements['//user/name'].text
68
- background_url = doc.elements['//user/profile_background_image_url'].text
69
- profile_background_color = '#' + doc.elements['//user/profile_background_color'].text
70
- avatar = doc.elements['//user/profile_image_url'].text
71
- source = doc.elements['//source'].text
72
- timestamp = Time.parse( doc.elements['//created_at'].text ).to_s
73
- content = doc.elements['//text'].text
74
- content.gsub!( URI.regexp( %w|http https| ) ){ %Q|<a href="#{$&}">#{$&}</a>| }
75
- content = content.split( /(<[^>]*>)/ ).map do |s|
76
- next s if s[/\A</]
77
- s.gsub!( /@(?>([a-zA-Z0-9_]{1,15}))(?![a-zA-Z0-9_])/ ){ %Q|<a href="http://twitter.com/#{$1}">#{$&}</a>| }
78
- s.gsub( /#([a-zA-Z0-9]{1,16})/ ){ %Q|<a href="http://twitter.com/search?q=%23#{$1}">#{$&}</a>| }
79
- end.join
80
-
81
- r = <<-HTML
82
- <!-- http://twitter.com/#{screen_name}/status/#{tweet_id} -->
83
- <div class="bbpBox" style=
84
- "background:url(#{background_url}) #{profile_background_color};padding:20px;">
85
- <p class="bbpTweet" style=
86
- "background:#fff;padding:10px 12px 10px 12px;margin:0;min-height:48px;color:#000;font-size:16px !important;line-height:22px;-moz-border-radius:5px;-webkit-border-radius:5px;">
87
- #{content} <span class="bbpTimestamp" style=
88
- "font-size:12px;display:block;"><a title="#{timestamp}" href=
89
- "http://twitter.com/#{screen_name}/status/#{tweet_id}">#{timestamp}</a> via #{source}
90
- </span> <span class="bbpMetadata" style=
91
- "display:block;width:100%;clear:both;margin-top:8px;padding-top:12px;height:40px;border-top:1px solid #fff;border-top:1px solid #e6e6e6;">
92
- <span class="bbpAuthor" style="line-height:19px;"><a href=
93
- "http://twitter.com/#{screen_name}"><img alt="#{name}" src=
94
- "#{avatar}" style=
95
- "float:left;margin:0 7px 0 0;width:38px;height:38px;"></a>
96
- <strong><a href=
97
- "http://twitter.com/#{screen_name}">#{screen_name}</a></strong><br>
98
- #{name}</span></span></p>
99
- </div>
100
- <!-- end of tweet -->
138
+ add_conf_proc( 'twitter_quote', 'Embedded Tweets' ) do
139
+ if @mode == 'saveconf'
140
+ twitter_quote_option_keys.each do |k|
141
+ @conf[k] = @cgi.params[k][0]
142
+ end
143
+ end
144
+ <<-HTML
145
+ <h2>Twitter OAuth settings</h2>
146
+ <h3>Consumer key</h3>
147
+ <p><input type="text" name="twitter_quote.oauth_consumer_key" value="#{h @conf["twitter_quote.oauth_consumer_key"]}" size="80"></p>
148
+ <h3>Consumer secret</h3>
149
+ <p><input type="text" name="twitter_quote.oauth_consumer_secret" value="#{h @conf["twitter_quote.oauth_consumer_secret"]}" size="80"></p>
150
+ <h2>Your access token</h2>
151
+ <h3>Access token</h3>
152
+ <p><input type="text" name="twitter_quote.oauth_token" value="#{h @conf["twitter_quote.oauth_token"]}" size="80"></p>
153
+ <h3>Access token secret</h3>
154
+ <p><input type="text" name="twitter_quote.oauth_token_secret" value="#{h @conf["twitter_quote.oauth_token_secret"]}" size="80"></p>
101
155
  HTML
102
156
  end
103
157
 
@@ -23,7 +23,7 @@ add_footer_proc do
23
23
  t = @twitter_badge_setting
24
24
  <<-TEXT
25
25
  <!-- Twitter follow badge by go2web20 -->
26
- <script src="http://files.go2web20.net/twitterbadge/1.0/badge.js" type="text/javascript" charset="utf-8"></script>
26
+ <script src="http://www.go2web20.net/twitterfollowbadge/1.0/badge.js" type="text/javascript" charset="utf-8"></script>
27
27
  <script type="text/javascript"><!--
28
28
  tfb.account = '#{t[:account]}';
29
29
  tfb.label = '#{t[:label]}';
@@ -234,7 +234,8 @@ if mode == "CMD"
234
234
  if TDiary::Config.instance_method(:initialize).arity != 0
235
235
  # for tDiary 2.1 or later
236
236
  cgi = CGI.new
237
- conf = TDiary::Config::new(cgi)
237
+ request = TDiary::Request.new(ENV, cgi)
238
+ conf = TDiary::Config::new(cgi, request)
238
239
  else
239
240
  # for tDiary 2.0 or earlier
240
241
  conf = TDiary::Config::new
@@ -232,7 +232,8 @@ begin
232
232
  @cgi = CGI::new
233
233
  if ::TDiary::Config.instance_method(:initialize).arity != 0
234
234
  # for tDiary 2.1 or later
235
- conf = ::TDiary::Config::new(@cgi)
235
+ request = ::TDiary::Request.new(ENV, @cgi)
236
+ conf = ::TDiary::Config::new(@cgi, request)
236
237
  else
237
238
  # for tDiary 2.0 or earlier
238
239
  conf = ::TDiary::Config::new
@@ -272,7 +272,7 @@ def recent_image(items = 4, width = 80, link_mode = 1, name_filter = nil, title_
272
272
  when 0
273
273
  result << %Q[<a href="./image-gallery.rb?mode=viewer;key=#{File.basename(image.file, ".*")}"><img src="#{@recent_image_url}/#{image.url}" #{sizestr} alt="#{image.title}" title="#{image.title}"></a>\n]
274
274
  when 1
275
- result << %Q[<a href="./?date=#{image.date}"><img src="#{@recent_image_url}/#{image.url}" #{sizestr} alt="#{image.title}" title="#{image.title}"></a>\n]
275
+ result << %Q[<a href="#{anchor(image.date)}"><img src="#{@recent_image_url}/#{image.url}" #{sizestr} alt="#{image.title}" title="#{image.title}"></a>\n]
276
276
  when 2
277
277
  result << %Q[<a href="#{@recent_image_url}/#{image.file}"><img src="#{@recent_image_url}/#{image.url}" #{sizestr} alt="#{image.title}" title="#{image.title}"></a>\n]
278
278
  when 3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdiary-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.2.20130518
4
+ version: 3.2.2.20130614
5
5
  platform: ruby
6
6
  authors:
7
7
  - tDiary contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-18 00:00:00.000000000 Z
11
+ date: 2013-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tdiary
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.2.20130518
19
+ version: 3.2.2.20130614
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.2.20130518
26
+ version: 3.2.2.20130614
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -82,11 +82,10 @@ files:
82
82
  - doc/ja/plugin/cocoment.txt
83
83
  - doc/ja/plugin/google_adsense.txt
84
84
  - doc/ja/plugin/google_analytics.txt
85
- - doc/ja/plugin/image_detail.txt
86
85
  - doc/ja/plugin/image_gps.txt
87
- - doc/ja/plugin/image_gps2.txt
88
86
  - doc/ja/plugin/livedoor_weather.txt
89
87
  - doc/ja/plugin/opensearch_ad.txt
88
+ - doc/ja/plugin/playstore.txt
90
89
  - doc/ja/plugin/section_footer.txt
91
90
  - doc/ja/plugin/select_theme.txt
92
91
  - doc/ja/style/hatena.txt
@@ -154,27 +153,7 @@ files:
154
153
  - js/yahoo_kousei.js
155
154
  - lib/bayes.rb
156
155
  - lib/bayes/convert.rb
157
- - lib/exifparser/BUGS
158
- - lib/exifparser/ChangeLog
159
156
  - lib/exifparser/README
160
- - lib/exifparser/install.rb
161
- - lib/exifparser/lib/exifparser.rb
162
- - lib/exifparser/lib/exifparser/makernote/canon.rb
163
- - lib/exifparser/lib/exifparser/makernote/fujifilm.rb
164
- - lib/exifparser/lib/exifparser/makernote/minolta.rb
165
- - lib/exifparser/lib/exifparser/makernote/mk_nikonflensname.rb
166
- - lib/exifparser/lib/exifparser/makernote/nikon.rb
167
- - lib/exifparser/lib/exifparser/makernote/nikon2.rb
168
- - lib/exifparser/lib/exifparser/makernote/nikonflensname.rb
169
- - lib/exifparser/lib/exifparser/makernote/olympus.rb
170
- - lib/exifparser/lib/exifparser/makernote/prove.rb
171
- - lib/exifparser/lib/exifparser/makernote/sigma.rb
172
- - lib/exifparser/lib/exifparser/pre-setup.rb
173
- - lib/exifparser/lib/exifparser/scan.rb
174
- - lib/exifparser/lib/exifparser/tag.rb
175
- - lib/exifparser/lib/exifparser/thumbnail.rb
176
- - lib/exifparser/lib/exifparser/utils.rb
177
- - lib/exifparser/sample/exifview.rb
178
157
  - lib/tdiary-contrib.rb
179
158
  - lib/wgs2tky.rb
180
159
  - misc/section_footer2/buzzurl.yaml
@@ -200,6 +179,7 @@ files:
200
179
  - plugin/bigpresen.rb
201
180
  - plugin/bitly.rb
202
181
  - plugin/bootstrap-navi.rb
182
+ - plugin/brow_si.rb
203
183
  - plugin/canonical.rb
204
184
  - plugin/category_similar.rb
205
185
  - plugin/category_to_tag.rb
@@ -244,7 +224,6 @@ files:
244
224
  - plugin/hide_comment_form.rb
245
225
  - plugin/hide_sidebar_iphone.rb
246
226
  - plugin/iddy.rb
247
- - plugin/image_detail.rb
248
227
  - plugin/image_ex.rb
249
228
  - plugin/image_gps.rb
250
229
  - plugin/inline_wiki.rb
@@ -286,6 +265,7 @@ files:
286
265
  - plugin/openid.rb
287
266
  - plugin/opensearch_ad.rb
288
267
  - plugin/picasa.rb
268
+ - plugin/playstore.rb
289
269
  - plugin/plugin_checker.rb
290
270
  - plugin/popit.rb
291
271
  - plugin/prettify.rb
@@ -1,69 +0,0 @@
1
- image_detail.rb
2
-
3
- 機能
4
- JPEGファイルに含まれるExif情報を解析し、各種撮影条件を表示します。
5
- また、位置情報が含まれる場合、周辺地図ををポップアップ表示し、
6
- Googleマップへのリンクを生成します。
7
-
8
-
9
- 更新情報
10
- revision 1.0:
11
- ファーストリリース
12
- revision 1.1:
13
- スマートフォン対応、その他
14
-
15
- インストール
16
- このPluginはimage.rbが導入されていることを前提としています。
17
- image.rbを有効にしてください。また、image_ex.rbと共存することはできません。
18
-
19
- ・ExifParserの導入
20
- image_detail.rbはExifのパーサとして、ExifParserを使用しています。
21
- tdiary/lib/ExifParser/READMEに従って導入してください。
22
-
23
- ・Pluginのインストール
24
- image_detail.rbを適切な場所に配置してください。多言語用リソースは存在しません。
25
-
26
- ・Google Maps API Keyの取得
27
- http://code.google.com/intl/ja/apis/maps/signup.html
28
- にてAPIキーを生成し、[設定]-[その他]-[image_gpsの設定]の
29
- Google Maps API Keyに生成されたAPIキーを設定してください。
30
- APIキーが設定されていない場合、地図のポップアップ表示および
31
- モバイルモードでの地図の表示ができません。
32
-
33
- ・CSSの追加
34
- 写真と撮影条件をそれっぽく表示するために、CSSを設定する必要があります。
35
- apend_css.rbを使用すると簡単にCSSを追加することができます。
36
- 参考に、作者が設定しているCSSを示します。
37
-
38
- --ここから
39
- img.photo{
40
- float:left;
41
- clear:both;
42
- }
43
-
44
- div.photo_detail{
45
- clear:both;
46
- display:block;
47
- margin:0.5em;
48
- padding:0.5em;
49
- }
50
-
51
- div.photo_detail ul{
52
- list-style-type:none;
53
- }
54
-
55
- img.map {
56
- outline:solid 5px gray;
57
- }
58
- --ここまで
59
-
60
- 使用方法
61
- プラグインの書式は、image.rbと同じです。
62
-
63
- 画像がJPEGかつExif情報を含む場合各種撮影条件を表示します。
64
- Exif情報に位置情報が含まれている場合、地図をポップアップ表示し、
65
- Googleマップへのリンクを生成します。
66
-
67
- 制限事項
68
- secureモードには対応していません。
69
- image_ex.rbと同時に使用することはできません。
@@ -1,41 +0,0 @@
1
- image_gps2.rb
2
-
3
- 機能
4
- アップロードした画像に含まれているGPSの位置情報を使用して、
5
- 対応する地図をポップアップ表示します。また、画像ファイルに機種名などの情
6
- 報が含まれている場合、タイトル情報として表示する事が可能です。
7
-
8
- 更新情報
9
- revision 0.8:
10
- first release.
11
- image_gps.rbからフォークしたよ。
12
-
13
- インストール
14
- このPluginはimage.rbが導入されていることを前提としています。
15
- image.rbを有効にしてください。また、image_ex.rbと共存することはできません。
16
-
17
- ・ExifParserの導入
18
- image_gps2.rbはExifのパーサとして、ExifParserを使用しています。
19
- tdiary/lib/ExifParser/READMEに従って導入してください。
20
-
21
- ・Pluginのインストール
22
- image_gps2.rbを適切な場所に配置してください。多言語用リソースは存在しません。
23
-
24
- ・Google MAPS APIキーの設定
25
- このPluginを使用するには、Google MAPS APIのキーを取得し、設定する必要があります。
26
- http://code.google.com/intl/ja/apis/maps/signup.html にてtDiaryのあるドメインの
27
- URLを入力し、キーを取得してください。
28
-
29
- 取得したキーを[設定]-[その他]-[image_gpsの設定]のGoogle Maps API Keyに
30
- 設定すると使用できるようになります。
31
-
32
- 使用方法
33
- image.rbと同じです。画像にGPSの情報が含まれている場合はマウスオーバー
34
- でGoogle Maps Static APIを利用した地図をポップアップで表示します。
35
-
36
- 携帯端末でアクセスした場合は、リンク先がGoogle Maps Static APIで生成した
37
- 地図の画像となります。
38
-
39
- 制限事項
40
- secureモードには対応していません。
41
- image_ex.rbと同時に使用することはできません。
data/lib/exifparser/BUGS DELETED
@@ -1 +0,0 @@
1
- * DO NOT USE WITH ruby-libexif!
@@ -1,169 +0,0 @@
1
- 2008-01-17 kp <kp@mmho.no-ip.org>
2
-
3
- * lib/exifparser/tag.rb:
4
- Fix Rational method call for Ruby1.8.x
5
-
6
- Thu Dec 12 16:21:39 2002 Ryuichi Tamura <r-tam@fsinet.or.jp>
7
-
8
- * lib/exifparser/tag.rb (Exif::Tag::Exif::LightSource#to_s):
9
- complete missing returned values that are introduced in
10
- Exif standard 2.2.
11
-
12
- Thu Dec 12 04:05:42 2002 Ryuichi Tamura <r-tam@fsinet.or.jp>
13
-
14
- * lib/exifparser/tag.rb: EXIF tag set should include
15
- 'InteroperabilityIFDPointer'
16
-
17
- Tue Dec 10 23:26:46 2002 Ryuichi Tamura <r-tam@fsinet.or.jp>
18
-
19
- * lib/exifparser/scan.rb, lib/exifparser/tag.rb,
20
- lib/exifparser/makernote/*.rb: namespaces introduced to
21
- prevent name collision.
22
-
23
- Tue Dec 10 21:43:13 2002 Ryuichi Tamura <r-tam@fsinet.or.jp>
24
-
25
- * lib/exifparser/*.rb, lib/exifparser/makernote/*.rb:
26
- fin_read_n() now simply returns byte stream, not pack("C*")'ed.
27
- use String#unpack, Array#unpack to decode stream (see utils.rb).
28
- All the class/routines that use input stream changed accordingly.
29
-
30
- Sun Dec 8 19:01:13 2002 Ryuichi Tamura <r-tam@fsinet.or.jp>
31
-
32
- * lib/exifparser/tag.rb (Exif::Tag): missing tag classes
33
- completed to make conformable with Exif Standard 2.2
34
- (backward compatible newest standard).
35
- (Exif::Tag::Flash#to_s): returned value make comformable
36
- to Exif Standard 2.2.
37
- (Exif::Tag::PixelXDimension, Exif::Tag::PixelYDimension):
38
- renamed from 'ExifImageWidth' and 'ExifImageLength'.
39
-
40
- Sun Dec 8 15:27:27 2002 Ryuichi Tamura <r-tam@fsinet.or.jp>
41
-
42
- * Apply following fixes/contributions by Noguchi Shingo.
43
-
44
- * lib/exifparser/makernote/nikon2.rb,
45
- lib/exifparser/makernote/minolta.rb: new files.
46
-
47
- * lib/exifparser/scan.rb (Exif::Scanner#scan): Tag::Model object
48
- was generated by Tag::Model. This bug is fixed by Noguchi Shingo.
49
- (Exif::Scanner#scan): use @byteOrder_module to instantiate
50
- makernote object. In many models, the byteorder of Makernote
51
- seems the same as that of IFDs.
52
-
53
- * lib/exifparser/makernote/*.rb (Exif::Makernote::XXX#initialize):
54
- ditto.
55
-
56
- * lib/exifparser/makernote/nikon.rb: new tag classes introduced,
57
- some of them are fixed.
58
-
59
- * lib/exifparser/makernote/prove.rb: added new conditionals to
60
- return newly introduced models (Nikon, Nikon2, Minolta).
61
-
62
- * lib/exifparser/tag.rb (Exif::Tag::Makernote#_format0,
63
- Exif::Tag::Makernote#to_s): the functionality of these methods
64
- should be exchanged.
65
-
66
- * lib/exifparser/tag.rb (Exif::Tag::UserComment#to_s):
67
- wrong pack parameter.
68
-
69
- * lib/exifparser/tag.rb (Exif::Tag::CustomRendered): new tag class.
70
-
71
- * lib/exifparser/tag.rb (Exif::Tag::DigitalZoonRation): ditto.
72
-
73
- * lib/exifparser/tag.rb (Exif::Tag::FocalLengthIn35mmFilm): ditto.
74
-
75
- * lib/exifparser/tag.rb (Exif::Tag::SceneCaptureType): ditto.
76
-
77
- * lib/exifparser/tag.rb (Exif::Tag::GainControl): ditto.
78
-
79
- * lib/exifparser/tag.rb (Exif::Tag::Contrast): ditto.
80
-
81
- * lib/exifparser/tag.rb (Exif::Tag::Saturation): ditto.
82
-
83
- * lib/exifparser/tag.rb (Exif::Tag::Sharpness): ditto.
84
-
85
- * lib/exifparser/tag.rb (Exif::Tag::DeviceSettingDescription): ditto.
86
-
87
- * lib/exifparser/tag.rb (Exif::Tag::SubjectDistanceRange): ditto.
88
-
89
- Wed Nov 20 13:28:16 2002 Ryuichi Tamura <r-tam@fsinet.or.jp>
90
-
91
- * lib/exifparser/utils.rb: Utils::Pack::Motorola,
92
- Utils::Pack::Intel: new modules. these are extended to
93
- objects that require decode data.
94
-
95
- * lib/exifparser/scan.rb: __byteOrder__() is obsoleted.
96
- objects that require decode data will extend appropriate
97
- decode modules according to the byte order.
98
- (Exif::Scanner#scan_IFD): ditto.
99
- (Exif::Scanner#scan): check condition for valid EXIF
100
- identifier is relaxed because some model does not provide
101
- the correct one.
102
-
103
- * lib/exifparser/tag.rb (Exif::Tag::Format): now returns
104
- a pair of sizeof(format) and formatter module.
105
- (Exif::Tag::Formatter): modules provide 'format' method that
106
- returns its name as string.
107
- (Exif::Tag::Base#initialize): does not require byteorder
108
- argument. needs count information instead.
109
- (Exif::Tag::Base#inspect): now shows format information.
110
- (Exif::Tag::Base#__byteOrder__): obsoleted. decode modules
111
- will be extended instead(see above).
112
- (Exif::Tag::XXX): Tag classes now do not include format
113
- modules in advance. these modules will extended according to
114
- the value of 'format' field of the data.
115
-
116
- * lib/exifparser/makernote/fujifilm.rb,
117
- lib/exifparser/makernote/nikon.rb,
118
- lib/exifparser/makernote/canon.rb,
119
- lib/exifparser/makernote/olympus.rb: applies the same changes
120
- as described above.
121
-
122
- Wed Nov 13 18:59:08 2002 Ryuichi Tamura <r-tam@fsinet.or.jp>
123
-
124
- * lib/exifparser/tag.rb (Exif::Tag::ExifVersion#to_s): fixed typo.
125
-
126
- Tue Nov 12 16:34:00 2002 Ryuichi Tamura <r-tam@fsinet.or.jp>
127
-
128
- * lib/exifparser/scan.rb (Exif::Scanner#scan): some maker does not
129
- provide any identifier. So pass Exif::Tag::Make object to
130
- MakerNote.prove(), and use Exif::Tag::Make.value to prove the maker.
131
- (Exif::Scanner#get_app1_datasize): wrong shift length.
132
-
133
- * lib/exifparser/makernote/prove.rb: ditto.
134
-
135
- * lib/exifparser/makernote/prove.rb: added Canon makernote parsing
136
- class.
137
-
138
- 2002-11-11 15:52 tam
139
-
140
- * lib/exifparser/methods.rb: removed
141
-
142
- 2002-11-11 15:49 tam
143
-
144
- * lib/exifparser/tag.rb: Exif::Tag::ExifImageWidth,
145
- Exif::Tag::ExifImageLength - added processData() to workaround.
146
- Exif::Tag::Base#to_name: should not use Module#nesting. revert to
147
- original behaviour.
148
-
149
- 2002-11-11 14:48 tam
150
-
151
- * lib/exifparser/: tag.rb, thumbnail.rb: tag.rb
152
- (Exif::Tag::ExifImageLength, Exif::Tag::ExifImageHeight): should
153
- include Formatter::UShort.
154
-
155
- 2002-11-11 12:21 tam
156
-
157
- * lib/: exifparser.rb, exifparser/methods.rb, exifparser/tag.rb:
158
- exifparser/tag.rb (Exif::Tag::Base#name): use
159
- Module#module_nesting.
160
-
161
- 2002-11-10 22:28 tam
162
-
163
- * lib/: exifparser.rb, exifparser/scan.rb, exifparser/tag.rb,
164
- exifparser/makernote/olympus.rb: exifparser/tag.rb,
165
- exifparser/scan.rb: apply patches by noguchi
166
- shingo(noguchi@daifukuya.com) to fix bugs, inadequate tag
167
- representation (tag#to_s). exifparser/makernote/olympus.rb: tag
168
- 'CameraID' should be packed "C*" when to_s'ed.
169
-