shunkuntype 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/shunkuntype.rb +5 -1
- data/lib/shunkuntype/#db.rb# +49 -0
- data/lib/shunkuntype/version.rb +1 -1
- data/speed.png +0 -0
- data/tmp.hiki +12 -0
- data/tmp.html +14 -0
- data/work.png +0 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 007da1f99042b9f0cf88c37438cdb698c5ef89c5
|
4
|
+
data.tar.gz: 03ca179b6f755801aa19123b76e76c01bf4bda38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52a954fa65f082878dee38e2c6b815dcddf862c2e4995b17d7ffc00c179318cd07fdc828d7a17580691cfe8bb69b7e900f5b1323a2b1e2de9950b637a0269d94
|
7
|
+
data.tar.gz: 00fef43f1ffd8515fa8f9b6ca60974272474bae1722aa373d131a3c5360ae4a49a412d01638c3c8aa30bc66c03f2932a6b4d12097c3620d78e3efab8ac45c7df
|
data/lib/shunkuntype.rb
CHANGED
@@ -62,10 +62,14 @@ module Shunkuntype
|
|
62
62
|
p 'report submission'
|
63
63
|
data_dir = File.join(ENV['HOME'], '.shunkuntype')
|
64
64
|
FileUtils.cd(data_dir)
|
65
|
+
unless File.exists?(Shunkuntype::SERVER_FILE)
|
66
|
+
print "Input server_directory?:"
|
67
|
+
p tmp = gets
|
68
|
+
File.open(Shunkuntype::SERVER_FILE,'w'){|f| f.print(tmp) }
|
69
|
+
end
|
65
70
|
server_info=File.readlines(Shunkuntype::SERVER_FILE)
|
66
71
|
p @server_directory=server_info[0].chomp
|
67
72
|
p @user_name=server_info[0].split('@')[0]
|
68
|
-
|
69
73
|
['training_data.txt','speed_data.txt'].each{|ext|
|
70
74
|
file_merge(ext)
|
71
75
|
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
#require 'init'
|
5
|
+
|
6
|
+
module DataFiles
|
7
|
+
|
8
|
+
def self.prepare
|
9
|
+
data_path = File.join(ENV['HOME'], '.shunkuntype','training_data.txt')
|
10
|
+
|
11
|
+
create_file_if_not_exists(data_path)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.create_file_if_not_exists(path)
|
15
|
+
create_file_path(path)
|
16
|
+
|
17
|
+
return if File::exists?(path)
|
18
|
+
create_data_files
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.create_file_path(path)
|
22
|
+
FileUtils.mkdir_p File.dirname(path)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.create_data_files
|
26
|
+
if File::exist?("./speed_data.txt") then
|
27
|
+
system "mv ./speed_data.txt #{Shunkuntype::SPEED_FILE}"
|
28
|
+
print "moving ./speed_data.txt #{Shunkuntype::SPEED_FILE}.\n"
|
29
|
+
end
|
30
|
+
if File::exist?("./training_data.txt") then
|
31
|
+
system "mv ./training_data.txt #{Shunkuntype::TRAIN_FILE}"
|
32
|
+
print "moving ./training_data.txt #{Shunkuntype::TRAIN_FILE}.\n"
|
33
|
+
end
|
34
|
+
if File::exist?(Shunkuntype::SPEED_FILE) then
|
35
|
+
print "#{Shunkuntype::SPEED_FILE} exits.\n"
|
36
|
+
else
|
37
|
+
File::open(Shunkuntype::SPEED_FILE,'a')
|
38
|
+
print "make #{Shunkuntype::SPEED_FILE}\n"
|
39
|
+
end
|
40
|
+
if File::exist?(Shunkuntype::TRAIN_FILE) then
|
41
|
+
print "#{Shunkuntype::TRAIN_FILE} exits.\n"
|
42
|
+
else
|
43
|
+
File::open(Shunkuntype::TRAIN_FILE,'a')
|
44
|
+
print "make #{Shunkuntype::TRAIN_FILE}\n"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
private_class_method :create_file_if_not_exists, :create_file_path, :create_data_files
|
48
|
+
end
|
49
|
+
|
data/lib/shunkuntype/version.rb
CHANGED
data/speed.png
ADDED
Binary file
|
data/tmp.hiki
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
!!Shunkun typer 2016-10-26 12:46:37 +0900
|
2
|
+
|| ||>speed[sec]||>training
|
3
|
+
||||init||current||total time[min]||step
|
4
|
+
||fujimura||98.71||82.42|| 7.00|| 2.00
|
5
|
+
||kage||66.56||40.99||10.00|| 2.00
|
6
|
+
||koki||64.09||64.67|| 5.00||15.00
|
7
|
+
||merumo||87.56||87.56|| 0.00|| 0.00
|
8
|
+
||oyagi||79.92||79.92|| 5.00|| 2.00
|
9
|
+
||soki||48.32||33.69|| 8.00|| 2.00
|
10
|
+
||tsuji||49.52||111.03||10.00|| 2.00
|
11
|
+
|
12
|
+
||{{attach_view(work.png)}}||{{attach_view(speed.png)}}
|
data/tmp.html
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
<html>
|
2
|
+
<table border="1">
|
3
|
+
<caption>Shunkun typer<caption>
|
4
|
+
<tr><th></th><th colspan=2>speed[sec]</th><th colspan=2>training</th></tr>
|
5
|
+
<tr><th></th><th>init</th><th>current</th><th>total time[min]</th><th>step</th></tr>
|
6
|
+
<tr><th>fujimura</th><td>98.71</td><td>82.42</td><td> 7.00</td><td> 2.00</td></tr>
|
7
|
+
<tr><th>kage</th><td>66.56</td><td>40.99</td><td>10.00</td><td> 2.00</td></tr>
|
8
|
+
<tr><th>koki</th><td>64.09</td><td>64.67</td><td> 5.00</td><td>15.00</td></tr>
|
9
|
+
<tr><th>merumo</th><td>87.56</td><td>87.56</td><td> 0.00</td><td> 0.00</td></tr>
|
10
|
+
<tr><th>oyagi</th><td>79.92</td><td>79.92</td><td> 5.00</td><td> 2.00</td></tr>
|
11
|
+
<tr><th>soki</th><td>48.32</td><td>33.69</td><td> 8.00</td><td> 2.00</td></tr>
|
12
|
+
<tr><th>tsuji</th><td>49.52</td><td>111.03</td><td>10.00</td><td> 2.00</td></tr>
|
13
|
+
</table>
|
14
|
+
<p><img src="./work.png" /></p><p><img src="./speed.png" /></p></html>
|
data/work.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shunkuntype
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shigeto R. Nishitani
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: systemu
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/data/trans2.rb
|
190
190
|
- lib/data/word.list
|
191
191
|
- lib/shunkuntype.rb
|
192
|
+
- lib/shunkuntype/#db.rb#
|
192
193
|
- lib/shunkuntype/db.rb
|
193
194
|
- lib/shunkuntype/finished_check.rb
|
194
195
|
- lib/shunkuntype/merge.rb
|
@@ -200,6 +201,10 @@ files:
|
|
200
201
|
- lib/shunkuntype/training.rb
|
201
202
|
- lib/shunkuntype/version.rb
|
202
203
|
- shunkuntype.gemspec
|
204
|
+
- speed.png
|
205
|
+
- tmp.hiki
|
206
|
+
- tmp.html
|
207
|
+
- work.png
|
203
208
|
homepage: https://github.com/daddygongon/shunkuntype
|
204
209
|
licenses:
|
205
210
|
- MIT
|