shunkuntype 1.0.15 → 1.1.1

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.
Files changed (53) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +10 -2
  3. data/.hyper_card/docs/.Shunkuntype.hiki.swp +0 -0
  4. data/.hyper_card/history/test_cli_bdd.md +849 -0
  5. data/.hyper_card/history/test_cli_bdd_251114.md +883 -0
  6. data/.hyper_card/history/tidy.md +226 -0
  7. data/.hyper_card/history/tidy_251114.md +248 -0
  8. data/Gemfile.lock +36 -0
  9. data/README.md +3 -14
  10. data/Rakefile +6 -35
  11. data/exe/shunkuntype +1 -1
  12. data/lib/shunkuntype/db.rb +9 -28
  13. data/lib/shunkuntype/finished_check.rb +1 -2
  14. data/lib/shunkuntype/speed.rb +49 -32
  15. data/lib/shunkuntype/training.rb +23 -25
  16. data/lib/shunkuntype/version.rb +2 -7
  17. data/lib/shunkuntype.rb +35 -111
  18. data/shunkuntype.gemspec +5 -6
  19. metadata +45 -59
  20. data/.rspec +0 -2
  21. data/.ruby-version +0 -1
  22. data/.yardopts +0 -3
  23. data/Rakefile.rb +0 -1
  24. data/lib/shunkuntype/#db.rb# +0 -49
  25. data/lib/shunkuntype/#mk_summary.rb# +0 -77
  26. data/lib/shunkuntype/merge.rb +0 -52
  27. data/lib/shunkuntype/mk_summary.rb +0 -77
  28. data/lib/shunkuntype/options.rb +0 -24
  29. data/lib/shunkuntype/plot.rb +0 -66
  30. data/lib/shunkuntype/plot_data.rb +0 -200
  31. data/shunkuntype_bob/.gitignore +0 -1
  32. data/shunkuntype_bob/Rakefile +0 -252
  33. data/shunkuntype_bob/hiki_help.yml +0 -53
  34. data/shunkuntype_bob/report.hiki +0 -173
  35. data/shunkuntype_bob/shunkuntype_bob.hiki +0 -36
  36. /data/{docs → .hyper_card/docs}/Shunkuntype.hiki +0 -0
  37. /data/{docs → .hyper_card/docs}/Shunkuntype_Coding.hiki +0 -0
  38. /data/{docs → .hyper_card/docs}/Shunkuntype_Coding_PlotData.hiki +0 -0
  39. /data/{docs → .hyper_card/docs}/Shunkuntype_Coding_gnuplot.hiki +0 -0
  40. /data/{docs → .hyper_card/docs}/Shunkuntype_GroupHearing_20160128.pdf +0 -0
  41. /data/{docs → .hyper_card/docs}/Shunkuntype_gemizing.hiki +0 -0
  42. /data/{docs → .hyper_card/docs}/Shunkuntype_manual.hiki +0 -0
  43. /data/{docs → .hyper_card/docs}/Shunkuntype_report.hiki +0 -0
  44. /data/{docs → .hyper_card/docs}/TouchTypespeedResult.png +0 -0
  45. /data/{docs → .hyper_card/docs}/TouchTypetrainingResult.png +0 -0
  46. /data/{docs → .hyper_card/docs}/TouchTypewhole_workResult.png +0 -0
  47. /data/{docs → .hyper_card/docs}/donkey_and_fujimoto.png +0 -0
  48. /data/{docs → .hyper_card/docs}/readme_en.hiki +0 -0
  49. /data/{docs → .hyper_card/docs}/readme_ja.hiki +0 -0
  50. /data/{docs → .hyper_card/docs}/res.png +0 -0
  51. /data/{docs → .hyper_card/docs}/shunkun_report.pdf +0 -0
  52. /data/{docs → .hyper_card/docs}/speed.png +0 -0
  53. /data/{docs → .hyper_card/docs}/work.png +0 -0
@@ -1,37 +1,46 @@
1
+ require "shunkuntype"
2
+ require_relative "db" # 追加
1
3
 
2
4
  class SpeedCheck
3
5
  attr_reader :number, :period
4
6
 
5
- # print key positions
6
- def print_keyboard
7
- content = <<-EOF
8
- q \\ w \\ e \\ r t \\ y u \\ i \\ o \\ p
9
- a \\ s \\ d \\ f g \\ h j \\ k \\ l \\ ; enter
10
- sh z \\ x \\ c \\ v b \\ n m \\ , \\\ . \\ shift
11
- EOF
12
- print content
13
- end
14
-
15
7
  def initialize
16
8
  @number = 20 #default 20
17
9
  @period = 60
18
10
  check_data_files
19
11
  data = mk_random_words
20
- t0,t1,count = exec_speed_check(data)
21
- keep_record(t0,t1,count)
12
+ t0, t1, count = exec_speed_check(data)
13
+ # ここでnilチェック
14
+ if t0.nil? || t1.nil?
15
+ puts "Speed check was interrupted or no input was given."
16
+ return
17
+ end
18
+ keep_record(t0, t1, count)
19
+ end
20
+
21
+ def print_keyboard
22
+ Shunkuntype.print_keyboard
22
23
  end
23
24
 
24
25
  def check_data_files
26
+ retried = false
25
27
  begin
26
- file=open(Shunkuntype::SPEED_FILE,"r")
28
+ file = open(Shunkuntype::SPEED_FILE, "r")
27
29
  if file
28
30
  puts "#{Shunkuntype::SPEED_FILE} opened succcessfully"
29
31
  end
30
32
  rescue
31
- puts "#{Shunkuntype::SPEED_FILE} does not exist in this directory. --init or try in another dir."
32
- exit
33
+ if retried
34
+ puts "Failed to create #{Shunkuntype::SPEED_FILE}. Please check permissions."
35
+ exit 1
36
+ end
37
+ puts "#{Shunkuntype::SPEED_FILE} does not exist in this directory. Creating required files..."
38
+ DataFiles.prepare
39
+ retried = true
40
+ retry
33
41
  end
34
42
  end
43
+
35
44
  def mk_random_words
36
45
  data=[]
37
46
  data_dir=File.expand_path('../../../lib/data', __FILE__)
@@ -50,36 +59,44 @@ EOF
50
59
  print "\n\n"+number.to_s+" words should be cleared."
51
60
  print "\nType return-key to start."
52
61
  p ''
53
- line=$stdin.gets
62
+ line = $stdin.gets
63
+ return [nil, nil, nil] if line.nil? # breakの代わりにreturnで早期リターン
64
+ line = line.chomp
54
65
 
55
- t0=Time.now
56
- count=0
66
+ t0 = Time.now
67
+ count = 0
57
68
  @number.times do |i|
58
69
  print_keyboard()
59
70
  puts (i+1).to_s
60
71
  word = data[i]
61
- count+=word.length
62
- while line!=word do
72
+ count += word.length
73
+ while line != word do
63
74
  puts word
64
75
  p ''
65
- line=$stdin.gets.chomp
76
+ line = $stdin.gets
77
+ return [t0, Time.now, count] if line.nil? # ここもnilチェック
78
+ line = line.chomp
66
79
  end
67
80
  end
68
- t1=Time.now
69
- return t0,t1,count
81
+ t1 = Time.now
82
+ return t0, t1, count
70
83
  end
71
84
 
72
- def keep_record(t0,t1,count)
73
- statement = t0.to_s+","
74
- statement << @number.to_s+","
75
- statement << (t1-t0).to_s+","
76
- icount=@period/(t1-t0)*count
77
- statement << icount.to_s+"\n"
78
- data_file=open(Shunkuntype::SPEED_FILE,"a+")
85
+ def keep_record(t0, t1, count)
86
+ return if t0.nil? || t1.nil?
87
+ # テスト環境なら記録しない
88
+ return if ENV['TEST'] == 'true'
89
+
90
+ statement = t0.to_s + ","
91
+ statement << @number.to_s + ","
92
+ statement << (t1 - t0).to_s + ","
93
+ icount = @period / (t1 - t0) * count
94
+ statement << icount.to_s + "\n"
95
+ data_file = open(Shunkuntype::SPEED_FILE, "a+")
79
96
  data_file << statement
80
97
  p statement
81
98
 
82
- printf("%5.3f sec\n",Time.now-t0)
83
- printf("%4d characters.\n",icount)
99
+ printf("%5.3f sec\n", Time.now - t0)
100
+ printf("%4d characters.\n", icount)
84
101
  end
85
102
  end
@@ -1,3 +1,5 @@
1
+ require "shunkuntype"
2
+
1
3
  class Training
2
4
  def initialize(val_i)
3
5
  val_i ||= 47
@@ -10,11 +12,15 @@ class Training
10
12
 
11
13
  @time_flag=true
12
14
  print_keyboard
13
- start_time,data=init_proc(file_name)
14
- #size_training(file_name,data,start_time)
15
+ start_time,data = init_proc(file_name)
16
+ return if start_time.nil?
15
17
  time_training(base_name,data,start_time)
16
18
  end
17
19
 
20
+ def print_keyboard
21
+ Shunkuntype.print_keyboard
22
+ end
23
+
18
24
  # count correct spelling
19
25
  def counter(word1,word2)
20
26
  ws1=word1.split(/\s+/)
@@ -39,28 +45,25 @@ class Training
39
45
  end
40
46
  end
41
47
 
42
- # print key positions
43
- def print_keyboard
44
- content = <<-EOF
45
- q \\ w \\ e \\ r t \\ y u \\ i \\ o \\ p
46
- a \\ s \\ d \\ f g \\ h j \\ k \\ l \\ ; enter
47
- sh z \\ x \\ c \\ v b \\ n m \\ , \\\ . \\ shift
48
- EOF
49
- print content
50
- end
51
-
52
48
  def init_proc(file_name)
53
49
  data=File.readlines(file_name)
54
50
  data.each{|word| print word }
55
51
  print "\nRepeat above sentences. Type return-key to start."
56
- # p ''
57
52
  line=STDIN.gets
53
+ if line.nil?
54
+ # 入力がなければnilを返して呼び出し元で処理
55
+ return nil, data
56
+ end
57
+ line = line.chomp
58
58
  start_time = Time.now
59
- return start_time,data
59
+ return start_time, data
60
60
  end
61
61
 
62
- def keep_record(start_time,file_name,period)
63
- data_file=open(Shunkuntype::TRAIN_FILE,"a")
62
+ def keep_record(start_time, file_name, period)
63
+ # テスト環境なら記録しない
64
+ return if ENV['TEST'] == 'true'
65
+
66
+ data_file = open(Shunkuntype::TRAINING_FILE, "a+")
64
67
  data_file << "#{start_time},#{file_name},#{@counter},#{period}\n"
65
68
  exit
66
69
  end
@@ -69,18 +72,13 @@ EOF
69
72
  data.each do |sentence|
70
73
  break if @time_flag == false
71
74
  puts sentence
72
- # p ''
73
- line=STDIN.gets.chomp
74
- counter(sentence,line)
75
+ line = STDIN.gets
76
+ break if line.nil?
77
+ line = line.chomp
78
+ counter(sentence, line)
75
79
  end
76
80
  end
77
81
 
78
- def size_training(file_name,data,start_time)
79
- type_loop(data)
80
- exit_proc(start_time,file_name,(Time.now-start_time).to_i)
81
- return
82
- end
83
-
84
82
  def time_training(base_name,data,start_time)
85
83
  loop_thread(@period)
86
84
  data2=[]
@@ -2,11 +2,6 @@ require 'fileutils'
2
2
  require 'tmpdir'
3
3
 
4
4
  module Shunkuntype
5
- VERSION = "1.0.15"
5
+ VERSION = "1.1.1"
6
6
  data_dir = File.join(ENV['HOME'], '.shunkuntype')
7
- # SPEED_FILE="./shunkuntype_speed_data.txt"
8
- SPEED_FILE=File.join(data_dir,"speed_data.txt")
9
- # TRAIN_FILE="./shunkuntype_training_data.txt"
10
- TRAIN_FILE=File.join(data_dir,"training_data.txt")
11
- SERVER_FILE=File.join(data_dir,"server_data.txt")
12
- end
7
+ end
data/lib/shunkuntype.rb CHANGED
@@ -1,128 +1,52 @@
1
1
  require 'optparse'
2
- require "shunkuntype/version"
3
2
  require "shunkuntype/speed"
4
3
  require "shunkuntype/training"
5
4
  require "shunkuntype/finished_check"
6
- require "shunkuntype/plot"
7
- require "shunkuntype/mk_summary"
8
- require "shunkuntype/plot_data"
9
5
  require "shunkuntype/db"
10
- require "shunkuntype/merge"
11
6
  require 'systemu'
7
+ require "shunkuntype/version"
12
8
 
13
9
  module Shunkuntype
14
- class Command
15
-
16
- def self.run(argv=[])
17
- print "Shunkuntype says 'Hello world'.\n"
18
- new(argv).execute
19
- end
20
-
21
- def initialize(argv=[])
22
- @argv = argv
23
- end
10
+ DATA_DIR = File.join(ENV['HOME'], '.shunkuntype')
11
+ TRAINING_FILE = File.join(DATA_DIR, "training_data.txt")
12
+ SPEED_FILE = File.join(DATA_DIR, "speed_data.txt")
13
+
14
+ def self.print_keyboard
15
+ content = <<-EOF
16
+ q \\ w \\ e \\ r t \\ y u \\ i \\ o \\ p
17
+ a \\ s \\ d \\ f g \\ h j \\ k \\ l \\ ; enter
18
+ sh z \\ x \\ c \\ v b \\ n m \\ , \\\ . \\ shift
19
+ EOF
20
+ print content
21
+ end
22
+ end
24
23
 
25
- def execute
26
- DataFiles.prepare
24
+ class Command
27
25
 
28
- @argv << '--help' if @argv.size==0
29
- command_parser = OptionParser.new do |opt|
30
- opt.on('-v', '--version','show program Version.') { |v|
31
- opt.version = Shunkuntype::VERSION
32
- puts opt.ver
33
- }
34
- opt.on('-c', '--check','Check speed') {|v| SpeedCheck.new }
35
- opt.on('-d', '--drill [VAL]','one minute Drill [VAL]', Integer) {|v| Training.new(v) }
36
- opt.on('-h', '--history','view training History') {|v| FinishCheck.new }
37
- opt.on('-p', '--plot','Plot personal data') { |v| PlotPersonalData.new }
38
- opt.on('-s', '--submit','Submit data to dmz0') { |v| report_submit()}
39
- opt.on('--reset','reset training data') { |v| reset_data()}
40
- opt.on('--review [FILE]','Review training, TAGs=html or hiki'){|v| data_viewing(v)}
41
- end
42
- command_parser.parse!(@argv)
43
- exit
44
- end
45
-
46
- def reset_data
47
- data_dir = File.join(ENV['HOME'], '.shunkuntype')
48
- FileUtils.cd(data_dir)
49
- begin
50
- FileUtils.mkdir('old_data',:verbose => true)
51
- rescue Errno::EEXIST
52
- print "Directory 'old_data' exists at #{data_dir}.\n\n"
53
- end
54
- time=Time.now.strftime("%Y%m%d%H%M%S")
55
- ['speed_data','training_data'].each{|file|
56
- target = File.join(data_dir,'old_data',"#{file}_#{time}.txt")
57
- FileUtils.mv(file+'.txt',target,:verbose=>true)
58
- }
59
- end
26
+ def self.run(argv=[])
27
+ print "Shunkuntype says 'Hello world'.\n"
28
+ new(argv).execute
29
+ end
60
30
 
61
- def report_submit
62
- p 'report submission'
63
- p data_dir = File.join(ENV['HOME'], '.shunkuntype')
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
70
- server_info=File.readlines(Shunkuntype::SERVER_FILE)
71
- p @server_directory=server_info[0].chomp
72
- p @user_name=server_info[0].split('@')[0]
73
- ['training_data.txt','speed_data.txt'].each{|ext|
74
- file_merge(ext)
75
- system "scp tmp_data.txt #{ext}"
76
- }
77
- end
31
+ def initialize(argv=[])
32
+ @argv = argv
33
+ end
78
34
 
79
- def file_merge(ext_name)
80
- file_name=ext_name
81
- file_current = File.readlines(file_name)
82
- tmp_file = File.open("./tmp_data.txt",'w')
83
- sta, out, stderror = systemu "scp #{@server_directory}/#{@user_name}_#{ext_name} ."
84
- p stderror
85
- unless stderror.include?(" No such file or directory") then
86
- file_server = File.readlines("#{@user_name}_#{ext_name}")
87
- tmp_file.print data_merge(file_current,file_server)
88
- else
89
- p " No such file or directory in server.\n"
90
- tmp_file.print file_current.join
91
- end
92
- tmp_file.close
93
- system "cat tmp_data.txt"
94
- system "scp tmp_data.txt #{@server_directory}/#{@user_name}_#{ext_name}"
95
- end
35
+ def execute
36
+ DataFiles.prepare
96
37
 
97
- def data_viewing(file)
98
- # opts for MkPlots could be described in file
99
- # Not coded yet at all!!!
100
- if file==nil then
101
- opts = {}
102
- end
103
- server_info=File.readlines(Shunkuntype::SERVER_FILE)
104
- p server_directory=server_info[0].chomp
105
- Dir.mktmpdir('shunkun'){|tmp_dir|
106
- # ['tmp_dir'].each{|tmp_dir|
107
- p tmp_dir
108
- FileUtils.mkdir_p(File.join(tmp_dir,'mem_data'))
109
- system "scp -r #{server_directory}/* #{tmp_dir}/mem_data"
110
- p table = MkSummary.new(tmp_dir) # read data from files
111
- MkPlots.new(tmp_dir,opts)
112
- File.open('./tmp.html','a'){|f|
113
- f.write("<html>\n")
114
- f.write(table.mk_html_table())
115
- f.write("<p><img src=\"./work.png\" /></p>")
116
- f.write("<p><img src=\"./speed.png\" /></p>")
117
- f.write("</html>\n")
118
- }
119
- File.open('./tmp.hiki','a'){|f|
120
- f.write(table.mk_hiki_table())
121
- f.write('||{{attach_view(work.png)}}')
122
- f.write('||{{attach_view(speed.png)}}')
123
- f.write("\n")
124
- }
38
+ @argv << '--help' if @argv.size==0
39
+ command_parser = OptionParser.new do |opt|
40
+ opt.on('-v', '--version','show program Version.') { |v|
41
+ opt.version = Shunkuntype::VERSION
42
+ puts opt.ver
125
43
  }
44
+ opt.on('-c', '--check','Check speed') {|v| SpeedCheck.new }
45
+ opt.on('-d', '--drill [VAL]','one minute Drill [VAL]', Integer) {|v| Training.new(v) }
46
+ opt.on('-h', '--help','show help message') { puts opt; exit }
47
+ opt.on('-l','--log','view training log') {|v| FinishCheck.new }
126
48
  end
49
+ command_parser.parse!(@argv)
50
+ exit
127
51
  end
128
52
  end
data/shunkuntype.gemspec CHANGED
@@ -27,11 +27,10 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
29
 
30
- spec.add_dependency "systemu", "~>2.5.1"
30
+ spec.add_dependency "systemu"
31
31
  spec.add_dependency "gnuplot"
32
- spec.add_development_dependency "bundler", "~> 1.10"
33
- spec.add_development_dependency "rake", "~> 10.0"
34
- spec.add_development_dependency "yard", "~> 0.8"
35
- # spec.add_development_dependency "test-unit"
36
- spec.add_development_dependency "rspec"
32
+ spec.add_development_dependency "bundler"
33
+ spec.add_development_dependency "rake"
34
+ spec.add_development_dependency "minitest"
35
+ spec.add_development_dependency "minitest-reporters"
37
36
  end
metadata CHANGED
@@ -1,29 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shunkuntype
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shigeto R. Nishitani
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2018-03-27 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: systemu
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - "~>"
16
+ - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 2.5.1
18
+ version: '0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - "~>"
23
+ - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: 2.5.1
25
+ version: '0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: gnuplot
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -42,46 +41,46 @@ dependencies:
42
41
  name: bundler
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
- - - "~>"
44
+ - - ">="
46
45
  - !ruby/object:Gem::Version
47
- version: '1.10'
46
+ version: '0'
48
47
  type: :development
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
- - - "~>"
51
+ - - ">="
53
52
  - !ruby/object:Gem::Version
54
- version: '1.10'
53
+ version: '0'
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: rake
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - "~>"
58
+ - - ">="
60
59
  - !ruby/object:Gem::Version
61
- version: '10.0'
60
+ version: '0'
62
61
  type: :development
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
- - - "~>"
65
+ - - ">="
67
66
  - !ruby/object:Gem::Version
68
- version: '10.0'
67
+ version: '0'
69
68
  - !ruby/object:Gem::Dependency
70
- name: yard
69
+ name: minitest
71
70
  requirement: !ruby/object:Gem::Requirement
72
71
  requirements:
73
- - - "~>"
72
+ - - ">="
74
73
  - !ruby/object:Gem::Version
75
- version: '0.8'
74
+ version: '0'
76
75
  type: :development
77
76
  prerelease: false
78
77
  version_requirements: !ruby/object:Gem::Requirement
79
78
  requirements:
80
- - - "~>"
79
+ - - ">="
81
80
  - !ruby/object:Gem::Version
82
- version: '0.8'
81
+ version: '0'
83
82
  - !ruby/object:Gem::Dependency
84
- name: rspec
83
+ name: minitest-reporters
85
84
  requirement: !ruby/object:Gem::Requirement
86
85
  requirements:
87
86
  - - ">="
@@ -103,36 +102,38 @@ extensions: []
103
102
  extra_rdoc_files: []
104
103
  files:
105
104
  - ".gitignore"
106
- - ".rspec"
107
- - ".ruby-version"
105
+ - ".hyper_card/docs/.Shunkuntype.hiki.swp"
106
+ - ".hyper_card/docs/Shunkuntype.hiki"
107
+ - ".hyper_card/docs/Shunkuntype_Coding.hiki"
108
+ - ".hyper_card/docs/Shunkuntype_Coding_PlotData.hiki"
109
+ - ".hyper_card/docs/Shunkuntype_Coding_gnuplot.hiki"
110
+ - ".hyper_card/docs/Shunkuntype_GroupHearing_20160128.pdf"
111
+ - ".hyper_card/docs/Shunkuntype_gemizing.hiki"
112
+ - ".hyper_card/docs/Shunkuntype_manual.hiki"
113
+ - ".hyper_card/docs/Shunkuntype_report.hiki"
114
+ - ".hyper_card/docs/TouchTypespeedResult.png"
115
+ - ".hyper_card/docs/TouchTypetrainingResult.png"
116
+ - ".hyper_card/docs/TouchTypewhole_workResult.png"
117
+ - ".hyper_card/docs/donkey_and_fujimoto.png"
118
+ - ".hyper_card/docs/readme_en.hiki"
119
+ - ".hyper_card/docs/readme_ja.hiki"
120
+ - ".hyper_card/docs/res.png"
121
+ - ".hyper_card/docs/shunkun_report.pdf"
122
+ - ".hyper_card/docs/speed.png"
123
+ - ".hyper_card/docs/work.png"
124
+ - ".hyper_card/history/test_cli_bdd.md"
125
+ - ".hyper_card/history/test_cli_bdd_251114.md"
126
+ - ".hyper_card/history/tidy.md"
127
+ - ".hyper_card/history/tidy_251114.md"
108
128
  - ".travis.yml"
109
- - ".yardopts"
110
129
  - CODE_OF_CONDUCT.md
111
130
  - Gemfile
131
+ - Gemfile.lock
112
132
  - LICENSE.txt
113
133
  - README.md
114
134
  - Rakefile
115
- - Rakefile.rb
116
135
  - bin/console
117
136
  - bin/setup
118
- - docs/Shunkuntype.hiki
119
- - docs/Shunkuntype_Coding.hiki
120
- - docs/Shunkuntype_Coding_PlotData.hiki
121
- - docs/Shunkuntype_Coding_gnuplot.hiki
122
- - docs/Shunkuntype_GroupHearing_20160128.pdf
123
- - docs/Shunkuntype_gemizing.hiki
124
- - docs/Shunkuntype_manual.hiki
125
- - docs/Shunkuntype_report.hiki
126
- - docs/TouchTypespeedResult.png
127
- - docs/TouchTypetrainingResult.png
128
- - docs/TouchTypewhole_workResult.png
129
- - docs/donkey_and_fujimoto.png
130
- - docs/readme_en.hiki
131
- - docs/readme_ja.hiki
132
- - docs/res.png
133
- - docs/shunkun_report.pdf
134
- - docs/speed.png
135
- - docs/work.png
136
137
  - exe/shunkuntype
137
138
  - lib/data/STEP-1.txt
138
139
  - lib/data/STEP-10.txt
@@ -236,29 +237,16 @@ files:
236
237
  - lib/data/trans2.rb
237
238
  - lib/data/word.list
238
239
  - lib/shunkuntype.rb
239
- - lib/shunkuntype/#db.rb#
240
- - lib/shunkuntype/#mk_summary.rb#
241
240
  - lib/shunkuntype/db.rb
242
241
  - lib/shunkuntype/finished_check.rb
243
- - lib/shunkuntype/merge.rb
244
- - lib/shunkuntype/mk_summary.rb
245
- - lib/shunkuntype/options.rb
246
- - lib/shunkuntype/plot.rb
247
- - lib/shunkuntype/plot_data.rb
248
242
  - lib/shunkuntype/speed.rb
249
243
  - lib/shunkuntype/training.rb
250
244
  - lib/shunkuntype/version.rb
251
245
  - shunkuntype.gemspec
252
- - shunkuntype_bob/.gitignore
253
- - shunkuntype_bob/Rakefile
254
- - shunkuntype_bob/hiki_help.yml
255
- - shunkuntype_bob/report.hiki
256
- - shunkuntype_bob/shunkuntype_bob.hiki
257
246
  homepage: https://github.com/daddygongon/shunkuntype
258
247
  licenses:
259
248
  - MIT
260
249
  metadata: {}
261
- post_install_message:
262
250
  rdoc_options: []
263
251
  require_paths:
264
252
  - lib
@@ -273,9 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
273
261
  - !ruby/object:Gem::Version
274
262
  version: '0'
275
263
  requirements: []
276
- rubyforge_project:
277
- rubygems_version: 2.6.14
278
- signing_key:
264
+ rubygems_version: 3.6.7
279
265
  specification_version: 4
280
266
  summary: type training.
281
267
  test_files: []
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.4.3
data/.yardopts DELETED
@@ -1,3 +0,0 @@
1
- -
2
- **/*.md
3
-
data/Rakefile.rb DELETED
@@ -1 +0,0 @@
1
- ./Rakefile
@@ -1,49 +0,0 @@
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
-