imagetools 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a27626f9fa56e75b65761b2144b1305ed25edd892b1bbfcd10807b199d3f6a19
4
- data.tar.gz: 4a359005ed0cef5b0705637fad3a98f487924819159cfec45dbba57f59055525
3
+ metadata.gz: bfac86e4f981cac7a5315792851b00929b4d36d7d85ce42d3e09d6e9acfeb91b
4
+ data.tar.gz: bc72a7079d91f6fa31503d9bf6ed04cc4fd82b078a5d53eb5c03b3cd450432d0
5
5
  SHA512:
6
- metadata.gz: 07b1595e3f58b96c3614e1fa0c65f96efb00e13a90f3fe8dcd3ae5b65c4e537ee8e4ad03244797805776c4364b2b39505b0276f138f809be020b6dcd0f39b175
7
- data.tar.gz: 647150aa2b37e10d8eb653b1f709a7a9dd0d3373805c4be7b1b1b8ffa124642b92f309e61cf8cd2b545b0592352d7380d2c86ce4761eb7f7fc0a45e506bbbb93
6
+ metadata.gz: 158b2146ff16f2db7185b409784c168a28a71df3ba2146e890c1a77185fecc6d41ac6ef8488f76984b701b3a06414a447e23f066c0f7071e34d5830c9ecfb934
7
+ data.tar.gz: 9c43a8f7a4dedd66c6e4ca1a3be412e799cb2dde18c3ae7916899e114305009a154e506dddf7483603051a065450a8c86b119950a40c806e42db759367e127aa
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- imagetools (0.6.0)
4
+ imagetools (0.7.0)
5
5
  rmagick
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -25,6 +25,10 @@ PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig gem imagetools
25
25
 
26
26
  ### iconcreator
27
27
 
28
+ iconcreator is command line to genelete ios app icons.
29
+
30
+ Xcode Version 9.2 AppIcon.
31
+
28
32
  ![AppIcon](appicon.png)
29
33
 
30
34
  ```
data/appicon.png CHANGED
Binary file
data/exe/imageburst ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'imagetools/imageburst'
4
+
5
+ Imagetools::Imageburst.run(ARGV)
@@ -0,0 +1,82 @@
1
+ # coding: utf-8
2
+
3
+ require 'imagetools/version'
4
+ require 'optparse'
5
+
6
+ module Imagetools
7
+ class Imageburst
8
+
9
+ BASE_FOLDER = "~/Documents/capture"
10
+ DEFAULAT_TIME = 180
11
+
12
+ def self.run(argv)
13
+ STDOUT.sync = true
14
+ opts = {}
15
+ opt = OptionParser.new(argv)
16
+ opt.version = VERSION
17
+ opt.banner = "Usage: #{opt.program_name} [-h|--help] args"
18
+ opt.separator('')
19
+ opt.separator('Options:')
20
+ opt.on_head('-h', '--help', 'Show this message') do |v|
21
+ puts opt.help
22
+ exit
23
+ end
24
+ opt.on('-v', '--verbose', 'Verbose message') {|v| opts[:v] = v}
25
+ opt.on('-p PREFIX', '--prefix PREFIX', 'Capture file prefix.') {|v| opts[:p] = v}
26
+ opt.on('-D DISPLAY', '--display DISPLAY', Integer, 'Capture from the display specified. -D 1 is main display, -D 2 secondary, etc.') {|v| opts[:d] = v}
27
+ opt.on('-t TIME', '--time TIME', Integer, 'Recording time.') {|v| opts[:t] = v}
28
+ opt.parse!(argv)
29
+ cmd = Imageburst.new(opts)
30
+ cmd.run
31
+ end
32
+
33
+ def initialize(opts)
34
+ @opts = opts
35
+ end
36
+
37
+ def run
38
+ # 撮影時間
39
+ time = DEFAULAT_TIME
40
+ if @opts[:t]
41
+ time = @opts[:t]
42
+ end
43
+
44
+ # prefixの決定
45
+ prefix = Time.now.strftime("%Y%m%d_%H%M%S")
46
+ if @opts[:p]
47
+ prefix = @opts[:p]
48
+ end
49
+
50
+ # ディスプレイの設定
51
+ display = ''
52
+ if @opts[:d]
53
+ display = "-D#{@opts[:d]}"
54
+ end
55
+
56
+ # 現在時刻
57
+ current = Time.now
58
+ # 終了時間
59
+ finish = current + time
60
+
61
+ # 保存フォルダ(ベースフォルダの下に現在日付のフォルダを作成しその下に保存)
62
+ # session = Time.now.strftime("%Y%m%d_%H%M%S")
63
+ folder = File.expand_path(File.join(BASE_FOLDER, prefix))
64
+ if FileTest.directory?(folder)
65
+ puts "Output folder already exists: #{folder}"
66
+ exit(1)
67
+ end
68
+ Dir.mkdir(folder)
69
+
70
+ while current < finish
71
+ current = Time.now
72
+ name = current.strftime("%s_%6N.jpg")
73
+
74
+ path = File.join(folder, name)
75
+ cmd = "screencapture #{display} #{path}"
76
+ puts cmd
77
+ system(cmd)
78
+ end
79
+
80
+ end
81
+ end
82
+ end
@@ -1,3 +1,3 @@
1
1
  module Imagetools
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+ bundle exec ruby exe/imageburst "$@"
3
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imagetools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - src
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-10 00:00:00.000000000 Z
11
+ date: 2018-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rmagick
@@ -72,6 +72,7 @@ email:
72
72
  executables:
73
73
  - iconcreator
74
74
  - iconextractor
75
+ - imageburst
75
76
  - imageconcat
76
77
  - imagefilter
77
78
  - imageresizer
@@ -101,6 +102,7 @@ files:
101
102
  - build.sh
102
103
  - exe/iconcreator
103
104
  - exe/iconextractor
105
+ - exe/imageburst
104
106
  - exe/imageconcat
105
107
  - exe/imagefilter
106
108
  - exe/imageresizer
@@ -111,6 +113,7 @@ files:
111
113
  - lib/imagetools.rb
112
114
  - lib/imagetools/iconcreator.rb
113
115
  - lib/imagetools/iconextractor.rb
116
+ - lib/imagetools/imageburst.rb
114
117
  - lib/imagetools/imageconcat.rb
115
118
  - lib/imagetools/imagefilter.rb
116
119
  - lib/imagetools/imageresizer.rb
@@ -145,6 +148,7 @@ files:
145
148
  - test.sh
146
149
  - test_iconcreator.sh
147
150
  - test_iconextractor.sh
151
+ - test_imageburst.sh
148
152
  - test_imageconcat.sh
149
153
  - test_imagefilter.sh
150
154
  - test_imageresizer.sh