bin/sekka-server in sekka-0.9.5 vs bin/sekka-server in sekka-0.9.6
- old
+ new
@@ -9,18 +9,20 @@
require File.expand_path(File.dirname(__FILE__) + "/../lib/sekka/sekkaversion")
DICTDIR = File.expand_path( "~/.sekka-server" )
-DICTURL = "http://sumibi.org/sekka/dict/" + SekkaVersion.version
+DICTURL = "https://raw.github.com/kiyoka/sekka/master/public_dict/" + SekkaVersion.dictVersion
+
PIDFILE = DICTDIR + "/pid"
TC_FILE = DICTDIR + "/SEKKA-JISYO.SMALL.tch"
TSVFILE = DICTDIR + "/SEKKA-JISYO.SMALL.tsv"
SUMFILE = DICTDIR + "/SEKKA-JISYO.SMALL.md5"
-TSVURL = DICTURL + "/SEKKA-JISYO.SMALL.tsv"
+
+URLURL = DICTURL + "/SEKKA-JISYO.SMALL.url"
SUMURL = DICTURL + "/SEKKA-JISYO.SMALL.md5"
TC_FILE_LIST = [ DICTDIR + "/SEKKA-JISYO.CUSTOM.tch",
DICTDIR + "/SEKKA-JISYO.LARGE.tch",
DICTDIR + "/SEKKA-JISYO.SMALL.tch" ]
@@ -69,10 +71,16 @@
end
if not File.exist?( TSVFILE )
STDERR.printf( "Info: Downloading SEKKA-JISYO\n" )
# 辞書をダウンロードする
- cmd = sprintf( "curl -o %s %s", TSVFILE, TSVURL )
+ cmd = sprintf( "curl %s", URLURL )
+ STDERR.printf( "Command : %s\n", cmd )
+ tsvurl = open( "|" + cmd ) { |f|
+ f.read
+ }
+ STDERR.printf( " download URL of tsv file : %s\n", tsvurl );
+ cmd = sprintf( "curl -o %s %s", TSVFILE, tsvurl )
STDERR.printf( "Command : %s\n", cmd )
system( cmd )
cmd = sprintf( "curl -o %s %s", SUMFILE, SUMURL )
STDERR.printf( "Command : %s\n", cmd )
system( cmd )