root/lang/ruby/ssb/scripts/download_ktai_list.rb @ 2135

Revision 2135, 472 bytes (checked in by coji, 5 years ago)

lang/ruby/ssb: http://ke-tai.org/ の端末リリストを利用したケータイ選択機能、途中だけどうp

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Date Author Rev URL
Line 
1# download_ktai_list.rb - download ke-tai list from http://ke-tai.org/
2#
3# Author:: MIZOGUCHI Coji <mizoguchi.coji at gmail.com>
4# License:: Distribute under the same terms as Ruby
5#
6# $Id$
7#
8require 'config/common.rb'
9require 'open-uri'
10
11uri = 'http://ke-tai.org/moblist/csv_down.php'
12
13print "updating ke-tai list from ke-tai.org..."
14STDOUT.flush
15
16open(File.join(SSB::CONFIG[:config_dir], 'ke-tai_list.csv'), 'w') do |out|
17  out.print open(uri).read()
18end
19
20puts 'done.'
21
Note: See TracBrowser for help on using the browser.