tdiary-contrib 4.0.4 → 4.0.5.1
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 +4 -4
- data/.travis.yml +6 -0
- data/Gemfile +2 -8
- data/Gemfile.lock +17 -21
- data/README.en.md +1 -1
- data/filter/commentsize.rb +1 -1
- data/filter/iplookup.rb +55 -55
- data/filter/plugin/commentsize.rb +1 -1
- data/filter/plugin/en/spambayes.rb +1 -1
- data/filter/plugin/iplookup.rb +39 -39
- data/filter/plugin/ja/antirefspam.rb +1 -1
- data/filter/plugin/ja/spambayes.rb +1 -1
- data/filter/plugin/spambayes.rb +1 -1
- data/filter/spambayes.rb +1 -1
- data/js/flickr.js +1 -1
- data/lib/bayes.rb +1 -1
- data/lib/bayes/convert.rb +1 -1
- data/lib/tdiary/contrib/version.rb +1 -1
- data/lib/wgs2tky.rb +93 -93
- data/plugin/appstore.rb +6 -6
- data/plugin/bigpresen.rb +3 -3
- data/plugin/bitly.rb +1 -1
- data/plugin/brow_si.rb +1 -1
- data/plugin/category_similar.rb +1 -1
- data/plugin/category_to_tagcloud.rb +2 -2
- data/plugin/coderay.rb +1 -1
- data/plugin/datepicker.rb +1 -1
- data/plugin/flickr.rb +2 -2
- data/plugin/git-register.rb +7 -7
- data/plugin/goo_gl.rb +7 -7
- data/plugin/google_map.rb +6 -6
- data/plugin/google_webmaster.rb +4 -4
- data/plugin/hb_footer.rb +5 -5
- data/plugin/hb_footer4sec.rb +5 -5
- data/plugin/hide_sidebar_iphone.rb +1 -1
- data/plugin/iddy.rb +1 -1
- data/plugin/image_ex.rb +17 -17
- data/plugin/image_gps.rb +3 -3
- data/plugin/inline_wiki.rb +6 -6
- data/plugin/instagr.rb +8 -8
- data/plugin/instagram.rb +1 -1
- data/plugin/ja/yo_update.rb +51 -0
- data/plugin/jquery_ui_theme.rb +8 -8
- data/plugin/jroku.rb +1 -1
- data/plugin/jyear.rb +2 -2
- data/plugin/makerss_category.rb +4 -4
- data/plugin/makerss_comment.rb +4 -4
- data/plugin/microsummary.rb +2 -2
- data/plugin/nhk_program_info.rb +2 -2
- data/plugin/picasa.rb +2 -2
- data/plugin/playstore.rb +3 -3
- data/plugin/rating.rb +10 -10
- data/plugin/recent_estraier.rb +7 -7
- data/plugin/search-bing.rb +1 -1
- data/plugin/search-google-custom.rb +1 -1
- data/plugin/search-yahoo-websearch.rb +8 -8
- data/plugin/search-yahoo.rb +1 -1
- data/plugin/section_footer2.rb +1 -1
- data/plugin/show_and_hide.rb +20 -20
- data/plugin/socialbutton.rb +2 -2
- data/plugin/tdiarytimes.rb +16 -16
- data/plugin/tdiarytimes2.rb +10 -10
- data/plugin/tdiarytimes_textstyle.rb +3 -3
- data/plugin/twitter_anywhere.rb +51 -51
- data/plugin/twitter_summary_card.rb +1 -1
- data/plugin/vote.rb +4 -4
- data/plugin/yahoo_kousei.rb +2 -2
- data/plugin/yo_update.rb +214 -0
- data/plugin/zenback.rb +2 -2
- data/spec/apple_webclip_spec.rb +6 -6
- data/util/estraier-search/estraier-register.rb +2 -2
- data/util/image-gallery/image-gallery.rb +8 -8
- data/util/image-gallery/misc/plugin/recent_image.rb +4 -4
- data/util/posttdiary/posttdiary-ex.rb +7 -7
- data/util/rast-search/rast-register.rb +1 -1
- metadata +4 -2
data/plugin/image_gps.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# image_gps.rb $Revision: 1.1 $
|
3
|
-
#
|
3
|
+
#
|
4
4
|
# 概要:
|
5
|
-
#
|
5
|
+
#
|
6
6
|
#
|
7
7
|
# 使い方:
|
8
8
|
# 絵日記Plugin(image.rb)とおなじ
|
@@ -52,7 +52,7 @@ def image( id, alt = 'image', thumbnail = nil, size = nil, place = 'photo' )
|
|
52
52
|
else
|
53
53
|
size = ""
|
54
54
|
end
|
55
|
-
|
55
|
+
|
56
56
|
show_exif_info = @conf['image_gps.show_exif_info']
|
57
57
|
show_exif_info = '' if show_exif_info.nil?
|
58
58
|
google_maps_api_key = @conf['image_gps.google_maps_api_key']
|
data/plugin/inline_wiki.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Copyright (C) 2009 Hideki Sakamoto <hs@on-sky.net>
|
2
|
-
require 'hikidoc'
|
3
|
-
|
4
|
-
def inline_wiki(buf)
|
5
|
-
HikiDoc::to_html(buf)
|
6
|
-
end
|
1
|
+
# Copyright (C) 2009 Hideki Sakamoto <hs@on-sky.net>
|
2
|
+
require 'hikidoc'
|
3
|
+
|
4
|
+
def inline_wiki(buf)
|
5
|
+
HikiDoc::to_html(buf)
|
6
|
+
end
|
data/plugin/instagr.rb
CHANGED
@@ -4,11 +4,11 @@
|
|
4
4
|
#
|
5
5
|
# Copyright (C) 2011, tamoot <tamoot+tdiary@gmail.com>
|
6
6
|
# You can redistribute it and/or modify it under GPL2.
|
7
|
-
#
|
8
|
-
# usage:
|
7
|
+
#
|
8
|
+
# usage:
|
9
9
|
# <%= instagr 'short URL instag.ram' =>
|
10
10
|
# <%= instagr 'short URL instag.ram', size} =>
|
11
|
-
#
|
11
|
+
#
|
12
12
|
# available size option:
|
13
13
|
# :small => 150x150 pixel
|
14
14
|
# :medium => 306x306 pixel (default)
|
@@ -21,26 +21,26 @@ require 'net/http'
|
|
21
21
|
def instagr( short_url, size = :medium)
|
22
22
|
return %Q|<p>Argument is empty.. #{short_url}</p>| if !short_url or short_url.empty?
|
23
23
|
option = option.nil? ? {} : option
|
24
|
-
|
24
|
+
|
25
25
|
# img size
|
26
26
|
size = size.to_sym if size != :medium
|
27
27
|
maxwidth_data = {:small => 150, :medium => 306, :large => 612}
|
28
28
|
maxwidth = maxwidth_data[ size ] ? maxwidth_data[ size ] : maxwidth_data[:medium]
|
29
|
-
|
29
|
+
|
30
30
|
# proxy
|
31
31
|
px_host, px_port = (@conf['proxy'] || '').split( /:/ )
|
32
32
|
px_port = 80 if px_host and !px_port
|
33
|
-
|
33
|
+
|
34
34
|
# query
|
35
35
|
query = "?url=#{CGI::escape(short_url)}&maxwidth=#{maxwidth}"
|
36
|
-
|
36
|
+
|
37
37
|
begin
|
38
38
|
Net::HTTP.version_1_2
|
39
39
|
res = Net::HTTP::Proxy(px_host, px_port).get('instagram.com', "/api/v1/oembed/#{query}")
|
40
40
|
json_data = JSON::parse( res, &:read )
|
41
41
|
width = option[:width] ? option[:width] : json_data["width"]
|
42
42
|
height = option[:height] ? option[:height] : json_data["height"]
|
43
|
-
|
43
|
+
|
44
44
|
return <<-INSTAGR_DOM
|
45
45
|
<div class="instagr">
|
46
46
|
<a class="instagr" href="#{h short_url}" title="#{h @conf.to_native(json_data["title"])}">
|
data/plugin/instagram.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# yo_update.rb - Japanese resourc
|
4
|
+
#
|
5
|
+
# Copyright (C) 2014, zunda <zundan at gmail.com>
|
6
|
+
#
|
7
|
+
# Permission is granted for use, copying, modification,
|
8
|
+
# distribution, and distribution of modified versions of this
|
9
|
+
# work under the terms of GPL version 2 or later.
|
10
|
+
#
|
11
|
+
|
12
|
+
def yo_update_conf_label
|
13
|
+
'更新時にYoを送る'
|
14
|
+
end
|
15
|
+
|
16
|
+
def yo_update_test_result_label(username, result)
|
17
|
+
"- <tt>#{h username}</tt> に Yo を送りました: <tt>#{h result}</tt>"
|
18
|
+
end
|
19
|
+
|
20
|
+
def yo_update_conf_html(conf, n_subscribers, test_result)
|
21
|
+
action_label = {
|
22
|
+
'send_on_update' => '日記が追加された時',
|
23
|
+
'send_on_comment' => 'ツッコミされた時',
|
24
|
+
}
|
25
|
+
<<-HTML
|
26
|
+
<h3 class="subtitle">API key</h3>
|
27
|
+
<p><input name="yo_update.api_key" value="#{h conf['yo_update.api_key']}" size="40"></p>
|
28
|
+
<h3 class="subtitle">Username</h3>
|
29
|
+
<p><input name="yo_update.username" value="#{h conf['yo_update.username']}" size="40"></p>
|
30
|
+
<h3 class="subtitle">Yo を送るタイミング</h3>
|
31
|
+
<ul>
|
32
|
+
#{%w(send_on_update send_on_comment).map{|action|
|
33
|
+
checked = conf["yo_update.#{action}"] ? ' checked' : ''
|
34
|
+
%Q|<li><label for="yo_update.#{action}"><input id="yo_update.#{action}" name="yo_update.#{action}" value="t" type="checkbox"#{checked}>#{action_label[action]}</label>|
|
35
|
+
}.join("\n\t")}
|
36
|
+
</ul>
|
37
|
+
<p>Yo を<input name="yo_update.test" value="" size="10">に送ってみる#{test_result}</p>
|
38
|
+
<h3 class="subtitle">現在の受信者数</h3>
|
39
|
+
<p>#{h n_subscribers}</p>
|
40
|
+
<h3 class="subtitle">Yoボタン</h3>
|
41
|
+
<p>ページのどこかに下記を追加してください</p>
|
42
|
+
<pre><div id="yo-button"></div></pre>
|
43
|
+
<h3 class="subtitle">やり方</h3>
|
44
|
+
<ol>
|
45
|
+
<li>個人用 Yo アカウントで <a href="http://dev.justyo.co/">http://dev.justyo.co/</a> にログインする
|
46
|
+
<li>ページ内の指示に従って APIアカウントを作成する。
|
47
|
+
Callback URL は空白のままにしてください
|
48
|
+
<li>API key と API username を上にコピーする
|
49
|
+
</ol>
|
50
|
+
HTML
|
51
|
+
end
|
data/plugin/jquery_ui_theme.rb
CHANGED
@@ -8,24 +8,24 @@
|
|
8
8
|
|
9
9
|
#
|
10
10
|
# not support
|
11
|
-
#
|
11
|
+
#
|
12
12
|
return if feed? || @conf.mobile_agent?
|
13
13
|
|
14
14
|
add_header_proc do
|
15
15
|
if /\A(?:form|preview|append|edit|update)\z/ =~ @mode
|
16
|
-
|
16
|
+
|
17
17
|
themes = @conf['jquery_ui.theme']
|
18
18
|
if themes.nil? || theme == ''
|
19
19
|
themes = 'base'
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
jquery_ui = ''
|
23
23
|
jquery_ui << %Q|<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/#{themes.downcase}/jquery-ui.css"/>\n|
|
24
24
|
jquery_ui
|
25
|
-
|
25
|
+
|
26
26
|
else
|
27
27
|
''
|
28
|
-
|
28
|
+
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
@@ -33,16 +33,16 @@ end
|
|
33
33
|
add_conf_proc( 'jquery_ui_theme', 'jQuery UI Theme' ) do
|
34
34
|
if @mode == 'saveconf' then
|
35
35
|
@conf['jquery_ui.theme'] = @cgi.params['jquery_ui.theme'][0]
|
36
|
-
|
36
|
+
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
<<-HTML
|
40
40
|
<h3 class="subtitle">Theme name</h3>
|
41
41
|
<p><input name="jquery_ui.theme" value="#{h @conf['jquery_ui.theme']}" size="40"></p>
|
42
42
|
<p>sample) blitzer, flick .. <a href="http://jqueryui.com/themeroller/">See JQuery UI Theme.</a></p>
|
43
43
|
<p>default is <b>base</b>.</p>
|
44
44
|
HTML
|
45
|
-
|
45
|
+
|
46
46
|
end
|
47
47
|
|
48
48
|
|
data/plugin/jroku.rb
CHANGED
@@ -16,7 +16,7 @@ unless Time::new.respond_to?( :strftime_jroku_backup ) then
|
|
16
16
|
class Time
|
17
17
|
alias strftime_jroku_backup strftime
|
18
18
|
JROKU = %w(大安 赤口 先勝 友引 先負 仏滅)
|
19
|
-
|
19
|
+
|
20
20
|
def strftime( format )
|
21
21
|
d=Gregorian.new(self.month, self.day, self.year)
|
22
22
|
q_d = Calendar.kyureki_from_absolute(d.abs)
|
data/plugin/jyear.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# jyear.rb $Revision: 1.1 $
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# 西暦を和暦に変換するプラグイン。
|
4
4
|
# 日記やツッコミの日付フォーマットで使う。
|
5
5
|
# 「%Y」で「2005」のところを、「%K」で「平成17」と表示。
|
6
6
|
# pluginに入れるだけで動作する。
|
7
|
-
#
|
7
|
+
#
|
8
8
|
# Copyright (c) 2005 sasasin/SuzukiShinnosuke<sasasin@sasasin.sytes.net>
|
9
9
|
# You can distribute this file under the GPL.
|
10
10
|
#
|
data/plugin/makerss_category.rb
CHANGED
@@ -12,7 +12,7 @@ class MakeRssCategory < MakeRssFull
|
|
12
12
|
def title
|
13
13
|
'(category only)'
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
def item( seq, body, rdfsec )
|
17
17
|
return unless rdfsec.section.respond_to?( :body_to_html )
|
18
18
|
return if rdfsec.section.categories.length == 0
|
@@ -22,17 +22,17 @@ class MakeRssCategory < MakeRssFull
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def file
|
27
27
|
f = @conf['makerss.category.file'] || 'category.rdf'
|
28
28
|
f = 'category.rdf' if f.length == 0
|
29
29
|
f =~ %r|^/| ? f : "#{document_root}/#{f}"
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
def write( encoder )
|
33
33
|
super( encoder )
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
def url
|
37
37
|
u = @conf['makerss.category.url'] || "#{@conf.base_url}category.rdf"
|
38
38
|
u = "#{@conf.base_url}category.rdf" if u.length == 0
|
data/plugin/makerss_comment.rb
CHANGED
@@ -9,22 +9,22 @@ class MakeRssComments < MakeRssFull
|
|
9
9
|
def title
|
10
10
|
'(comments only)'
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def item( seq, body, rdfsec )
|
14
14
|
return if rdfsec.section.respond_to?( :body_to_html )
|
15
15
|
super
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
def file
|
19
19
|
f = @conf['makerss.no_comments.file'] || 'comments.rdf'
|
20
20
|
f = 'comments.rdf' if f.length == 0
|
21
21
|
f =~ %r|^/| ? f : "#{document_root}/#{f}"
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
def write( encoder )
|
25
25
|
super( encoder )
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
def url
|
29
29
|
u = @conf['makerss.no_comments.url'] || "#{@conf.base_url}comments.rdf"
|
30
30
|
u = "#{@conf.base_url}comments.rdf" if u.length == 0
|
data/plugin/microsummary.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
add_header_proc do
|
8
8
|
generator_xml = @conf['generator.xml']
|
9
|
-
|
9
|
+
|
10
10
|
if generator_xml != nil and @mode == 'latest' and !@cgi.valid?( 'date' )
|
11
11
|
%Q|\t<link rel="microsummary" href="#{generator_xml}" type="application/x.microsummary+xml">\n|
|
12
12
|
end
|
@@ -41,7 +41,7 @@ def create_xml file_name
|
|
41
41
|
</pages>
|
42
42
|
</generator>
|
43
43
|
XML
|
44
|
-
|
44
|
+
|
45
45
|
begin
|
46
46
|
File::open( file_name, 'w' ) do |f|
|
47
47
|
f.print to_utf8( xml )
|
data/plugin/nhk_program_info.rb
CHANGED
@@ -42,7 +42,7 @@ def nhk_program_info(id, service, area = nil)
|
|
42
42
|
</a>
|
43
43
|
</div>
|
44
44
|
PROGRAM_HTML
|
45
|
-
|
45
|
+
|
46
46
|
end
|
47
47
|
|
48
48
|
def call_nhk_json(id, service, area)
|
@@ -81,7 +81,7 @@ add_conf_proc( 'nhk', 'NHK API' ) do
|
|
81
81
|
@conf['nhk_api.id'] = @cgi.params['nhk_api.id'][0]
|
82
82
|
@conf['nhk_api.default.area'] = @cgi.params['nhk_api.default.area'][0]
|
83
83
|
end
|
84
|
-
|
84
|
+
|
85
85
|
<<-HTML
|
86
86
|
<h3 class="subtitle">API key</h3>
|
87
87
|
<p><input name="nhk_api.id" value="#{h @conf['nhk_api.id']}" size="70"></p>
|
data/plugin/picasa.rb
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
def picasa( src, alt = "photo", place = 'photo' )
|
22
22
|
src.sub!( %r|/s\d+/|, "/s200/" ) if @conf.iphone?
|
23
|
-
|
23
|
+
|
24
24
|
if @cgi.mobile_agent?
|
25
25
|
body = %Q|<a href="#{src}">#{alt}</a>|
|
26
26
|
else
|
@@ -45,7 +45,7 @@ if /\A(form|edit|preview|showcomment)\z/ === @mode then
|
|
45
45
|
end
|
46
46
|
|
47
47
|
add_edit_proc do |date|
|
48
|
-
unless @conf['picasa.user']
|
48
|
+
unless @conf['picasa.user']
|
49
49
|
'<p>[ERROR] picasa.rb: Picasa username is not specified.</p>'
|
50
50
|
else
|
51
51
|
<<-HTML
|
data/plugin/playstore.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
-
# playstore.rb
|
3
|
-
#
|
2
|
+
# playstore.rb
|
3
|
+
#
|
4
4
|
# 概要:
|
5
5
|
# GooglePlay(play.google.com)へのリンクを生成します。
|
6
6
|
#
|
@@ -67,7 +67,7 @@ def playstore_save_cache(app)
|
|
67
67
|
path="#{@cache_path}/playstore/#{app.app_id}"
|
68
68
|
dir = File.dirname(path)
|
69
69
|
Dir.mkdir(dir) unless File.directory?(dir)
|
70
|
-
|
70
|
+
|
71
71
|
app.save(path)
|
72
72
|
end
|
73
73
|
|
data/plugin/rating.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# ���Τޤ� plugin �ǥ��쥯�ȥ���֤��ޤ���
|
7
7
|
# '����' -> 'rating.rb Configuration' �ǡ�ɾ������
|
8
8
|
# ɽ�����Ƥ����ꡣ
|
9
|
-
# ���路����
|
9
|
+
# ���路����
|
10
10
|
# http://www.maripo.jp/diary/?date=20071019
|
11
11
|
#
|
12
12
|
# Copyright (c) 2007 Mariko/Maripo GODA <god@maripo.jp>
|
@@ -90,9 +90,9 @@ HTML
|
|
90
90
|
<tr>
|
91
91
|
<td>�ɲ�</td>
|
92
92
|
<td>
|
93
|
-
����̾��:<input type="text" size="16" name="label_new">
|
94
|
-
�����٥�:<input type="text" size="10" name="label_min_new">
|
95
|
-
�ǹ��٥�:<input type="text" size="10" name="label_max_new">
|
93
|
+
����̾��:<input type="text" size="16" name="label_new">
|
94
|
+
�����٥�:<input type="text" size="10" name="label_min_new">
|
95
|
+
�ǹ��٥�:<input type="text" size="10" name="label_max_new">
|
96
96
|
������:<input type="text" size="4" name="range_new">
|
97
97
|
</td>
|
98
98
|
</tr>
|
@@ -133,13 +133,13 @@ HTML
|
|
133
133
|
form_string += ('<form action="./"><input type="hidden" name="comment" value="submit"><input type="hidden" name="body" value="rating"><input type="hidden" name="body" value="rating"><input type="hidden" name="name" value=""><input type="hidden" value="' + date.strftime('%Y%m%d') + '"><div class="ratingForm">')
|
134
134
|
@rating_config.each{|axis_config|
|
135
135
|
|
136
|
-
if !axis_config.display
|
136
|
+
if !axis_config.display
|
137
137
|
next
|
138
138
|
end
|
139
139
|
|
140
140
|
# add axis info
|
141
141
|
form_string += ('<div class="ratingQuestion"><span class="ratingLabel">' + axis_config.label + '</span>')
|
142
|
-
|
142
|
+
|
143
143
|
# add radio buttons
|
144
144
|
form_string += ('<span class="ratingRadioButtons"><span class="ratingLabelMin">' + axis_config.label_min + '</span>')
|
145
145
|
|
@@ -253,7 +253,7 @@ class AxisConfig
|
|
253
253
|
@id
|
254
254
|
@order
|
255
255
|
@display = true
|
256
|
-
|
256
|
+
|
257
257
|
#accessors
|
258
258
|
attr_reader :label, :label_max, :label_min, :range, :id, :order, :display
|
259
259
|
|
@@ -287,11 +287,11 @@ class AxisConfig
|
|
287
287
|
def enable
|
288
288
|
@hidden = false
|
289
289
|
end #end disable
|
290
|
-
|
290
|
+
|
291
291
|
def check_label
|
292
292
|
return @display? "checked":""
|
293
293
|
end #end check_label
|
294
|
-
|
294
|
+
|
295
295
|
end
|
296
296
|
|
297
297
|
#########################################
|
@@ -357,7 +357,7 @@ class DateEval
|
|
357
357
|
|
358
358
|
def vote(id, rank)
|
359
359
|
unless @axes.key?(id)
|
360
|
-
@axes[id] = Array.new
|
360
|
+
@axes[id] = Array.new
|
361
361
|
end
|
362
362
|
if @axes[id][rank] != nil
|
363
363
|
@axes[id][rank] += 1
|
data/plugin/recent_estraier.rb
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
# estsearch.cgiが作成する検索キーワードログから
|
5
5
|
# 最新xx件分の検索語を表示します。
|
6
6
|
# パラメタ:
|
7
|
-
# file: 検索キーワードログファイル名(絶対パス表記)
|
8
|
-
# estraier: estseach.cgiのパス
|
9
|
-
# limit: 表示件数(未指定時:5)
|
10
|
-
# make_link: <a>を生成するか?(未指定時:生成する)
|
7
|
+
# file: 検索キーワードログファイル名(絶対パス表記)
|
8
|
+
# estraier: estseach.cgiのパス
|
9
|
+
# limit: 表示件数(未指定時:5)
|
10
|
+
# make_link: <a>を生成するか?(未指定時:生成する)
|
11
11
|
#
|
12
12
|
#
|
13
13
|
# Copyright (c) 2005 SHIBATA Hiroshi <h-sbt@nifty.com>
|
@@ -26,7 +26,7 @@ def recent_estraier(file, estraier, limit = 5, make_link = true)
|
|
26
26
|
log.each_line do |line|
|
27
27
|
lines << line
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
result = "<ol>"
|
31
31
|
lines.reverse.each_with_index do |line,idx|
|
32
32
|
break if idx >= limit
|
@@ -41,9 +41,9 @@ def recent_estraier(file, estraier, limit = 5, make_link = true)
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
result << %Q[</ol>]
|
46
|
-
|
46
|
+
|
47
47
|
rescue
|
48
48
|
%Q[<p class="message">#$! (#{$!.class})<br>cannot read #{file}.</p>]
|
49
49
|
end
|