sheltered-girl 4.0.4.4 → 4.0.5
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/.env +3 -3
- data/Gemfile +2 -2
- data/README.md +11 -11
- data/bin/aqua +247 -247
- data/bin/bmi +56 -56
- data/bin/bmi-license +118 -118
- data/bin/heat +14 -14
- data/bin/katakana +35 -35
- data/bin/koyomi +55 -55
- data/bin/romaji +34 -34
- data/bin/sheltered-girl +317 -317
- data/bin/speak +1149 -1154
- data/bin/tenji +42 -42
- data/bin/tenji_log +42 -42
- data/bin/tweet +79 -79
- data/lib/all.rb +45 -45
- data/lib/all_log.rb +50 -50
- data/lib/and.rb +48 -48
- data/lib/autocal.rb +21 -21
- data/lib/bmi.rb +28 -28
- data/lib/bmi_version.rb +21 -21
- data/lib/calendar.rb +17 -17
- data/lib/count.rb +43 -43
- data/lib/decript.rb +20 -20
- data/lib/druby_erb.rb +45 -45
- data/lib/druby_reci.rb +23 -23
- data/lib/feed.rb +13 -13
- data/lib/frame.rb +212 -212
- data/lib/frame_version.rb +21 -21
- data/lib/gc.rb +17 -17
- data/lib/gem_version.rb +9 -9
- data/lib/himekuri.rb +175 -175
- data/lib/himekuri_version.rb +21 -21
- data/lib/hyaku.rb +55 -55
- data/lib/install.rb +230 -230
- data/lib/katakana.rb +666 -666
- data/lib/kome.rb +41 -41
- data/lib/mail.rb +47 -47
- data/lib/match.rb +50 -50
- data/lib/mini.rb +47 -47
- data/lib/minitest/full_runner.rb +105 -105
- data/lib/minitest/runner.rb +74 -74
- data/lib/not.rb +48 -48
- data/lib/or.rb +49 -49
- data/lib/require_sec_seiki.rb +2 -2
- data/lib/rice.rb +37 -37
- data/lib/romaji.rb +666 -666
- data/lib/saikoro.rb +17 -17
- data/lib/seiki.rb +12 -12
- data/lib/suihan.rb +40 -40
- data/lib/summa.rb +14 -14
- data/lib/tanraku.rb +156 -156
- data/lib/tenji.rb +4715 -4715
- data/lib/tenji_log.rb +4715 -4715
- data/lib/timestamp.py +61 -61
- data/lib/title.rb +16 -16
- data/lib/tubuyaki.rb +71 -71
- data/lib/tubuyaki_memo.rb +87 -87
- data/lib/tweet_cmd.rb +27 -27
- data/lib/version.rb +21 -19
- data/lib/zella.rb +46 -46
- data/req/aqua.rb +8 -8
- data/req/bmi.rb +6 -6
- data/req/frame.rb +7 -7
- data/req/full_run.rb +20 -20
- data/req/full_runner.rb +8 -8
- data/req/himekuri.rb +7 -7
- data/req/katakana.rb +7 -7
- data/req/koyomi.rb +6 -6
- data/req/mini_run.rb +20 -20
- data/req/romaji.rb +7 -7
- data/req/rubygems.rb +12 -12
- data/req/runner.rb +8 -8
- data/req/sheltered-girl.rb +7 -7
- data/req/speak.rb +19 -10
- data/req/zella.rb +4 -4
- data/runner/full.rb +57 -57
- data/runner/katakana.rb +110 -110
- data/runner/mini.rb +57 -57
- data/runner/romaji.rb +110 -110
- data/shell/romaji_runner_1.rb +669 -669
- data/shell/romaji_runner_10.rb +669 -669
- data/shell/romaji_runner_2.rb +669 -669
- data/shell/romaji_runner_3.rb +669 -669
- data/shell/romaji_runner_4.rb +669 -669
- data/shell/romaji_runner_5.rb +669 -669
- data/shell/romaji_runner_6.rb +669 -669
- data/shell/romaji_runner_7.rb +669 -669
- data/shell/romaji_runner_8.rb +669 -669
- data/shell/romaji_runner_9.rb +669 -669
- data/shell_ka/katakana_runner_1.rb +669 -669
- data/shell_ka/katakana_runner_10.rb +669 -669
- data/shell_ka/katakana_runner_2.rb +669 -669
- data/shell_ka/katakana_runner_3.rb +669 -669
- data/shell_ka/katakana_runner_4.rb +669 -669
- data/shell_ka/katakana_runner_5.rb +669 -669
- data/shell_ka/katakana_runner_6.rb +669 -669
- data/shell_ka/katakana_runner_7.rb +669 -669
- data/shell_ka/katakana_runner_8.rb +669 -669
- data/shell_ka/katakana_runner_9.rb +669 -669
- data/sheltered-girl.gemspec +46 -46
- data/wiki/README.md +69 -69
- metadata +1 -1
data/bin/tenji
CHANGED
@@ -1,43 +1,43 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
# vim: filetype=ruby
|
5
|
-
|
6
|
-
require 'timeout'
|
7
|
-
require 'bmi'
|
8
|
-
|
9
|
-
lib = File.expand_path('lib', __dir__)
|
10
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
11
|
-
|
12
|
-
encoding_style
|
13
|
-
|
14
|
-
# zinbeijett function
|
15
|
-
module Tenji
|
16
|
-
module_function
|
17
|
-
|
18
|
-
def to_tenji
|
19
|
-
require 'tenji'
|
20
|
-
TenjiMaker.to_tenji_a
|
21
|
-
TenjiMaker.to_tenji_b
|
22
|
-
TenjiMaker.to_tenji_g
|
23
|
-
TenjiMaker.to_tenji_d
|
24
|
-
TenjiMaker.to_tenji_e
|
25
|
-
TenjiMaker.to_tenji_z
|
26
|
-
TenjiMaker.to_tenji_t
|
27
|
-
TenjiMaker.to_tenji_c
|
28
|
-
TenjiMaker.to_tenji_i
|
29
|
-
TenjiMaker.to_tenji_k
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
include Tenji
|
34
|
-
|
35
|
-
begin
|
36
|
-
to_tenji
|
37
|
-
rescue Exception => e
|
38
|
-
#puts e.backtrace
|
39
|
-
ensure
|
40
|
-
GC.compact
|
41
|
-
end
|
42
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# vim: filetype=ruby
|
5
|
+
|
6
|
+
require 'timeout'
|
7
|
+
require 'bmi'
|
8
|
+
|
9
|
+
lib = File.expand_path('lib', __dir__)
|
10
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
11
|
+
|
12
|
+
encoding_style
|
13
|
+
|
14
|
+
# zinbeijett function
|
15
|
+
module Tenji
|
16
|
+
module_function
|
17
|
+
|
18
|
+
def to_tenji
|
19
|
+
require 'tenji'
|
20
|
+
TenjiMaker.to_tenji_a
|
21
|
+
TenjiMaker.to_tenji_b
|
22
|
+
TenjiMaker.to_tenji_g
|
23
|
+
TenjiMaker.to_tenji_d
|
24
|
+
TenjiMaker.to_tenji_e
|
25
|
+
TenjiMaker.to_tenji_z
|
26
|
+
TenjiMaker.to_tenji_t
|
27
|
+
TenjiMaker.to_tenji_c
|
28
|
+
TenjiMaker.to_tenji_i
|
29
|
+
TenjiMaker.to_tenji_k
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
include Tenji
|
34
|
+
|
35
|
+
begin
|
36
|
+
to_tenji
|
37
|
+
rescue Exception => e
|
38
|
+
#puts e.backtrace
|
39
|
+
ensure
|
40
|
+
GC.compact
|
41
|
+
end
|
42
|
+
|
43
43
|
__END__
|
data/bin/tenji_log
CHANGED
@@ -1,43 +1,43 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
# vim: filetype=ruby
|
5
|
-
|
6
|
-
require 'timeout'
|
7
|
-
require 'bmi'
|
8
|
-
|
9
|
-
lib = File.expand_path('lib', __dir__)
|
10
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
11
|
-
|
12
|
-
encoding_style
|
13
|
-
|
14
|
-
# zinbeijett function
|
15
|
-
module Tenji
|
16
|
-
module_function
|
17
|
-
|
18
|
-
def to_tenji
|
19
|
-
require 'tenji_log'
|
20
|
-
TenjiMaker.to_tenji_a
|
21
|
-
TenjiMaker.to_tenji_b
|
22
|
-
TenjiMaker.to_tenji_g
|
23
|
-
TenjiMaker.to_tenji_d
|
24
|
-
TenjiMaker.to_tenji_e
|
25
|
-
TenjiMaker.to_tenji_z
|
26
|
-
TenjiMaker.to_tenji_t
|
27
|
-
TenjiMaker.to_tenji_c
|
28
|
-
TenjiMaker.to_tenji_i
|
29
|
-
TenjiMaker.to_tenji_k
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
include Tenji
|
34
|
-
|
35
|
-
begin
|
36
|
-
to_tenji
|
37
|
-
rescue Exception => e
|
38
|
-
#puts e.backtrace
|
39
|
-
ensure
|
40
|
-
GC.compact
|
41
|
-
end
|
42
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# vim: filetype=ruby
|
5
|
+
|
6
|
+
require 'timeout'
|
7
|
+
require 'bmi'
|
8
|
+
|
9
|
+
lib = File.expand_path('lib', __dir__)
|
10
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
11
|
+
|
12
|
+
encoding_style
|
13
|
+
|
14
|
+
# zinbeijett function
|
15
|
+
module Tenji
|
16
|
+
module_function
|
17
|
+
|
18
|
+
def to_tenji
|
19
|
+
require 'tenji_log'
|
20
|
+
TenjiMaker.to_tenji_a
|
21
|
+
TenjiMaker.to_tenji_b
|
22
|
+
TenjiMaker.to_tenji_g
|
23
|
+
TenjiMaker.to_tenji_d
|
24
|
+
TenjiMaker.to_tenji_e
|
25
|
+
TenjiMaker.to_tenji_z
|
26
|
+
TenjiMaker.to_tenji_t
|
27
|
+
TenjiMaker.to_tenji_c
|
28
|
+
TenjiMaker.to_tenji_i
|
29
|
+
TenjiMaker.to_tenji_k
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
include Tenji
|
34
|
+
|
35
|
+
begin
|
36
|
+
to_tenji
|
37
|
+
rescue Exception => e
|
38
|
+
#puts e.backtrace
|
39
|
+
ensure
|
40
|
+
GC.compact
|
41
|
+
end
|
42
|
+
|
43
43
|
__END__
|
data/bin/tweet
CHANGED
@@ -1,79 +1,79 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
# vim: filetype=ruby
|
4
|
-
|
5
|
-
require 'tk'
|
6
|
-
require 'twitter'
|
7
|
-
require 'kconv'
|
8
|
-
require 'yaml'
|
9
|
-
|
10
|
-
Settings = YAML.load_file("#{Dir.home}/yml/setting.yml")
|
11
|
-
|
12
|
-
client = Twitter::REST::Client.new do |config|
|
13
|
-
config.consumer_key = Settings['consumer_key']
|
14
|
-
config.consumer_secret = Settings['consumer_secret']
|
15
|
-
config.access_token = Settings['access_token']
|
16
|
-
config.access_token_secret = Settings['access_token_secret']
|
17
|
-
end
|
18
|
-
|
19
|
-
window = TkRoot.new do
|
20
|
-
title 'Twitter_Tubuyaki'
|
21
|
-
resizable [0, 0]
|
22
|
-
end
|
23
|
-
|
24
|
-
window1 = TkToplevel.new do
|
25
|
-
title 'Twitter Tweet parts.'
|
26
|
-
end
|
27
|
-
|
28
|
-
TkLabel.new(nil,
|
29
|
-
:text => 'Twitter Tweet ...',
|
30
|
-
:fg => 'green').pack
|
31
|
-
|
32
|
-
entry = TkEntry.new.pack('side' => 'left')
|
33
|
-
|
34
|
-
c = TkButton.new(:text => '投稿する').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
35
|
-
|
36
|
-
c.command proc {
|
37
|
-
saikoro = Random.rand(6)
|
38
|
-
|
39
|
-
case saikoro
|
40
|
-
|
41
|
-
when 4
|
42
|
-
TkLabel.new(window1,
|
43
|
-
:text => client.update(entry.value.to_s.toutf8),
|
44
|
-
:fg => 'white',
|
45
|
-
:bg => 'blue').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
46
|
-
when 3
|
47
|
-
TkLabel.new(window1,
|
48
|
-
:text => client.update(entry.value.to_s.toutf8),
|
49
|
-
:fg => 'black',
|
50
|
-
:bg => 'yellow').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
51
|
-
when 2
|
52
|
-
TkLabel.new(window1,
|
53
|
-
:text => client.update(entry.value.to_s.toutf8),
|
54
|
-
:fg => 'black',
|
55
|
-
:bg => 'white').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
56
|
-
when 1
|
57
|
-
TkLabel.new(window1,
|
58
|
-
:text => client.update(entry.value.to_s.toutf8),
|
59
|
-
:fg => 'white',
|
60
|
-
:bg => 'black').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
61
|
-
when 0
|
62
|
-
TkLabel.new(window1,
|
63
|
-
:text => client.update(entry.value.to_s.toutf8),
|
64
|
-
:fg => 'black',
|
65
|
-
:bg => 'green').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
66
|
-
else
|
67
|
-
TkLabel.new(window1,
|
68
|
-
:text => client.update(entry.value.to_s.toutf8),
|
69
|
-
:fg => 'white',
|
70
|
-
:bg => 'red').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
71
|
-
end
|
72
|
-
}
|
73
|
-
|
74
|
-
TkLabel.new(window1,
|
75
|
-
:text => ("アカウント名 : @#{client.user.screen_name} \n".toutf8 + "Twitter ユーザ名 : #{client.user.name} \n".toutf8 + "プロフィール : #{client.user.description} \n".toutf8 + "Twitterでつぶやいた総数 : #{client.user.tweets_count} ".toutf8),
|
76
|
-
:fg => 'green',
|
77
|
-
:bg => 'blue').pack
|
78
|
-
|
79
|
-
Tk.mainloop
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
# vim: filetype=ruby
|
4
|
+
|
5
|
+
require 'tk'
|
6
|
+
require 'twitter'
|
7
|
+
require 'kconv'
|
8
|
+
require 'yaml'
|
9
|
+
|
10
|
+
Settings = YAML.load_file("#{Dir.home}/yml/setting.yml")
|
11
|
+
|
12
|
+
client = Twitter::REST::Client.new do |config|
|
13
|
+
config.consumer_key = Settings['consumer_key']
|
14
|
+
config.consumer_secret = Settings['consumer_secret']
|
15
|
+
config.access_token = Settings['access_token']
|
16
|
+
config.access_token_secret = Settings['access_token_secret']
|
17
|
+
end
|
18
|
+
|
19
|
+
window = TkRoot.new do
|
20
|
+
title 'Twitter_Tubuyaki'
|
21
|
+
resizable [0, 0]
|
22
|
+
end
|
23
|
+
|
24
|
+
window1 = TkToplevel.new do
|
25
|
+
title 'Twitter Tweet parts.'
|
26
|
+
end
|
27
|
+
|
28
|
+
TkLabel.new(nil,
|
29
|
+
:text => 'Twitter Tweet ...',
|
30
|
+
:fg => 'green').pack
|
31
|
+
|
32
|
+
entry = TkEntry.new.pack('side' => 'left')
|
33
|
+
|
34
|
+
c = TkButton.new(:text => '投稿する').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
35
|
+
|
36
|
+
c.command proc {
|
37
|
+
saikoro = Random.rand(6)
|
38
|
+
|
39
|
+
case saikoro
|
40
|
+
|
41
|
+
when 4
|
42
|
+
TkLabel.new(window1,
|
43
|
+
:text => client.update(entry.value.to_s.toutf8),
|
44
|
+
:fg => 'white',
|
45
|
+
:bg => 'blue').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
46
|
+
when 3
|
47
|
+
TkLabel.new(window1,
|
48
|
+
:text => client.update(entry.value.to_s.toutf8),
|
49
|
+
:fg => 'black',
|
50
|
+
:bg => 'yellow').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
51
|
+
when 2
|
52
|
+
TkLabel.new(window1,
|
53
|
+
:text => client.update(entry.value.to_s.toutf8),
|
54
|
+
:fg => 'black',
|
55
|
+
:bg => 'white').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
56
|
+
when 1
|
57
|
+
TkLabel.new(window1,
|
58
|
+
:text => client.update(entry.value.to_s.toutf8),
|
59
|
+
:fg => 'white',
|
60
|
+
:bg => 'black').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
61
|
+
when 0
|
62
|
+
TkLabel.new(window1,
|
63
|
+
:text => client.update(entry.value.to_s.toutf8),
|
64
|
+
:fg => 'black',
|
65
|
+
:bg => 'green').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
66
|
+
else
|
67
|
+
TkLabel.new(window1,
|
68
|
+
:text => client.update(entry.value.to_s.toutf8),
|
69
|
+
:fg => 'white',
|
70
|
+
:bg => 'red').pack('fill' => 'x', 'padx' => 2.5, 'pady' => 2.5)
|
71
|
+
end
|
72
|
+
}
|
73
|
+
|
74
|
+
TkLabel.new(window1,
|
75
|
+
:text => ("アカウント名 : @#{client.user.screen_name} \n".toutf8 + "Twitter ユーザ名 : #{client.user.name} \n".toutf8 + "プロフィール : #{client.user.description} \n".toutf8 + "Twitterでつぶやいた総数 : #{client.user.tweets_count} ".toutf8),
|
76
|
+
:fg => 'green',
|
77
|
+
:bg => 'blue').pack
|
78
|
+
|
79
|
+
Tk.mainloop
|
data/lib/all.rb
CHANGED
@@ -1,45 +1,45 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'require_sec_seiki'
|
4
|
-
require 'bmi'
|
5
|
-
|
6
|
-
# All search loads.
|
7
|
-
module All
|
8
|
-
module_function
|
9
|
-
|
10
|
-
def search
|
11
|
-
encoding_style
|
12
|
-
|
13
|
-
one = ARGV[1]
|
14
|
-
|
15
|
-
File.open(one) do |f|
|
16
|
-
while (str2 = f.gets)
|
17
|
-
str = str2.chomp!
|
18
|
-
twice = ARGV[2]
|
19
|
-
three_act = /#{twice}/o
|
20
|
-
ext = 'else文には到達しないはずです!'
|
21
|
-
|
22
|
-
begin
|
23
|
-
str =~ three_act ? printf("%2d : %s\n", f.lineno, str) : ext
|
24
|
-
rescue Timeout::Error
|
25
|
-
exit!
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
if f.eof?
|
30
|
-
f.close
|
31
|
-
elsif !f.eof
|
32
|
-
begin
|
33
|
-
raise All
|
34
|
-
rescue StandardError => ee
|
35
|
-
puts ee.backtrace
|
36
|
-
puts ee.backtrace_locations
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
GC.compact
|
44
|
-
|
45
|
-
__END__
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'require_sec_seiki'
|
4
|
+
require 'bmi'
|
5
|
+
|
6
|
+
# All search loads.
|
7
|
+
module All
|
8
|
+
module_function
|
9
|
+
|
10
|
+
def search
|
11
|
+
encoding_style
|
12
|
+
|
13
|
+
one = ARGV[1]
|
14
|
+
|
15
|
+
File.open(one) do |f|
|
16
|
+
while (str2 = f.gets)
|
17
|
+
str = str2.chomp!
|
18
|
+
twice = ARGV[2]
|
19
|
+
three_act = /#{twice}/o
|
20
|
+
ext = 'else文には到達しないはずです!'
|
21
|
+
|
22
|
+
begin
|
23
|
+
str =~ three_act ? printf("%2d : %s\n", f.lineno, str) : ext
|
24
|
+
rescue Timeout::Error
|
25
|
+
exit!
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
if f.eof?
|
30
|
+
f.close
|
31
|
+
elsif !f.eof
|
32
|
+
begin
|
33
|
+
raise All
|
34
|
+
rescue StandardError => ee
|
35
|
+
puts ee.backtrace
|
36
|
+
puts ee.backtrace_locations
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
GC.compact
|
44
|
+
|
45
|
+
__END__
|
data/lib/all_log.rb
CHANGED
@@ -1,51 +1,51 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'require_sec_seiki'
|
4
|
-
require 'bmi'
|
5
|
-
|
6
|
-
Dir.mkdir('log', perm = 0o777) unless FileTest.exist?('log')
|
7
|
-
|
8
|
-
# match search loads.
|
9
|
-
module Mat
|
10
|
-
module_function
|
11
|
-
|
12
|
-
def search
|
13
|
-
encoding_style
|
14
|
-
|
15
|
-
one = ARGV[1]
|
16
|
-
File.open(one) do |f|
|
17
|
-
while (str2 = f.gets)
|
18
|
-
str = str2.chomp!
|
19
|
-
twice = ARGV[2]
|
20
|
-
three_act = /#{twice}/o
|
21
|
-
|
22
|
-
begin
|
23
|
-
File.open('log/output.txt', 'a:utf-8', perm = 0o777) do |fi|
|
24
|
-
if str.match(three_act) || {}[:match]
|
25
|
-
fi.puts(str)
|
26
|
-
printf('%2d : %s', f.lineno, str)
|
27
|
-
puts ''
|
28
|
-
end
|
29
|
-
end
|
30
|
-
rescue Timeout::Error
|
31
|
-
exit!
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
if f.eof?
|
36
|
-
f.close
|
37
|
-
elsif !f.eof
|
38
|
-
begin
|
39
|
-
raise All
|
40
|
-
rescue StandardError => e
|
41
|
-
puts e.backtrace
|
42
|
-
puts e.backtrace_locations
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
GC.compact
|
50
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'require_sec_seiki'
|
4
|
+
require 'bmi'
|
5
|
+
|
6
|
+
Dir.mkdir('log', perm = 0o777) unless FileTest.exist?('log')
|
7
|
+
|
8
|
+
# match search loads.
|
9
|
+
module Mat
|
10
|
+
module_function
|
11
|
+
|
12
|
+
def search
|
13
|
+
encoding_style
|
14
|
+
|
15
|
+
one = ARGV[1]
|
16
|
+
File.open(one) do |f|
|
17
|
+
while (str2 = f.gets)
|
18
|
+
str = str2.chomp!
|
19
|
+
twice = ARGV[2]
|
20
|
+
three_act = /#{twice}/o
|
21
|
+
|
22
|
+
begin
|
23
|
+
File.open('log/output.txt', 'a:utf-8', perm = 0o777) do |fi|
|
24
|
+
if str.match(three_act) || {}[:match]
|
25
|
+
fi.puts(str)
|
26
|
+
printf('%2d : %s', f.lineno, str)
|
27
|
+
puts ''
|
28
|
+
end
|
29
|
+
end
|
30
|
+
rescue Timeout::Error
|
31
|
+
exit!
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
if f.eof?
|
36
|
+
f.close
|
37
|
+
elsif !f.eof
|
38
|
+
begin
|
39
|
+
raise All
|
40
|
+
rescue StandardError => e
|
41
|
+
puts e.backtrace
|
42
|
+
puts e.backtrace_locations
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
GC.compact
|
50
|
+
|
51
51
|
__END__
|
data/lib/and.rb
CHANGED
@@ -1,48 +1,48 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'require_sec_seiki'
|
4
|
-
require 'bmi'
|
5
|
-
|
6
|
-
# And Search loads.
|
7
|
-
module And
|
8
|
-
module_function
|
9
|
-
|
10
|
-
def search
|
11
|
-
encoding_style
|
12
|
-
|
13
|
-
one = ARGV[1]
|
14
|
-
|
15
|
-
File.open(one) do |f|
|
16
|
-
while (str2 = f.gets)
|
17
|
-
str = str2.chomp!
|
18
|
-
twice = ARGV[2]
|
19
|
-
three_act2 = /^(?=.*#{twice})/o
|
20
|
-
|
21
|
-
begin
|
22
|
-
if str =~ three_act2
|
23
|
-
printf('%2d : %s', f.lineno, str)
|
24
|
-
puts ''
|
25
|
-
end
|
26
|
-
rescue Timeout::Error
|
27
|
-
exit!
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
if f.eof?
|
32
|
-
f.close
|
33
|
-
elsif !f.eof
|
34
|
-
begin
|
35
|
-
raise And
|
36
|
-
rescue StandardError => ee
|
37
|
-
puts ee.backtrace
|
38
|
-
puts ee.backtrace_locations
|
39
|
-
exit!
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
GC.compact
|
47
|
-
|
48
|
-
__END__
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'require_sec_seiki'
|
4
|
+
require 'bmi'
|
5
|
+
|
6
|
+
# And Search loads.
|
7
|
+
module And
|
8
|
+
module_function
|
9
|
+
|
10
|
+
def search
|
11
|
+
encoding_style
|
12
|
+
|
13
|
+
one = ARGV[1]
|
14
|
+
|
15
|
+
File.open(one) do |f|
|
16
|
+
while (str2 = f.gets)
|
17
|
+
str = str2.chomp!
|
18
|
+
twice = ARGV[2]
|
19
|
+
three_act2 = /^(?=.*#{twice})/o
|
20
|
+
|
21
|
+
begin
|
22
|
+
if str =~ three_act2
|
23
|
+
printf('%2d : %s', f.lineno, str)
|
24
|
+
puts ''
|
25
|
+
end
|
26
|
+
rescue Timeout::Error
|
27
|
+
exit!
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
if f.eof?
|
32
|
+
f.close
|
33
|
+
elsif !f.eof
|
34
|
+
begin
|
35
|
+
raise And
|
36
|
+
rescue StandardError => ee
|
37
|
+
puts ee.backtrace
|
38
|
+
puts ee.backtrace_locations
|
39
|
+
exit!
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
GC.compact
|
47
|
+
|
48
|
+
__END__
|
data/lib/autocal.rb
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
require 'date'
|
2
|
-
require 'pycall/import'
|
3
|
-
include PyCall::Import
|
4
|
-
require 'bmi'
|
5
|
-
|
6
|
-
module Auto
|
7
|
-
module_function
|
8
|
-
|
9
|
-
def view
|
10
|
-
encoding_style
|
11
|
-
|
12
|
-
yr = ARGV[1]
|
13
|
-
mh = ARGV[2]
|
14
|
-
pyimport :calendar
|
15
|
-
puts (calendar.month(yr.to_i,mh.to_i))
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
GC.compact
|
20
|
-
|
21
|
-
__END__
|
1
|
+
require 'date'
|
2
|
+
require 'pycall/import'
|
3
|
+
include PyCall::Import
|
4
|
+
require 'bmi'
|
5
|
+
|
6
|
+
module Auto
|
7
|
+
module_function
|
8
|
+
|
9
|
+
def view
|
10
|
+
encoding_style
|
11
|
+
|
12
|
+
yr = ARGV[1]
|
13
|
+
mh = ARGV[2]
|
14
|
+
pyimport :calendar
|
15
|
+
puts (calendar.month(yr.to_i,mh.to_i))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
GC.compact
|
20
|
+
|
21
|
+
__END__
|