hikiutils 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hikiutils/version.rb +1 -1
- data/lib/templates/Rakefile_hiki_sync +13 -8
- data/lib/templates/hiki_help.yml +66 -29
- metadata +2 -3
- data/lib/templates/hik_help.yml +0 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 820810ad85670c7d8df9779f1edb5aeb2fbedacf
|
4
|
+
data.tar.gz: 143d10e7ff4d9682e6bceba891e4a0587587b886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4d4607ef5a7cba3b13b98dad2f13e37fb3ce595dfff9a820197ac30fad3ab63639556318d2792c65e16ad01ae09ee7ef69bf4f03726bb45d10b6df057e6f4d6
|
7
|
+
data.tar.gz: 19af682ceb930e1f6a63c3d0ea59c8eb13113f1d049e05bfeeedafca397d77b7327cb83407ec551efc1fe283ef1540a3e0b852226868bc86574430f4987c2dd5
|
data/lib/hikiutils/version.rb
CHANGED
@@ -10,13 +10,17 @@ task :default do
|
|
10
10
|
system 'rake -T'
|
11
11
|
end
|
12
12
|
|
13
|
-
desc "convert fig size"
|
13
|
+
desc "convert fig size SCALE TARGET_DIR"
|
14
14
|
task :convert do
|
15
|
-
source = ARGV[2]
|
16
15
|
scale = ARGV[1]
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
target_dir=ARGV[2]
|
17
|
+
Dir.entries(target_dir)[2..-1].each{|file|
|
18
|
+
p file
|
19
|
+
source = File.join(target_dir,file)
|
20
|
+
target = File.join('figs',file)
|
21
|
+
p command = "convert #{source} -resize #{scale}\% #{target}"
|
22
|
+
system command
|
23
|
+
}
|
20
24
|
exit
|
21
25
|
end
|
22
26
|
|
@@ -34,9 +38,10 @@ task :sync do
|
|
34
38
|
FileUtils.cp(source,target,:verbose=>true)
|
35
39
|
}
|
36
40
|
p entries=Dir.entries('./figs') #cp files in figs
|
41
|
+
p target = File.join(target_dir,'cache','attach',basename)
|
42
|
+
FileUtils.mkdir(target,:verbose=>true) unless File.exists?(target)
|
37
43
|
entries[2..-1].each{|file|
|
38
44
|
p source = File.join('./figs',file)
|
39
|
-
p target = File.join(target_dir,'cache','attach',basename)
|
40
45
|
FileUtils.cp(source,target,:verbose=>true)
|
41
46
|
}
|
42
47
|
exit
|
@@ -46,13 +51,13 @@ desc "For hiki Errno::ENOENT, Errno::EACCES"
|
|
46
51
|
task :chenv do
|
47
52
|
p user = ENV['USER']
|
48
53
|
system("sudo chmod -R a+w #{target_dir}")
|
49
|
-
system("sudo chown -R #{user} #{target_dir}")
|
54
|
+
# system("sudo chown -R #{user} #{target_dir}")
|
50
55
|
end
|
51
56
|
|
52
57
|
desc "self copy to hikiutils template directory"
|
53
58
|
task :self_copy do
|
54
59
|
p cp_files=[['Rakefile','Rakefile_hiki_sync'],
|
55
|
-
[File.join(ENV['HOME'],'.my_help','hiki_help.yml'),'
|
60
|
+
[File.join(ENV['HOME'],'.my_help','hiki_help.yml'),'hiki_help.yml']]
|
56
61
|
cp_files.each{|files|
|
57
62
|
p source = File.join(Dir.pwd,'Rakefile')
|
58
63
|
p target = File.join('/Users/bob/Github/hikiutils/lib/templates/',files[1])
|
data/lib/templates/hiki_help.yml
CHANGED
@@ -1,29 +1,66 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
'
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
1
|
+
begin
|
2
|
+
target_dir = File.readlines('./.hikirc')[0].chomp
|
3
|
+
rescue => e
|
4
|
+
puts e
|
5
|
+
exit
|
6
|
+
end
|
7
|
+
p target_dir
|
8
|
+
|
9
|
+
task :default do
|
10
|
+
system 'rake -T'
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "convert fig size SCALE TARGET_DIR"
|
14
|
+
task :convert do
|
15
|
+
scale = ARGV[1]
|
16
|
+
target_dir=ARGV[2]
|
17
|
+
Dir.entries(target_dir)[2..-1].each{|file|
|
18
|
+
p file
|
19
|
+
source = File.join(target_dir,file)
|
20
|
+
target = File.join('figs',file)
|
21
|
+
p command = "convert #{source} -resize #{scale}\% #{target}"
|
22
|
+
system command
|
23
|
+
}
|
24
|
+
exit
|
25
|
+
end
|
26
|
+
|
27
|
+
desc "sync hikis and figs to hiki directory"
|
28
|
+
task :sync do
|
29
|
+
p dirnames=Dir.pwd.split('/')
|
30
|
+
p basename = (dirnames[-1]=='hikis')? dirnames[-2] : dirnames[-1]
|
31
|
+
p entries=Dir.entries('.')
|
32
|
+
entries[2..-1].each{|source| #cp *.hiki
|
33
|
+
next unless source.include?('.hiki')
|
34
|
+
next if source.include?('.hikirc')
|
35
|
+
p base = source.split('.')[0]
|
36
|
+
name = (base==basename)? base : basename+'_'+base
|
37
|
+
p target = File.join(target_dir,'text',name)
|
38
|
+
FileUtils.cp(source,target,:verbose=>true)
|
39
|
+
}
|
40
|
+
p entries=Dir.entries('./figs') #cp files in figs
|
41
|
+
p target = File.join(target_dir,'cache','attach',basename)
|
42
|
+
FileUtils.mkdir(target,:verbose=>true) unless File.exists?(target)
|
43
|
+
entries[2..-1].each{|file|
|
44
|
+
p source = File.join('./figs',file)
|
45
|
+
FileUtils.cp(source,target,:verbose=>true)
|
46
|
+
}
|
47
|
+
exit
|
48
|
+
end
|
49
|
+
|
50
|
+
desc "For hiki Errno::ENOENT, Errno::EACCES"
|
51
|
+
task :chenv do
|
52
|
+
p user = ENV['USER']
|
53
|
+
system("sudo chmod -R a+w #{target_dir}")
|
54
|
+
# system("sudo chown -R #{user} #{target_dir}")
|
55
|
+
end
|
56
|
+
|
57
|
+
desc "self copy to hikiutils template directory"
|
58
|
+
task :self_copy do
|
59
|
+
p cp_files=[['Rakefile','Rakefile_hiki_sync'],
|
60
|
+
[File.join(ENV['HOME'],'.my_help','hiki_help.yml'),'hiki_help.yml']]
|
61
|
+
cp_files.each{|files|
|
62
|
+
p source = File.join(Dir.pwd,'Rakefile')
|
63
|
+
p target = File.join('/Users/bob/Github/hikiutils/lib/templates/',files[1])
|
64
|
+
FileUtils.cp(source,target,:verbose=>true)
|
65
|
+
}
|
66
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hikiutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
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: 2017-01-
|
11
|
+
date: 2017-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -235,7 +235,6 @@ files:
|
|
235
235
|
- lib/hikiutils/tmarshal.rb
|
236
236
|
- lib/hikiutils/version.rb
|
237
237
|
- lib/templates/Rakefile_hiki_sync
|
238
|
-
- lib/templates/hik_help.yml
|
239
238
|
- lib/templates/hiki_help.yml
|
240
239
|
homepage: http://github.org/daddygongon/hikiutils
|
241
240
|
licenses:
|
data/lib/templates/hik_help.yml
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
target_dir = File.readlines('./.hikirc')[0].chomp
|
3
|
-
rescue => e
|
4
|
-
puts e
|
5
|
-
exit
|
6
|
-
end
|
7
|
-
p target_dir
|
8
|
-
|
9
|
-
task :default do
|
10
|
-
system 'rake -T'
|
11
|
-
end
|
12
|
-
|
13
|
-
desc "convert fig size"
|
14
|
-
task :convert do
|
15
|
-
source = ARGV[2]
|
16
|
-
scale = ARGV[1]
|
17
|
-
target = File.join('figs',source)
|
18
|
-
p command = "convert #{source} -resize #{scale}\% #{target}"
|
19
|
-
system command
|
20
|
-
exit
|
21
|
-
end
|
22
|
-
|
23
|
-
desc "sync hikis and figs to hiki directory"
|
24
|
-
task :sync do
|
25
|
-
p dirnames=Dir.pwd.split('/')
|
26
|
-
p basename = (dirnames[-1]=='hikis')? dirnames[-2] : dirnames[-1]
|
27
|
-
p entries=Dir.entries('.')
|
28
|
-
entries[2..-1].each{|source| #cp *.hiki
|
29
|
-
next unless source.include?('.hiki')
|
30
|
-
next if source.include?('.hikirc')
|
31
|
-
p base = source.split('.')[0]
|
32
|
-
name = (base==basename)? base : basename+'_'+base
|
33
|
-
p target = File.join(target_dir,'text',name)
|
34
|
-
FileUtils.cp(source,target,:verbose=>true)
|
35
|
-
}
|
36
|
-
p entries=Dir.entries('./figs') #cp files in figs
|
37
|
-
entries[2..-1].each{|file|
|
38
|
-
p source = File.join('./figs',file)
|
39
|
-
p target = File.join(target_dir,'cache','attach',basename)
|
40
|
-
FileUtils.cp(source,target,:verbose=>true)
|
41
|
-
}
|
42
|
-
exit
|
43
|
-
end
|
44
|
-
|
45
|
-
desc "For hiki Errno::ENOENT, Errno::EACCES"
|
46
|
-
task :chenv do
|
47
|
-
p user = ENV['USER']
|
48
|
-
system("sudo chmod -R a+w #{target_dir}")
|
49
|
-
system("sudo chown -R #{user} #{target_dir}")
|
50
|
-
end
|
51
|
-
|
52
|
-
desc "self copy to hikiutils template directory"
|
53
|
-
task :self_copy do
|
54
|
-
p cp_files=[['Rakefile','Rakefile_hiki_sync'],
|
55
|
-
[File.join(ENV['HOME'],'.my_help','hiki_help.yml'),'hik_help.yml']]
|
56
|
-
cp_files.each{|files|
|
57
|
-
p source = File.join(Dir.pwd,'Rakefile')
|
58
|
-
p target = File.join('/Users/bob/Github/hikiutils/lib/templates/',files[1])
|
59
|
-
FileUtils.cp(source,target,:verbose=>true)
|
60
|
-
}
|
61
|
-
end
|