kizapi 0.1.0
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.
- data/History.txt +4 -0
- data/License.txt +3 -0
- data/Manifest.txt +26 -0
- data/README.txt +17 -0
- data/Rakefile +4 -0
- data/config/hoe.rb +78 -0
- data/config/requirements.rb +17 -0
- data/lib/kizapi/version.rb +9 -0
- data/lib/kizapi.rb +151 -0
- data/log/debug.log +0 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/script/txt2html +74 -0
- data/setup.rb +1585 -0
- data/spec/kizapi_spec.rb +95 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +11 -0
- data/tasks/deployment.rake +34 -0
- data/tasks/environment.rake +7 -0
- data/tasks/rspec.rake +21 -0
- data/tasks/website.rake +17 -0
- data/website/index.html +187 -0
- data/website/index.txt +111 -0
- data/website/javascripts/rounded_corners_lite.inc.js +285 -0
- data/website/stylesheets/screen.css +138 -0
- data/website/template.rhtml +48 -0
- metadata +83 -0
data/spec/kizapi_spec.rb
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/spec_helper.rb'
|
2
|
+
|
3
|
+
describe KizAPI::RelatedWords do
|
4
|
+
before(:all) do
|
5
|
+
@words = KizAPI::RelatedWords.new("季節")
|
6
|
+
end
|
7
|
+
|
8
|
+
after(:all) do
|
9
|
+
@words = nil
|
10
|
+
end
|
11
|
+
|
12
|
+
it "can read date" do
|
13
|
+
@words.date.should be_a_kind_of(Time)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "#day" do
|
17
|
+
words = KizAPI::RelatedWords.day("季節")
|
18
|
+
words.should be_a_kind_of(Array)
|
19
|
+
words.size.should > 0
|
20
|
+
end
|
21
|
+
|
22
|
+
it "#week" do
|
23
|
+
words = KizAPI::RelatedWords.week("季節")
|
24
|
+
words.should be_a_kind_of(Array)
|
25
|
+
words.size.should > 0
|
26
|
+
end
|
27
|
+
|
28
|
+
it "#month" do
|
29
|
+
words = KizAPI::RelatedWords.month("季節")
|
30
|
+
words.should be_a_kind_of(Array)
|
31
|
+
words.size.should > 0
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe KizAPI::KeywordInContexts do
|
36
|
+
it "fetch sentences" do
|
37
|
+
contexts = KizAPI::KeywordInContexts.new("季節")
|
38
|
+
contexts.should be_a_kind_of(Array)
|
39
|
+
contexts.size.should > 0
|
40
|
+
contexts.each do |context|
|
41
|
+
context.should be_a_kind_of(KizAPI::KeywordInContexts::Context)
|
42
|
+
context.size.should > 0
|
43
|
+
context.each do |sentence|
|
44
|
+
sentence.should be_a_kind_of(String)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
it "KWIC is an alias" do
|
50
|
+
KizAPI::KeywordInContexts.equal?(KizAPI::KWIC)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe KizAPI::Ranking do
|
55
|
+
it "can fetch keywords" do
|
56
|
+
ranking = KizAPI::Ranking.new
|
57
|
+
ranking.should be_a_kind_of(Array)
|
58
|
+
ranking.size.should == 30
|
59
|
+
ranking.each do |keyword|
|
60
|
+
keyword.should be_a_kind_of(KizAPI::Ranking::Keyword)
|
61
|
+
keyword.link.should be_a_kind_of(URI)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe KizAPI::ChannelWords do
|
67
|
+
it "can fetch channel words" do
|
68
|
+
words = KizAPI::ChannelWords.new("季節")
|
69
|
+
words.date.should be_a_kind_of(Time)
|
70
|
+
words.should be_a_kind_of(Array)
|
71
|
+
words.size.should > 0
|
72
|
+
words.each do |word|
|
73
|
+
word.should be_a_kind_of(KizAPI::ChannelWords::Word)
|
74
|
+
word.should respond_to(:subject)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
it "#day" do
|
79
|
+
words = KizAPI::ChannelWords.day("季節")
|
80
|
+
words.should be_a_kind_of(Array)
|
81
|
+
words.size.should > 0
|
82
|
+
end
|
83
|
+
|
84
|
+
it "#week" do
|
85
|
+
words = KizAPI::ChannelWords.week("季節")
|
86
|
+
words.should be_a_kind_of(Array)
|
87
|
+
words.size.should > 0
|
88
|
+
end
|
89
|
+
|
90
|
+
it "#month" do
|
91
|
+
words = KizAPI::ChannelWords.month("季節")
|
92
|
+
words.should be_a_kind_of(Array)
|
93
|
+
words.size.should > 0
|
94
|
+
end
|
95
|
+
end
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
-fs --colour
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
desc 'Release the website and new gem version'
|
2
|
+
task :deploy => [:check_version, :website, :release] do
|
3
|
+
puts "Remember to create SVN tag:"
|
4
|
+
puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
|
5
|
+
"svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
|
6
|
+
puts "Suggested comment:"
|
7
|
+
puts "Tagging release #{CHANGES}"
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
|
11
|
+
task :local_deploy => [:website_generate, :install_gem]
|
12
|
+
|
13
|
+
task :check_version do
|
14
|
+
unless ENV['VERSION']
|
15
|
+
puts 'Must pass a VERSION=x.y.z release version'
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
unless ENV['VERSION'] == VERS
|
19
|
+
puts "Please update your version.rb to match the release version, currently #{VERS}"
|
20
|
+
exit
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
|
25
|
+
task :install_gem_no_doc => [:clean, :package] do
|
26
|
+
sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
|
27
|
+
end
|
28
|
+
|
29
|
+
namespace :manifest do
|
30
|
+
desc 'Recreate Manifest.txt to include ALL files'
|
31
|
+
task :refresh do
|
32
|
+
`rake check_manifest | patch -p0 > Manifest.txt`
|
33
|
+
end
|
34
|
+
end
|
data/tasks/rspec.rake
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
begin
|
2
|
+
require 'spec'
|
3
|
+
rescue LoadError
|
4
|
+
require 'rubygems'
|
5
|
+
require 'spec'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'spec/rake/spectask'
|
9
|
+
rescue LoadError
|
10
|
+
puts <<-EOS
|
11
|
+
To use rspec for testing you must install rspec gem:
|
12
|
+
gem install rspec
|
13
|
+
EOS
|
14
|
+
exit(0)
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Run the specs under spec/models"
|
18
|
+
Spec::Rake::SpecTask.new do |t|
|
19
|
+
t.spec_opts = ['--options', "spec/spec.opts"]
|
20
|
+
t.spec_files = FileList['spec/*_spec.rb']
|
21
|
+
end
|
data/tasks/website.rake
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
desc 'Generate website files'
|
2
|
+
task :website_generate => :ruby_env do
|
3
|
+
(Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
|
4
|
+
sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
desc 'Upload website files to rubyforge'
|
9
|
+
task :website_upload do
|
10
|
+
host = "#{rubyforge_username}@rubyforge.org"
|
11
|
+
remote_dir = "/var/www/gforge-projects/#{PATH}/"
|
12
|
+
local_dir = 'website'
|
13
|
+
sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Generate and upload website files'
|
17
|
+
task :website => [:website_generate, :website_upload, :publish_docs]
|
data/website/index.html
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
<title>
|
8
|
+
ruby-kizapi
|
9
|
+
</title>
|
10
|
+
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
+
<style>
|
12
|
+
|
13
|
+
</style>
|
14
|
+
<script type="text/javascript">
|
15
|
+
window.onload = function() {
|
16
|
+
settings = {
|
17
|
+
tl: { radius: 10 },
|
18
|
+
tr: { radius: 10 },
|
19
|
+
bl: { radius: 10 },
|
20
|
+
br: { radius: 10 },
|
21
|
+
antiAlias: true,
|
22
|
+
autoPad: true,
|
23
|
+
validTags: ["div"]
|
24
|
+
}
|
25
|
+
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
26
|
+
versionBox.applyCornersToAll();
|
27
|
+
}
|
28
|
+
</script>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="main">
|
32
|
+
|
33
|
+
<h1>ruby-kizapi</h1>
|
34
|
+
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/kizapi"; return false'>
|
35
|
+
<p>Get Version</p>
|
36
|
+
<a href="http://rubyforge.org/projects/kizapi" class="numbers">0.1.0</a>
|
37
|
+
</div>
|
38
|
+
<h2>What</h2>
|
39
|
+
|
40
|
+
|
41
|
+
<p>ruby-kizapi is a wrapper library for kizAPI provided by kizasi.jp.</p>
|
42
|
+
|
43
|
+
|
44
|
+
<h2>Installing</h2>
|
45
|
+
|
46
|
+
|
47
|
+
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">kizapi</span></pre></p>
|
48
|
+
|
49
|
+
|
50
|
+
<h2><span class="caps">API</span> document</h2>
|
51
|
+
|
52
|
+
|
53
|
+
<p><a href="http://kizapi.rubyforge.org/rdoc">http://kizapi.rubyforge.org/rdoc</a></p>
|
54
|
+
|
55
|
+
|
56
|
+
<h2>The basics</h2>
|
57
|
+
|
58
|
+
|
59
|
+
<h3>Related words</h3>
|
60
|
+
|
61
|
+
|
62
|
+
<p><pre class='syntax'>
|
63
|
+
<span class="ident">words</span> <span class="punct">=</span> <span class="constant">KizAPI</span><span class="punct">::</span><span class="constant">RelatedWords</span><span class="punct">.</span><span class="ident">new</span><span class="punct">("</span><span class="string">正月</span><span class="punct">")</span>
|
64
|
+
|
65
|
+
<span class="comment"># => ["休み", "仕事", "いい", "実家", "大晦日", "家", "大掃除", "予定", "雪",</span>
|
66
|
+
<span class="comment"># "良い", "行く", "飾り", "掃除", "準備", "正月用", "餅", "お正月",</span>
|
67
|
+
<span class="comment"># "買い物", "感じ", "2日", "年賀状", "元旦", "クリスマス", "ブログ", "最後",</span>
|
68
|
+
<span class="comment"># "迎える", "家族", "一年", "年末年始", "我が家", "明け", "帰省",</span>
|
69
|
+
<span class="comment"># "正月準備", "1日", "1年", "おせち", "来る", "お年", "終わり", "過ごす",</span>
|
70
|
+
<span class="comment"># "3日", "車", "更新", "買い", "買出し", "年越し", "無い", "スーパー",</span>
|
71
|
+
<span class="comment"># "正月用品", "正月気分", "お餅", "夜", "鏡餅", "お年玉", "正月前",</span>
|
72
|
+
<span class="comment"># "正月料理", "初詣", "2007年", "寒い", "年明け"]</span>
|
73
|
+
|
74
|
+
<span class="ident">words</span><span class="punct">.</span><span class="ident">date</span>
|
75
|
+
<span class="comment"># => Mon Dec 31 05:46:56 0900 2007</span>
|
76
|
+
</pre></p>
|
77
|
+
|
78
|
+
|
79
|
+
<h3>Keyword in context</h3>
|
80
|
+
|
81
|
+
|
82
|
+
<p><pre class='syntax'>
|
83
|
+
<span class="ident">contexts</span> <span class="punct">=</span> <span class="constant">KizAPI</span><span class="punct">::</span><span class="constant">KeywordInContexts</span><span class="punct">.</span><span class="ident">new</span><span class="punct">("</span><span class="string">正月</span><span class="punct">")</span>
|
84
|
+
|
85
|
+
<span class="ident">context</span> <span class="punct">=</span> <span class="ident">contexts</span><span class="punct">.</span><span class="ident">first</span>
|
86
|
+
<span class="comment"># => ["醤油で焼いて海苔巻いたやつ。", "あと数時間後には正月でいらんほど餅食べれるの</span>
|
87
|
+
<span class="comment"># に、どんだけフライングだよ。", "太りたくない。"]</span>
|
88
|
+
|
89
|
+
<span class="ident">context</span><span class="punct">.</span><span class="ident">title</span>
|
90
|
+
<span class="comment"># => "食欲"</span>
|
91
|
+
|
92
|
+
<span class="ident">context</span><span class="punct">.</span><span class="ident">link</span>
|
93
|
+
<span class="comment"># => #<URI::HTTP:0xfdbcd4032 URL:http://ameblo.jp/monakalife/entry-10063060988.html></span>
|
94
|
+
|
95
|
+
<span class="ident">contexts</span><span class="punct">.</span><span class="ident">date</span>
|
96
|
+
<span class="comment"># => Mon Dec 31 05:57:37 0900 2007</span>
|
97
|
+
</pre></p>
|
98
|
+
|
99
|
+
|
100
|
+
<h3>Ranking</h3>
|
101
|
+
|
102
|
+
|
103
|
+
<p><pre class='syntax'>
|
104
|
+
<span class="ident">ranking</span> <span class="punct">=</span> <span class="constant">KizAPI</span><span class="punct">::</span><span class="constant">Ranking</span><span class="punct">.</span><span class="ident">new</span>
|
105
|
+
<span class="comment"># => ["イカ天2007復活祭", "KEIRINグランプリ07", "ゴーオンジャー", "最優秀歌唱賞",</span>
|
106
|
+
<span class="comment"># "大晦日イブ", "大晦日イヴ", "代打屋", "生つるべ", "冬コミ2日",</span>
|
107
|
+
<span class="comment"># "お笑いダイナマイト", "お迎え下", "ココリコ遠藤", "コミケ73", "吉原炎上",</span>
|
108
|
+
<span class="comment"># "伸し餅", "フライングキッズ", "お節作り", "AVP2", "C73", "お正月準備",</span>
|
109
|
+
<span class="comment"># "鏡音リン・レン", "MVS", "大掃除終了", "餅搗き", "オールザッツ漫才",</span>
|
110
|
+
<span class="comment"># "元首相暗殺", "アイアムレジェンド", "ルビン", "天皇杯準決勝", "寒波襲来"]</span>
|
111
|
+
|
112
|
+
<span class="ident">ranking</span><span class="punct">.</span><span class="ident">date</span>
|
113
|
+
<span class="comment"># => Mon Dec 31 05:46:54 0900 2007</span>
|
114
|
+
</pre></p>
|
115
|
+
|
116
|
+
|
117
|
+
<h3>Channel words</h3>
|
118
|
+
|
119
|
+
|
120
|
+
<p><pre class='syntax'>
|
121
|
+
<span class="ident">words</span> <span class="punct">=</span> <span class="constant">KizAPI</span><span class="punct">::</span><span class="constant">ChannelWords</span><span class="punct">.</span><span class="ident">new</span><span class="punct">("</span><span class="string">正月</span><span class="punct">")</span>
|
122
|
+
<span class="comment"># => ["大根", "栗", "ねぎ", "滝沢秀明(タッキー&翼)", "サクラ", "ごぼう",</span>
|
123
|
+
<span class="comment"># "ギター", "北野天満宮(京都府)", "にんじん", "かぼちゃ", "朝青龍",</span>
|
124
|
+
<span class="comment"># "二宮和也(嵐)", "カレイ", "マンリョウ", "椎茸", "白菜", "れんこん",</span>
|
125
|
+
<span class="comment"># "梅", "沖縄の旅", "東京の旅"]</span>
|
126
|
+
|
127
|
+
<span class="ident">words</span><span class="punct">.</span><span class="ident">date</span>
|
128
|
+
<span class="comment"># => Mon Dec 31 06:04:07 0900 2007</span>
|
129
|
+
|
130
|
+
<span class="ident">words</span><span class="punct">.</span><span class="ident">first</span><span class="punct">.</span><span class="ident">subject</span>
|
131
|
+
<span class="comment"># => "野菜"</span>
|
132
|
+
</pre></p>
|
133
|
+
|
134
|
+
|
135
|
+
<h2>Forum</h2>
|
136
|
+
|
137
|
+
|
138
|
+
<p><a href="http://groups.google.com/group/ruby-kizapi">http://groups.google.com/group/kizapi</a></p>
|
139
|
+
|
140
|
+
|
141
|
+
<h2>How to submit patches</h2>
|
142
|
+
|
143
|
+
|
144
|
+
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
145
|
+
|
146
|
+
|
147
|
+
<p>The trunk repository is <code>svn://rubyforge.org/var/svn/kizapi/trunk</code> for anonymous access.</p>
|
148
|
+
|
149
|
+
|
150
|
+
<h2>License</h2>
|
151
|
+
|
152
|
+
|
153
|
+
<p>This code is free to use under the terms of the Ruby license.</p>
|
154
|
+
|
155
|
+
|
156
|
+
<h2>Links</h2>
|
157
|
+
|
158
|
+
|
159
|
+
<ul>
|
160
|
+
<li><a href="http://kizasi.jp/">kizasi.jp</a>
|
161
|
+
<ul>
|
162
|
+
<li><a href="http://kizasi.jp/tool/kizapi.html">kizAPI</a></li>
|
163
|
+
<li><a href="http://blog.kizasi.jp/kizasi/images/kizapi_TOS.pdf" title="PDF">kizAPI利用規約</a></li>
|
164
|
+
</ul>
|
165
|
+
</li>
|
166
|
+
<li>ruby-kizapi
|
167
|
+
<ul>
|
168
|
+
<li><a href="http://kizapi.rubyforge.org/">Website</a></li>
|
169
|
+
<li><a href="http://rubyforge.org/projects/kizapi/">Rubyforge Project</a></li>
|
170
|
+
</ul></li>
|
171
|
+
</ul>
|
172
|
+
|
173
|
+
|
174
|
+
<h2>Contact</h2>
|
175
|
+
|
176
|
+
|
177
|
+
<p>Comments are welcome. Send an email to <a href="mailto:keita.yamaguchi@gmail.com">Keita Yamaguchi</a> or the <a href="http://groups.google.com/group/ruby-kizapi">forum</a></p>
|
178
|
+
<p class="coda">
|
179
|
+
<a href="keita.yamaguchi@gmail.com">Keita Yamaguchi</a>, 31st December 2007<br>
|
180
|
+
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
181
|
+
</p>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
185
|
+
|
186
|
+
</body>
|
187
|
+
</html>
|
data/website/index.txt
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
h1. ruby-kizapi
|
2
|
+
|
3
|
+
h2. What
|
4
|
+
|
5
|
+
ruby-kizapi is a wrapper library for kizAPI provided by kizasi.jp.
|
6
|
+
|
7
|
+
h2. Installing
|
8
|
+
|
9
|
+
<pre syntax="ruby">sudo gem install kizapi</pre>
|
10
|
+
|
11
|
+
h2. API document
|
12
|
+
|
13
|
+
"http://kizapi.rubyforge.org/rdoc":http://kizapi.rubyforge.org/rdoc
|
14
|
+
|
15
|
+
h2. The basics
|
16
|
+
|
17
|
+
h3. Related words
|
18
|
+
|
19
|
+
<pre syntax="ruby">
|
20
|
+
words = KizAPI::RelatedWords.new("正月")
|
21
|
+
|
22
|
+
# => ["休み", "仕事", "いい", "実家", "大晦日", "家", "大掃除", "予定", "雪",
|
23
|
+
# "良い", "行く", "飾り", "掃除", "準備", "正月用", "餅", "お正月",
|
24
|
+
# "買い物", "感じ", "2日", "年賀状", "元旦", "クリスマス", "ブログ", "最後",
|
25
|
+
# "迎える", "家族", "一年", "年末年始", "我が家", "明け", "帰省",
|
26
|
+
# "正月準備", "1日", "1年", "おせち", "来る", "お年", "終わり", "過ごす",
|
27
|
+
# "3日", "車", "更新", "買い", "買出し", "年越し", "無い", "スーパー",
|
28
|
+
# "正月用品", "正月気分", "お餅", "夜", "鏡餅", "お年玉", "正月前",
|
29
|
+
# "正月料理", "初詣", "2007年", "寒い", "年明け"]
|
30
|
+
|
31
|
+
words.date
|
32
|
+
# => Mon Dec 31 05:46:56 0900 2007
|
33
|
+
</pre>
|
34
|
+
|
35
|
+
h3. Keyword in context
|
36
|
+
|
37
|
+
<pre syntax="ruby">
|
38
|
+
contexts = KizAPI::KeywordInContexts.new("正月")
|
39
|
+
|
40
|
+
context = contexts.first
|
41
|
+
# => ["醤油で焼いて海苔巻いたやつ。", "あと数時間後には正月でいらんほど餅食べれるの
|
42
|
+
# に、どんだけフライングだよ。", "太りたくない。"]
|
43
|
+
|
44
|
+
context.title
|
45
|
+
# => "食欲"
|
46
|
+
|
47
|
+
context.link
|
48
|
+
# => #<URI::HTTP:0xfdbcd4032 URL:http://ameblo.jp/monakalife/entry-10063060988.html>
|
49
|
+
|
50
|
+
contexts.date
|
51
|
+
# => Mon Dec 31 05:57:37 0900 2007
|
52
|
+
</pre>
|
53
|
+
|
54
|
+
h3. Ranking
|
55
|
+
|
56
|
+
<pre syntax="ruby">
|
57
|
+
ranking = KizAPI::Ranking.new
|
58
|
+
# => ["イカ天2007復活祭", "KEIRINグランプリ07", "ゴーオンジャー", "最優秀歌唱賞",
|
59
|
+
# "大晦日イブ", "大晦日イヴ", "代打屋", "生つるべ", "冬コミ2日",
|
60
|
+
# "お笑いダイナマイト", "お迎え下", "ココリコ遠藤", "コミケ73", "吉原炎上",
|
61
|
+
# "伸し餅", "フライングキッズ", "お節作り", "AVP2", "C73", "お正月準備",
|
62
|
+
# "鏡音リン・レン", "MVS", "大掃除終了", "餅搗き", "オールザッツ漫才",
|
63
|
+
# "元首相暗殺", "アイアムレジェンド", "ルビン", "天皇杯準決勝", "寒波襲来"]
|
64
|
+
|
65
|
+
ranking.date
|
66
|
+
# => Mon Dec 31 05:46:54 0900 2007
|
67
|
+
</pre>
|
68
|
+
|
69
|
+
h3. Channel words
|
70
|
+
|
71
|
+
<pre syntax="ruby">
|
72
|
+
words = KizAPI::ChannelWords.new("正月")
|
73
|
+
# => ["大根", "栗", "ねぎ", "滝沢秀明(タッキー&翼)", "サクラ", "ごぼう",
|
74
|
+
# "ギター", "北野天満宮(京都府)", "にんじん", "かぼちゃ", "朝青龍",
|
75
|
+
# "二宮和也(嵐)", "カレイ", "マンリョウ", "椎茸", "白菜", "れんこん",
|
76
|
+
# "梅", "沖縄の旅", "東京の旅"]
|
77
|
+
|
78
|
+
words.date
|
79
|
+
# => Mon Dec 31 06:04:07 0900 2007
|
80
|
+
|
81
|
+
words.first.subject
|
82
|
+
# => "野菜"
|
83
|
+
</pre>
|
84
|
+
|
85
|
+
h2. Forum
|
86
|
+
|
87
|
+
"http://groups.google.com/group/kizapi":http://groups.google.com/group/ruby-kizapi
|
88
|
+
|
89
|
+
h2. How to submit patches
|
90
|
+
|
91
|
+
Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
|
92
|
+
|
93
|
+
The trunk repository is <code>svn://rubyforge.org/var/svn/kizapi/trunk</code> for anonymous access.
|
94
|
+
|
95
|
+
h2. License
|
96
|
+
|
97
|
+
This code is free to use under the terms of the Ruby license.
|
98
|
+
|
99
|
+
h2. Links
|
100
|
+
|
101
|
+
* "kizasi.jp":http://kizasi.jp/
|
102
|
+
** "kizAPI":http://kizasi.jp/tool/kizapi.html
|
103
|
+
** "kizAPI利用規約(PDF)":http://blog.kizasi.jp/kizasi/images/kizapi_TOS.pdf
|
104
|
+
* ruby-kizapi
|
105
|
+
** "Website":http://kizapi.rubyforge.org/
|
106
|
+
** "Rubyforge Project":http://rubyforge.org/projects/kizapi/
|
107
|
+
|
108
|
+
h2. Contact
|
109
|
+
|
110
|
+
Comments are welcome. Send an email to "Keita Yamaguchi":mailto:keita.yamaguchi@gmail.com or the "forum":http://groups.google.com/group/ruby-kizapi
|
111
|
+
|