|
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 | # |
|---|
| 8 | require 'config/common.rb' |
|---|
| 9 | require 'open-uri' |
|---|
| 10 | |
|---|
| 11 | uri = 'http://ke-tai.org/moblist/csv_down.php' |
|---|
| 12 | |
|---|
| 13 | print "updating ke-tai list from ke-tai.org..." |
|---|
| 14 | STDOUT.flush |
|---|
| 15 | |
|---|
| 16 | open(File.join(SSB::CONFIG[:config_dir], 'ke-tai_list.csv'), 'w') do |out| |
|---|
| 17 | out.print open(uri).read() |
|---|
| 18 | end |
|---|
| 19 | |
|---|
| 20 | puts 'done.' |
|---|
| 21 | |
|---|