sekka 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -5,4 +5,4 @@
5
5
  ## Sekka(石火)はSKKライクな日本語入力メソッドです。
6
6
  <http://oldtype.sumibi.org/show-page/Sekka>
7
7
 
8
- ![Logo]( http://pix.am/u2Hv.png )
8
+ ![Logo]( http://dl.dropbox.com/u/3870066/blog/iStock_000016378483XSmall.jpg )
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 2
4
- :patch: 0
4
+ :patch: 1
data/emacs/sekka.el CHANGED
@@ -1620,7 +1620,7 @@ point から行頭方向に同種の文字列が続く間を漢字変換しま
1620
1620
  (setq default-input-method "japanese-sekka")
1621
1621
 
1622
1622
  (defconst sekka-version
1623
- "1.2.0" ;;SEKKA-VERSION
1623
+ "1.2.1" ;;SEKKA-VERSION
1624
1624
  )
1625
1625
  (defun sekka-version (&optional arg)
1626
1626
  "入力モード変更"
@@ -34,9 +34,10 @@
34
34
  ;;; $Id:
35
35
  ;;;
36
36
  (use srfi-1)
37
+ (use util.list)
37
38
  (use sekka.util)
38
39
  (use sekka.roman-lib)
39
- (require "progressbar")
40
+ (require "ruby-progressbar")
40
41
 
41
42
  (define (expand-hiragana-phrase-entry key)
42
43
  (let1 roman-list (gen-hiragana->roman-list key)
@@ -85,10 +86,13 @@
85
86
 
86
87
 
87
88
  (define (convert-skk-jisyo-f f)
88
- (let1 progress (ProgressBar.new "convert " (file-length f) STDERR)
89
-
89
+ (let1 progress (ProgressBar.create (alist->hash-table
90
+ `(
91
+ [title . "convert "]
92
+ [total . ,(file-length f)]
93
+ [output . ,STDERR])))
90
94
  (define (gen-sekka-entries line)
91
- (progress.inc)
95
+ (progress.increment)
92
96
 
93
97
  (let* ((line (line.sub #/\/$/ ""))
94
98
  (fields (split-dict-line line)))
@@ -34,7 +34,8 @@
34
34
  ;;; $Id:
35
35
  ;;;
36
36
  (use srfi-1)
37
- (require "progressbar")
37
+ (use util.list)
38
+ (require "ruby-progressbar")
38
39
  (require "sekka/kvs")
39
40
  (require "sekka/sekkaversion")
40
41
  (require "distributedtrie")
@@ -45,6 +46,7 @@
45
46
  (define okuri-ari-prefix "IK")
46
47
  (define okuri-nashi-prefix "Ik")
47
48
  (define hiragana-phrase-prefix "Ih")
49
+ (define progressbar-format "%E |%B| %p%% %t")
48
50
 
49
51
  ;; KVS type setting
50
52
  (define *kvs-type* 'tokyocabinet) ;; default
@@ -78,7 +80,7 @@
78
80
  (when (= 0 (% i 100))
79
81
  (trie.commit!))
80
82
  (when progress
81
- (progress.inc)))
83
+ (progress.increment)))
82
84
  keylist))
83
85
  trie.commit!)
84
86
 
@@ -97,14 +99,20 @@
97
99
  (push! okuri-ari-list k)
98
100
  (push! okuri-nashi-list k))))
99
101
  (when progress
100
- (progress.inc)))
102
+ (progress.increment)))
101
103
  keylist)
102
104
  (values okuri-ari-list
103
105
  okuri-nashi-list
104
106
  hiragana-phrase-list)))
105
107
 
106
108
  (let1 progress (if displayProgress
107
- (ProgressBar.new "trie-tree " (* 2 (length keylist)) STDERR)
109
+ (ProgressBar.create (alist->hash-table
110
+ `(
111
+ [title . "trie-tree "]
112
+ [total . ,(* 2 (length keylist))]
113
+ [output . ,STDERR]
114
+ [format . ,progressbar-format]
115
+ )))
108
116
  #f)
109
117
  (receive (okuri-ari-list
110
118
  okuri-nashi-list
@@ -112,12 +120,12 @@
112
120
  (grouping-keylist keylist progress)
113
121
 
114
122
  (when progress
115
- (progress.set (+ (length keylist)
116
- (- (length keylist)
117
- (+
118
- (length okuri-ari-list)
119
- (length okuri-nashi-list)
120
- (length hiragana-phrase-list))))))
123
+ (progress.progress= (+ (length keylist)
124
+ (- (length keylist)
125
+ (+
126
+ (length okuri-ari-list)
127
+ (length okuri-nashi-list)
128
+ (length hiragana-phrase-list))))))
121
129
 
122
130
  (let1 trie (DistributedTrie::Trie.new kvs (+ okuri-ari-prefix ":" userid ":"))
123
131
  (trie-add-autocommit trie okuri-ari-list progress))
@@ -164,7 +172,13 @@
164
172
  (define (load-sekka-jisyo-f f filename)
165
173
  (define keylist '())
166
174
  (define (create-keylist kvs f)
167
- (let1 progress (ProgressBar.new "data-body " (file-length f) STDERR)
175
+ (let1 progress (ProgressBar.create (alist->hash-table
176
+ `(
177
+ [title . "data-body "]
178
+ [total . ,(file-length f)]
179
+ [output . ,STDERR]
180
+ [format . ,progressbar-format]
181
+ )))
168
182
  (for-each
169
183
  (lambda (line)
170
184
  (let* (
@@ -172,7 +186,7 @@
172
186
  [fields (split-dict-line line)])
173
187
  (push! keylist (first fields))
174
188
  (append-entry master-prefix kvs (first fields) (second fields)))
175
- (progress.inc))
189
+ (progress.increment))
176
190
  f)))
177
191
  (let1 kvs (Kvs.new (get-kvs-type))
178
192
  (kvs.open filename)
@@ -205,14 +219,20 @@
205
219
  ""
206
220
  (second key-value))])
207
221
  (kvs.put! key value)
208
- (progress.inc))
222
+ (progress.increment))
209
223
  (when (not (f.eof))
210
224
  (loop (f.readline.chomp)))))
211
225
 
212
226
 
213
227
  (let1 total (file-length f)
214
228
  (let ([kvs (Kvs.new (get-kvs-type))]
215
- [progress (ProgressBar.new "Restore" total STDERR)])
229
+ [progress (ProgressBar.create (alist->hash-table
230
+ `(
231
+ [title . "restore "]
232
+ [total . ,total]
233
+ [output . ,STDERR]
234
+ [format . ,progressbar-format]
235
+ )))])
216
236
  (kvs.open filename-or-hostname)
217
237
  (kvs.clear)
218
238
  (restore f kvs progress)
@@ -1,4 +1,4 @@
1
1
  class SekkaVersion
2
- def self.version() "1.2.0" end
2
+ def self.version() "1.2.1" end
3
3
  def self.dictVersion() "1.2.2" end
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sekka
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-14 00:00:00.000000000 Z
12
+ date: 2013-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine