iconCreater 0.2.6 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/workspace.xml +38 -38
- data/README.md +15 -21
- data/iconCreater.gemspec +1 -1
- data/lib/iconCreater.rb +1 -0
- data/lib/iconCreater/create.rb +2 -11
- data/lib/iconCreater/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d164d24283b2dd2b020bd010b7f66248dc68fc79
|
4
|
+
data.tar.gz: 19161b47dce6fd37fe73f5642bf2971ca195a787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a0477c0a2d531a8419dcb4d8132193cb039bb504cc2a9a307b9efe24330029e46e8dd652bf98759cae3ce92d75f40f8d51252212b617e1852e78f5cfd3ef811
|
7
|
+
data.tar.gz: e9aefcbe7cb0cdd4b81d8eb21ba42e5b68df1a47561679f52f9d3cc7985f3bda09080eadd8075d3cb96ae577419b09b35f8626a983d10ddd3a887d9e8cd6828f
|
data/.idea/workspace.xml
CHANGED
@@ -41,11 +41,11 @@
|
|
41
41
|
</provider>
|
42
42
|
</entry>
|
43
43
|
</file>
|
44
|
-
<file leaf-file-name="iconCreater.gemspec" pinned="false" current-in-tab="
|
44
|
+
<file leaf-file-name="iconCreater.gemspec" pinned="false" current-in-tab="false">
|
45
45
|
<entry file="file://$PROJECT_DIR$/iconCreater.gemspec">
|
46
46
|
<provider selected="true" editor-type-id="text-editor">
|
47
|
-
<state vertical-scroll-proportion="0.
|
48
|
-
<caret line="
|
47
|
+
<state vertical-scroll-proportion="0.0">
|
48
|
+
<caret line="13" column="56" selection-start-line="13" selection-start-column="43" selection-end-line="13" selection-end-column="56" />
|
49
49
|
<folding />
|
50
50
|
</state>
|
51
51
|
</provider>
|
@@ -54,17 +54,17 @@
|
|
54
54
|
<file leaf-file-name="README.md" pinned="false" current-in-tab="false">
|
55
55
|
<entry file="file://$PROJECT_DIR$/README.md">
|
56
56
|
<provider selected="true" editor-type-id="text-editor">
|
57
|
-
<state vertical-scroll-proportion="
|
58
|
-
<caret line="
|
57
|
+
<state vertical-scroll-proportion="-1.1111112">
|
58
|
+
<caret line="4" column="3" selection-start-line="4" selection-start-column="3" selection-end-line="4" selection-end-column="3" />
|
59
59
|
<folding />
|
60
60
|
</state>
|
61
61
|
</provider>
|
62
62
|
</entry>
|
63
63
|
</file>
|
64
|
-
<file leaf-file-name="iconCreater.rb" pinned="false" current-in-tab="
|
64
|
+
<file leaf-file-name="iconCreater.rb" pinned="false" current-in-tab="true">
|
65
65
|
<entry file="file://$PROJECT_DIR$/lib/iconCreater.rb">
|
66
66
|
<provider selected="true" editor-type-id="text-editor">
|
67
|
-
<state vertical-scroll-proportion="0.
|
67
|
+
<state vertical-scroll-proportion="0.6070496">
|
68
68
|
<caret line="31" column="0" selection-start-line="31" selection-start-column="0" selection-end-line="31" selection-end-column="0" />
|
69
69
|
<folding />
|
70
70
|
</state>
|
@@ -95,7 +95,7 @@
|
|
95
95
|
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
96
96
|
<provider selected="true" editor-type-id="text-editor">
|
97
97
|
<state vertical-scroll-proportion="0.0">
|
98
|
-
<caret line="
|
98
|
+
<caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
|
99
99
|
<folding />
|
100
100
|
</state>
|
101
101
|
</provider>
|
@@ -115,7 +115,7 @@
|
|
115
115
|
<entry file="file://$PROJECT_DIR$/lib/iconCreater/create.rb">
|
116
116
|
<provider selected="true" editor-type-id="text-editor">
|
117
117
|
<state vertical-scroll-proportion="0.0">
|
118
|
-
<caret line="21" column="
|
118
|
+
<caret line="21" column="15" selection-start-line="21" selection-start-column="15" selection-end-line="21" selection-end-column="15" />
|
119
119
|
<folding />
|
120
120
|
</state>
|
121
121
|
</provider>
|
@@ -136,12 +136,12 @@
|
|
136
136
|
<option value="$PROJECT_DIR$/lib/iconCreater/optparser.rb" />
|
137
137
|
<option value="$PROJECT_DIR$/lib/iconCreater/input.rb" />
|
138
138
|
<option value="$PROJECT_DIR$/bin/iconCreater" />
|
139
|
-
<option value="$PROJECT_DIR$/README.md" />
|
140
139
|
<option value="$PROJECT_DIR$/lib/iconCreater/parser.rb" />
|
141
|
-
<option value="$PROJECT_DIR$/lib/iconCreater/create.rb" />
|
142
|
-
<option value="$PROJECT_DIR$/lib/iconCreater.rb" />
|
143
140
|
<option value="$PROJECT_DIR$/lib/iconCreater/version.rb" />
|
144
141
|
<option value="$PROJECT_DIR$/iconCreater.gemspec" />
|
142
|
+
<option value="$PROJECT_DIR$/lib/iconCreater/create.rb" />
|
143
|
+
<option value="$PROJECT_DIR$/README.md" />
|
144
|
+
<option value="$PROJECT_DIR$/lib/iconCreater.rb" />
|
145
145
|
</list>
|
146
146
|
</option>
|
147
147
|
</component>
|
@@ -153,8 +153,8 @@
|
|
153
153
|
<order />
|
154
154
|
</component>
|
155
155
|
<component name="ProjectFrameBounds">
|
156
|
-
<option name="x" value="
|
157
|
-
<option name="y" value="
|
156
|
+
<option name="x" value="88" />
|
157
|
+
<option name="y" value="57" />
|
158
158
|
<option name="width" value="1379" />
|
159
159
|
<option name="height" value="837" />
|
160
160
|
</component>
|
@@ -253,7 +253,7 @@
|
|
253
253
|
</component>
|
254
254
|
<component name="PropertiesComponent">
|
255
255
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
256
|
-
<property name="last_opened_file_path" value="$
|
256
|
+
<property name="last_opened_file_path" value="$USER_HOME$/RubymineProjects/untitled" />
|
257
257
|
</component>
|
258
258
|
<component name="RunManager">
|
259
259
|
<configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
|
@@ -398,15 +398,15 @@
|
|
398
398
|
<servers />
|
399
399
|
</component>
|
400
400
|
<component name="ToolWindowManager">
|
401
|
-
<frame x="
|
402
|
-
<editor active="
|
401
|
+
<frame x="88" y="57" width="1379" height="837" extended-state="0" />
|
402
|
+
<editor active="true" />
|
403
403
|
<layout>
|
404
404
|
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
405
405
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
406
406
|
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
407
407
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
408
408
|
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
409
|
-
<window_info id="Project" active="
|
409
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24945612" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
410
410
|
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
411
411
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
412
412
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
@@ -752,23 +752,23 @@
|
|
752
752
|
</state>
|
753
753
|
</provider>
|
754
754
|
</entry>
|
755
|
-
<entry file="file://$PROJECT_DIR$/
|
755
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
756
756
|
<provider selected="true" editor-type-id="text-editor">
|
757
757
|
<state vertical-scroll-proportion="0.0">
|
758
|
-
<caret line="
|
758
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
759
759
|
<folding />
|
760
760
|
</state>
|
761
761
|
</provider>
|
762
762
|
</entry>
|
763
|
-
<entry file="file://$PROJECT_DIR$/
|
763
|
+
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
764
764
|
<provider selected="true" editor-type-id="text-editor">
|
765
765
|
<state vertical-scroll-proportion="0.0">
|
766
|
-
<caret line="
|
766
|
+
<caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
|
767
767
|
<folding />
|
768
768
|
</state>
|
769
769
|
</provider>
|
770
770
|
</entry>
|
771
|
-
<entry file="file://$PROJECT_DIR
|
771
|
+
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
772
772
|
<provider selected="true" editor-type-id="text-editor">
|
773
773
|
<state vertical-scroll-proportion="0.0">
|
774
774
|
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
@@ -776,26 +776,26 @@
|
|
776
776
|
</state>
|
777
777
|
</provider>
|
778
778
|
</entry>
|
779
|
-
<entry file="file://$PROJECT_DIR$/
|
779
|
+
<entry file="file://$PROJECT_DIR$/lib/iconCreater/version.rb">
|
780
780
|
<provider selected="true" editor-type-id="text-editor">
|
781
781
|
<state vertical-scroll-proportion="0.0">
|
782
|
-
<caret line="
|
782
|
+
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
783
783
|
<folding />
|
784
784
|
</state>
|
785
785
|
</provider>
|
786
786
|
</entry>
|
787
|
-
<entry file="file://$PROJECT_DIR
|
787
|
+
<entry file="file://$PROJECT_DIR$/lib/iconCreater/parser.rb">
|
788
788
|
<provider selected="true" editor-type-id="text-editor">
|
789
789
|
<state vertical-scroll-proportion="0.0">
|
790
|
-
<caret line="
|
790
|
+
<caret line="24" column="19" selection-start-line="24" selection-start-column="19" selection-end-line="24" selection-end-column="19" />
|
791
791
|
<folding />
|
792
792
|
</state>
|
793
793
|
</provider>
|
794
794
|
</entry>
|
795
|
-
<entry file="file://$PROJECT_DIR$/lib/iconCreater/
|
795
|
+
<entry file="file://$PROJECT_DIR$/lib/iconCreater/input.rb">
|
796
796
|
<provider selected="true" editor-type-id="text-editor">
|
797
797
|
<state vertical-scroll-proportion="0.0">
|
798
|
-
<caret line="
|
798
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="7" selection-end-column="3" />
|
799
799
|
<folding />
|
800
800
|
</state>
|
801
801
|
</provider>
|
@@ -803,31 +803,31 @@
|
|
803
803
|
<entry file="file://$PROJECT_DIR$/lib/iconCreater/create.rb">
|
804
804
|
<provider selected="true" editor-type-id="text-editor">
|
805
805
|
<state vertical-scroll-proportion="0.0">
|
806
|
-
<caret line="21" column="
|
806
|
+
<caret line="21" column="15" selection-start-line="21" selection-start-column="15" selection-end-line="21" selection-end-column="15" />
|
807
807
|
<folding />
|
808
808
|
</state>
|
809
809
|
</provider>
|
810
810
|
</entry>
|
811
|
-
<entry file="file://$PROJECT_DIR$/
|
811
|
+
<entry file="file://$PROJECT_DIR$/iconCreater.gemspec">
|
812
812
|
<provider selected="true" editor-type-id="text-editor">
|
813
813
|
<state vertical-scroll-proportion="0.0">
|
814
|
-
<caret line="
|
814
|
+
<caret line="13" column="56" selection-start-line="13" selection-start-column="43" selection-end-line="13" selection-end-column="56" />
|
815
815
|
<folding />
|
816
816
|
</state>
|
817
817
|
</provider>
|
818
818
|
</entry>
|
819
|
-
<entry file="file://$PROJECT_DIR$/
|
819
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
820
820
|
<provider selected="true" editor-type-id="text-editor">
|
821
|
-
<state vertical-scroll-proportion="
|
822
|
-
<caret line="
|
821
|
+
<state vertical-scroll-proportion="-1.1111112">
|
822
|
+
<caret line="4" column="3" selection-start-line="4" selection-start-column="3" selection-end-line="4" selection-end-column="3" />
|
823
823
|
<folding />
|
824
824
|
</state>
|
825
825
|
</provider>
|
826
826
|
</entry>
|
827
|
-
<entry file="file://$PROJECT_DIR$/iconCreater.
|
827
|
+
<entry file="file://$PROJECT_DIR$/lib/iconCreater.rb">
|
828
828
|
<provider selected="true" editor-type-id="text-editor">
|
829
|
-
<state vertical-scroll-proportion="0.
|
830
|
-
<caret line="
|
829
|
+
<state vertical-scroll-proportion="0.6070496">
|
830
|
+
<caret line="31" column="0" selection-start-line="31" selection-start-column="0" selection-end-line="31" selection-end-column="0" />
|
831
831
|
<folding />
|
832
832
|
</state>
|
833
833
|
</provider>
|
data/README.md
CHANGED
@@ -2,38 +2,26 @@
|
|
2
2
|
|
3
3
|
A command-line tool for creating all icons of iOS App.
|
4
4
|
|
5
|
+
## Requirements
|
5
6
|
|
6
|
-
|
7
|
+
You need install ImageMagick
|
7
8
|
|
8
|
-
|
9
|
+
## Installation
|
9
10
|
|
10
|
-
Before downlown the gem ,wo need some prepare:
|
11
|
-
|
12
|
-
```sh
|
13
|
-
brew install imagemagick
|
14
|
-
```
|
15
11
|
Then install this gem
|
16
12
|
```ruby
|
17
13
|
gem install iconCreater
|
18
14
|
```
|
19
|
-
**注意: 如果你的系统是 Mac OS X 10.11 以后的版本, 由于10.11引入了 `rootless`, 无法直接安装 iconCreater,
|
20
|
-
|
21
|
-
1\. 使用 [RVM](https://rvm.io/) 安装 Ruby, 再安装 iconCreater(推荐)
|
15
|
+
**注意: 如果你的系统是 Mac OS X 10.11 以后的版本, 由于10.11引入了 `rootless`, 无法直接安装 iconCreater, 有以下两种解决办法:**
|
22
16
|
|
23
|
-
```sh
|
24
|
-
# Install RVM:
|
25
|
-
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
|
26
|
-
|
27
|
-
$ gem install iconCreater
|
28
|
-
```
|
29
17
|
|
30
|
-
|
18
|
+
1\. 指定 iconCreater 中 bin 文件的 PATH
|
31
19
|
|
32
20
|
```sh
|
33
21
|
$ export PATH=/usr/local/bin:$PATH;gem install -n /usr/local/bin iconCreater
|
34
22
|
```
|
35
23
|
|
36
|
-
|
24
|
+
2\. 重写 Ruby Gem 的 bindir
|
37
25
|
|
38
26
|
```sh
|
39
27
|
$ echo 'gem: --bindir /usr/local/bin' >> ~/.gemrc
|
@@ -41,8 +29,14 @@ $ gem install fir-cli
|
|
41
29
|
```
|
42
30
|
|
43
31
|
## Usage
|
44
|
-
|
45
|
-
|
32
|
+
不输入返回路径,则在当前路径输出所有尺寸的图片
|
33
|
+
```sh
|
34
|
+
iconCreater -i xxx.jpg
|
35
|
+
```
|
36
|
+
当输入返回路径,则在输出路径位置输出所有尺寸的图片
|
37
|
+
```sh
|
38
|
+
iconCreater -i xxx.jpg -o /xxx/output
|
39
|
+
```
|
46
40
|
|
47
41
|
## Development
|
48
42
|
|
@@ -52,7 +46,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
52
46
|
|
53
47
|
## Contributing
|
54
48
|
|
55
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/BlankSpace007/iconCreater. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
56
50
|
|
57
51
|
|
58
52
|
## License
|
data/iconCreater.gemspec
CHANGED
data/lib/iconCreater.rb
CHANGED
data/lib/iconCreater/create.rb
CHANGED
@@ -1,21 +1,15 @@
|
|
1
1
|
module IconCreater
|
2
2
|
|
3
|
-
require 'rubygems'
|
4
|
-
require 'RMagick'
|
5
3
|
class Create
|
6
4
|
|
7
5
|
def initialize(ahash)
|
8
6
|
@ahash = ahash
|
9
7
|
end
|
10
8
|
|
11
|
-
|
12
|
-
|
13
9
|
def createicon(input ,output)
|
14
10
|
|
15
|
-
|
16
11
|
@ahash.each do |key,value|
|
17
12
|
|
18
|
-
|
19
13
|
if File::exist?(input)
|
20
14
|
if output == nil
|
21
15
|
oput = `pwd`.chomp!
|
@@ -25,22 +19,19 @@ module IconCreater
|
|
25
19
|
p '输出路径并不是文件夹'
|
26
20
|
exit 0
|
27
21
|
end
|
28
|
-
|
29
|
-
thumb = img.resize(value, value)
|
30
|
-
thumb.write("#{oput}/#{key}") {self.quality = 100}
|
22
|
+
`/usr/local/bin/convert -resize #{value}x#{value} #{input} #{oput}/#{key}`
|
31
23
|
else
|
32
24
|
p '输入路径无图片'
|
25
|
+
exit 0
|
33
26
|
end
|
34
27
|
|
35
28
|
end
|
36
29
|
p "输入图片路径:#{input}" if File::exist?(input)
|
37
|
-
|
38
30
|
p "默认输出图片路径:#{`pwd`.chomp!}" if output == nil
|
39
31
|
p "输出图片路径:#{output}" unless output == nil
|
40
32
|
|
41
33
|
end
|
42
34
|
|
43
|
-
|
44
35
|
end
|
45
36
|
|
46
37
|
end
|
data/lib/iconCreater/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iconCreater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hoping_sir
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rmagick
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '2.13'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '2.13'
|
55
41
|
description: " Create all measurement icon for iOS."
|
56
42
|
email:
|
57
43
|
- 1059710422@qq.com
|