public
Rubygem
Description: irccat is like `cat`, but here, the STDOUT is an IRC channel.
Homepage: http://irccat.rubyforge.org/
Clone URL: git://github.com/webs/irccat.git
Search Repo:
Click here to lend your support to: irccat and make a donation at www.pledgie.com !
Ready to be a gem:)
webs (author)
Sat Feb 16 20:02:48 -0800 2008
commit  02e74d8a5f0f7ebb1769a8050e340fc09b5c031a
tree    209be3f2a4ced10af64f5b112e91c5b9ff4c71e2
parent  36ea4ff49b41e582b383313019314be52df7da47
...
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
0
@@ -1 +1,12 @@
0
+== 0.2 2008-02-17
0
+
0
+* 3 major improvement
0
+ * Github support in the http server
0
+ * Now released as a gem (thanks dr nic and newgem :-))
0
+ * Binary for launching irccats
0
+
0
+== 0.1 2008-01-01
0
+
0
+* 1 major improvement
0
+ * Initial release
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
0
@@ -1 +1,21 @@
0
+Copyright (c) 2008 Jordan Bracco
0
+
0
+Permission is hereby granted, free of charge, to any person obtaining
0
+a copy of this software and associated documentation files (the
0
+"Software"), to deal in the Software without restriction, including
0
+without limitation the rights to use, copy, modify, merge, publish,
0
+distribute, sublicense, and/or sell copies of the Software, and to
0
+permit persons to whom the Software is furnished to do so, subject to
0
+the following conditions:
0
+
0
+The above copyright notice and this permission notice shall be
0
+included in all copies or substantial portions of the Software.
0
+
0
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
0
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
0
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
0
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
0
@@ -1 +1,28 @@
0
+History.txt
0
+License.txt
0
+Manifest.txt
0
+README.txt
0
+Rakefile
0
+bin/irccat
0
+config.yml
0
+config/hoe.rb
0
+config/requirements.rb
0
+dongs.yml
0
+lib/irc_cat.rb
0
+lib/irc_cat/bot.rb
0
+lib/irc_cat/http_server.rb
0
+lib/irc_cat/http_server/github.rb
0
+lib/irc_cat/http_server/send.rb
0
+lib/irc_cat/indifferent_access.rb
0
+lib/irc_cat/tcp_server.rb
0
+lib/irc_cat/version.rb
0
+log/debug.log
0
+script/destroy
0
+script/generate
0
+setup.rb
0
+tasks/deployment.rake
0
+tasks/environment.rake
0
+tasks/website.rake
0
+test/test_helper.rb
0
+test/test_irc_cat.rb
...
 
 
 
 
...
1
2
3
4
0
@@ -1 +1,5 @@
0
+require 'config/requirements'
0
+require 'config/hoe' # setup Hoe + all gem configuration
0
+
0
+Dir['tasks/**/*.rake'].each { |rake| load rake }
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
0
@@ -1 +1,67 @@
0
+#!/usr/bin/env ruby
0
+#
0
+# Created on 2008-2-17.
0
+# Copyright (c) 2008. All rights reserved.
0
+
0
+begin
0
+ require 'rubygems'
0
+rescue LoadError
0
+end
0
+
0
+require 'optparse'
0
+require 'yaml'
0
+
0
+OPTIONS = {
0
+ :path => './config.yml'
0
+}
0
+MANDATORY_OPTIONS = %w( )
0
+
0
+parser = OptionParser.new do |opts|
0
+ opts.banner = <<BANNER
0
+irc_cat - stdout for irc
0
+
0
+Usage: #{File.basename($0)} [options]
0
+
0
+Options are:
0
+BANNER
0
+ opts.separator ""
0
+ opts.on("-c", "--config=CONFIG", String,
0
+ "Path to the config file.",
0
+ "Default: ./config.yml") { |OPTIONS[:configfile]| }
0
+ opts.on("-h", "--help",
0
+ "Show this help message.") { puts opts; exit }
0
+ opts.parse!(ARGV)
0
+
0
+ if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| OPTIONS[option.to_sym].nil? }
0
+ puts opts; exit
0
+ end
0
+end
0
+
0
+unless OPTIONS[:configfile].nil?
0
+ configfile = OPTIONS[:configfile]
0
+else
0
+ configfile = './config.yml'
0
+end
0
+
0
+exit unless File.exists?(configfile)
0
+@config = YAML.load_file(configfile)
0
+begin
0
+ require 'irc_cat'
0
+rescue LoadError
0
+ require 'lib/irc_cat'
0
+end
0
+
0
+threads = []
0
+puts "irccat #{IrcCat::VERSION::STRING} (http://irccat.rubyforge.org/)"
0
+
0
+Thread.new {
0
+ @bot = IrcCat::Bot.new(:host => @config['irc']['host'], :port => @config['irc']['port'], :nick => @config['irc']['nick'], :channel => @config['irc']['channel'])
0
+}
0
+Thread.new {
0
+ @tcp = IrcCat::TcpServer.new(@bot, @config, @config['tcp']['host'], @config['tcp']['port'])
0
+} if @config['tcp']['enabled'] == true
0
+Thread.new {
0
+ @http = IrcCat::HttpServer.new(@bot, @config, @config['http']['host'], @config['http']['port'])
0
+} if @config['http']['enabled'] == true
0
+@bot.run
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
0
@@ -1 +1,71 @@
0
+require 'irc_cat/version'
0
+
0
+AUTHOR = 'Jordan Bracco' # can also be an array of Authors
0
+EMAIL = "jordan@bracco.name"
0
+DESCRIPTION = "irccat is like `cat`, but here, the STDOUT is an IRC channel."
0
+GEM_NAME = 'irc_cat' # what ppl will type to install your gem
0
+RUBYFORGE_PROJECT = 'irccat' # The unix name for your project
0
+HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
0
+DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
0
+
0
+@config_file = "~/.rubyforge/user-config.yml"
0
+@config = nil
0
+RUBYFORGE_USERNAME = "unknown"
0
+def rubyforge_username
0
+ unless @config
0
+ begin
0
+ @config = YAML.load(File.read(File.expand_path(@config_file)))
0
+ rescue
0
+ puts <<-EOS
0
+ERROR: No rubyforge config file found: #{@config_file}
0
+Run 'rubyforge setup' to prepare your env for access to Rubyforge
0
+ - See http://newgem.rubyforge.org/rubyforge.html for more details
0
+ EOS
0
+ exit
0
+ end
0
+ end
0
+ RUBYFORGE_USERNAME.replace @config["username"]
0
+end
0
+
0
+
0
+REV = nil
0
+# UNCOMMENT IF REQUIRED:
0
+# REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
0
+VERS = IrcCat::VERSION::STRING + (REV ? ".#{REV}" : "")
0
+RDOC_OPTS = ['--quiet', '--title', 'irc_cat documentation',
0
+ "--opname", "index.html",
0
+ "--line-numbers",
0
+ "--main", "README",
0
+ "--inline-source"]
0
+
0
+class Hoe
0
+ def extra_deps
0
+ @extra_deps.reject! { |x| Array(x).first == 'hoe' }
0
+ @extra_deps
0
+ end
0
+end
0
+
0
+# Generate all the Rake tasks
0
+# Run 'rake -T' to see list of generated tasks (from gem root directory)
0
+hoe = Hoe.new(GEM_NAME, VERS) do |p|
0
+ p.developer(AUTHOR, EMAIL)
0
+ p.description = DESCRIPTION
0
+ p.summary = DESCRIPTION
0
+ p.url = HOMEPATH
0
+ p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
0
+ p.test_globs = ["test/**/test_*.rb"]
0
+ p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
0
+
0
+ # == Optional
0
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
0
+ p.extra_deps = [ ['mongrel', '>= 1.1.3'] ] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
0
+
0
+ #p.spec_extras = {} # A hash of extra values to set in the gemspec.
0
+
0
+end
0
+
0
+CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
0
+PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
0
+hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
0
+hoe.rsync_args = '-av --delete --ignore-errors'
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
0
@@ -1 +1,18 @@
0
+require 'fileutils'
0
+include FileUtils
0
+
0
+require 'rubygems'
0
+%w[rake hoe newgem rubigen].each do |req_gem|
0
+ begin
0
+ require req_gem
0
+ rescue LoadError
0
+ puts "This Rakefile requires the '#{req_gem}' RubyGem."
0
+ puts "Installation: gem install #{req_gem} -y"
0
+ exit
0
+ end
0
+end
0
+
0
+$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
0
+
0
+require 'irc_cat'
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
0
@@ -1 +1,25 @@
0
+# IRC connection
0
+irc:
0
+ host: 'irc.tty2.org'
0
+ port: '6667'
0
+ nick: irc_cat
0
+ channel: '#irc_cat2'
0
+
0
+# HTTP Server
0
+
0
+http:
0
+ enabled: true
0
+ host: 0.0.0.0
0
+ port: '3489'
0
+ # Enable post-receive stuff from Github
0
+ github: true
0
+ # Allow send with http
0
+ send: true
0
+
0
+# TCP Server
0
+
0
+tcp:
0
+ enabled: true
0
+ host: 0.0.0.0
0
+ port: '5678'
...
1
2
3
4
5
...
 
 
 
 
 
0
@@ -1,6 +1 @@
0
-require 'yaml'
0
-
0
-@config = YAML.load_file( 'config.yml' )
0
-
0
-require 'lib/irc_cat'
...
 
 
 
 
1
2
 
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
 
 
 
...
1
2
3
4
5
 
6
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
9
10
11
0
@@ -1,26 +1,12 @@
0
+$:.unshift File.dirname(__FILE__)
0
+@config = {"tcp"=>{"port"=>"5678", "enabled"=>true, "host"=>"0.0.0.0"},
0
+ "irc"=>{"nick"=>"irc_cat", "port"=>"6667", "channel"=>"#irc_cat", "host"=>"irc.example.com"},
0
+ "http"=>{"github"=>true, "port"=>"3489", "enabled"=>true, "send"=>true, "host"=>"0.0.0.0"}} if @config.nil?
0
 require 'rubygems'
0
-require 'lib/irc_cat/indifferent_access'
0
+require 'irc_cat/indifferent_access'
0
 require 'socket'
0
-require 'lib/irc_cat/bot'
0
-require 'lib/irc_cat/tcp_server'
0
-require 'lib/irc_cat/http_server'
0
-
0
-threads = []
0
-
0
-puts "irccat 0.2 (http://irccat.rubyforge.org/)"
0
-
0
-Thread.new {
0
-@bot = IrcCat::Bot.new(:host => @config['irc']['host'], :port => @config['irc']['port'],
0
- :nick => @config['irc']['nick'], :channel => @config['irc']['channel'])
0
-}
0
-
0
-Thread.new {
0
- @tcp = IrcCat::TcpServer.new(@bot, @config, @config['tcp']['host'], @config['tcp']['port'])
0
-} if @config['tcp']['enabled'] == true
0
-Thread.new {
0
- @http = IrcCat::HttpServer.new(@bot, @config, @config['http']['host'], @config['http']['port'])
0
-} if @config['http']['enabled'] == true
0
-
0
-
0
-@bot.run
0
+require 'irc_cat/version'
0
+require 'irc_cat/bot'
0
+require 'irc_cat/tcp_server'
0
+require 'irc_cat/http_server'
...
10
11
12
13
 
14
15
16
...
10
11
12
 
13
14
15
16
0
@@ -10,7 +10,7 @@
0
   
0
   # Initialize the bot with default values
0
   def initialize(constructor = H.new)
0
- @realname = 'irccat - http://irccat.rubyforge.org/'
0
+ @realname = "irc_cat #{IrcCat::VERSION::STRING} - http://irccat.rubyforge.org/"
0
     @refresh_rate = 10
0
     
0
     constructor.each do |key, val|
...
1
2
3
4
5
 
 
6
7
8
...
1
2
3
 
 
4
5
6
7
8
0
@@ -1,8 +1,8 @@
0
 # The HTTP Server
0
 
0
 require 'mongrel'
0
-require 'lib/irc_cat/http_server/send' if @config['http']['send'] == true
0
-require 'lib/irc_cat/http_server/github' if @config['http']['github'] == true
0
+require 'irc_cat/http_server/send' if @config['http']['send'] == true
0
+require 'irc_cat/http_server/github' if @config['http']['github'] == true
0
 
0
 class Index < Mongrel::HttpHandler
0
   def process(request, response)
...
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
0
@@ -1 +1,10 @@
0
+module IrcCat #:nodoc:
0
+ module VERSION #:nodoc:
0
+ MAJOR = 0
0
+ MINOR = 2
0
+ TINY = 0
0
+
0
+ STRING = [MAJOR, MINOR, TINY].join('.')
0
+ end
0
+end
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0
@@ -1 +1,15 @@
0
+#!/usr/bin/env ruby
0
+APP_ROOT = File.join(File.dirname(__FILE__), '..')
0
+
0
+begin
0
+ require 'rubigen'
0
+rescue LoadError
0
+ require 'rubygems'
0
+ require 'rubigen'
0
+end
0
+require 'rubigen/scripts/destroy'
0
+
0
+ARGV.shift if ['--help', '-h'].include?(ARGV[0])
0
+RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
0
+RubiGen::Scripts::Destroy.new.run(ARGV)
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0
@@ -1 +1,15 @@
0
+#!/usr/bin/env ruby
0
+APP_ROOT = File.join(File.dirname(__FILE__), '..')
0
+
0
+begin
0
+ require 'rubigen'
0
+rescue LoadError
0
+ require 'rubygems'
0
+ require 'rubigen'
0
+end
0
+require 'rubigen/scripts/generate'
0
+
0
+ARGV.shift if ['--help', '-h'].include?(ARGV[0])
0
+RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
0
+RubiGen::Scripts::Generate.new.run(ARGV)
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740