imagetools 0.9.0 → 1.0.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: 1ebf051e18de9f5e74f9ffc5a3efc716e7e83a3fee7537d28eacd5657fda24f5
4
- data.tar.gz: fe7e01ce0290adb48269577d295df12661ca029c1a6f9762423e3e8878c3ab2f
3
+ metadata.gz: 5abc00d417b2d224af26de6cbb9c99da4490161371850b1d6319c13c72a3600b
4
+ data.tar.gz: 409367ec029ca9278ef5201bbfa723077dbe913e695a02aff8d12f299e56fcc7
5
5
  SHA512:
6
- metadata.gz: 5df4b176fae56ee6975eb443eba41c68d8fd6941b72199d7264824eba21f980065f598d9794d85832de1f2fdb951636b9c525a868cc7699062883fc993b1973a
7
- data.tar.gz: d221b89f398e20f8d44116c51e5d565a2d6181d7cb8d046f3e01905630289286b640c52bc8220ad8cfb0bed3c01a8c2c11f4c92070a744cb846bc8f70bd6aff6
6
+ metadata.gz: d27538f7941479ab48b900defe281d80f015e3efc67aebf288297e70124eb2da3c89ca335da7d41b6113ff4768898f6296911a3526cf2a9c7a3ac1b72e903df4
7
+ data.tar.gz: 3fcae0439cc3136f6844b3e034032e49cc2796ea8d55bb01531589f0f0955a278a5be68708f8058ad8aeca416982f8994c7b13477d6040284b5d44d3abdbb0a5
data/.idea/workspace.xml CHANGED
@@ -1,10 +1,12 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
- <list default="true" id="b197c64f-57f8-4389-ab8d-dc9fe3cb05ba" name="Default" comment="" />
4
+ <list default="true" id="b197c64f-57f8-4389-ab8d-dc9fe3cb05ba" name="Default" comment="">
5
+ <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
+ <change beforePath="$PROJECT_DIR$/imagetools.iml" beforeDir="false" afterPath="$PROJECT_DIR$/imagetools.iml" afterDir="false" />
7
+ </list>
5
8
  <ignored path="$PROJECT_DIR$/out/" />
6
9
  <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
7
- <option name="TRACKING_ENABLED" value="true" />
8
10
  <option name="SHOW_DIALOG" value="false" />
9
11
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
12
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -15,7 +17,7 @@
15
17
  </component>
16
18
  <component name="FileEditorManager">
17
19
  <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
18
- <file leaf-file-name="iconcreator" pinned="false" current-in-tab="false">
20
+ <file pinned="false" current-in-tab="false">
19
21
  <entry file="file://$PROJECT_DIR$/exe/iconcreator">
20
22
  <provider selected="true" editor-type-id="text-editor">
21
23
  <state relative-caret-position="75">
@@ -24,37 +26,35 @@
24
26
  </provider>
25
27
  </entry>
26
28
  </file>
27
- <file leaf-file-name="imagefilter.rb" pinned="false" current-in-tab="false">
29
+ <file pinned="false" current-in-tab="false">
28
30
  <entry file="file://$PROJECT_DIR$/lib/imagetools/imagefilter.rb">
29
31
  <provider selected="true" editor-type-id="text-editor">
30
- <state relative-caret-position="218">
32
+ <state relative-caret-position="315">
31
33
  <caret line="21" column="24" selection-start-line="21" selection-start-column="24" selection-end-line="21" selection-end-column="24" />
32
34
  </state>
33
35
  </provider>
34
36
  </entry>
35
37
  </file>
36
- <file leaf-file-name="imageconcat.rb" pinned="false" current-in-tab="false">
38
+ <file pinned="false" current-in-tab="false">
37
39
  <entry file="file://$PROJECT_DIR$/lib/imagetools/imageconcat.rb">
38
40
  <provider selected="true" editor-type-id="text-editor">
39
- <state relative-caret-position="360">
41
+ <state relative-caret-position="315">
40
42
  <caret line="21" column="33" selection-start-line="21" selection-start-column="33" selection-end-line="21" selection-end-column="33" />
41
43
  </state>
42
44
  </provider>
43
45
  </entry>
44
46
  </file>
45
- <file leaf-file-name="iconextractor.rb" pinned="false" current-in-tab="false">
47
+ <file pinned="false" current-in-tab="false">
46
48
  <entry file="file://$PROJECT_DIR$/lib/imagetools/iconextractor.rb">
47
49
  <provider selected="true" editor-type-id="text-editor" />
48
50
  </entry>
49
51
  </file>
50
- <file leaf-file-name="iconcreator.rb" pinned="false" current-in-tab="true">
52
+ <file pinned="false" current-in-tab="true">
51
53
  <entry file="file://$PROJECT_DIR$/lib/imagetools/iconcreator.rb">
52
- <provider selected="true" editor-type-id="text-editor">
53
- <state relative-caret-position="-363" />
54
- </provider>
54
+ <provider selected="true" editor-type-id="text-editor" />
55
55
  </entry>
56
56
  </file>
57
- <file leaf-file-name="imageresizer.rb" pinned="false" current-in-tab="false">
57
+ <file pinned="false" current-in-tab="false">
58
58
  <entry file="file://$PROJECT_DIR$/lib/imagetools/imageresizer.rb">
59
59
  <provider selected="true" editor-type-id="text-editor">
60
60
  <state relative-caret-position="300">
@@ -63,7 +63,7 @@
63
63
  </provider>
64
64
  </entry>
65
65
  </file>
66
- <file leaf-file-name="version.rb" pinned="false" current-in-tab="false">
66
+ <file pinned="false" current-in-tab="false">
67
67
  <entry file="file://$PROJECT_DIR$/lib/imagetools/version.rb">
68
68
  <provider selected="true" editor-type-id="text-editor" />
69
69
  </entry>
@@ -78,18 +78,9 @@
78
78
  <component name="Git.Settings">
79
79
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
80
80
  </component>
81
- <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
82
- <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
83
- <component name="JsGulpfileManager">
84
- <detection-done>true</detection-done>
85
- <sorting>DEFINITION_ORDER</sorting>
86
- </component>
87
- <component name="NodePackageJsonFileManager">
88
- <packageJsonPaths />
89
- </component>
90
81
  <component name="ProjectFrameBounds">
91
- <option name="x" value="872" />
92
- <option name="y" value="321" />
82
+ <option name="x" value="254" />
83
+ <option name="y" value="418" />
93
84
  <option name="width" value="1920" />
94
85
  <option name="height" value="1177" />
95
86
  </component>
@@ -136,6 +127,10 @@
136
127
  <property name="MemberChooser.copyJavadoc" value="false" />
137
128
  <property name="MemberChooser.showClasses" value="true" />
138
129
  <property name="MemberChooser.sorted" value="false" />
130
+ <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
131
+ <property name="WebServerToolWindowFactoryState" value="false" />
132
+ <property name="aspect.path.notification.shown" value="true" />
133
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
139
134
  <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
140
135
  <property name="nodejs_npm_path_reset_for_default_project" value="true" />
141
136
  <property name="settings.editor.selected.configurable" value="preferences.keymap" />
@@ -155,10 +150,20 @@
155
150
  <component name="RunManager">
156
151
  <configuration default="true" type="Application" factoryName="Application">
157
152
  <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
153
+ <method v="2">
154
+ <option name="Make" enabled="true" />
155
+ </method>
156
+ </configuration>
157
+ <configuration default="true" type="JUnit" factoryName="JUnit">
158
+ <option name="TEST_OBJECT" value="class" />
159
+ <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
160
+ <method v="2">
161
+ <option name="Make" enabled="true" />
162
+ </method>
158
163
  </configuration>
159
164
  <configuration name="iconcreator" type="RubyRunConfigurationType" factoryName="Ruby">
160
165
  <module name="imagetools" />
161
- <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
166
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="" />
162
167
  <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$PROJECT_DIR$/exe" />
163
168
  <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
164
169
  <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
@@ -172,65 +177,83 @@
172
177
  </EXTENSION>
173
178
  <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$PROJECT_DIR$/exe/iconcreator" />
174
179
  <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
180
+ <method v="2">
181
+ <option name="Make" enabled="true" />
182
+ </method>
175
183
  </configuration>
176
- <configuration name="&lt;template&gt;" type="JUnit" default="true" selected="false">
177
- <option name="MAIN_CLASS_NAME" />
178
- <option name="VM_PARAMETERS" value="-ea" />
179
- <option name="PARAMETERS" />
180
- <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
181
- </configuration>
182
- <configuration name="&lt;template&gt;" type="TestNG" default="true" selected="false">
183
- <option name="MAIN_CLASS_NAME" />
184
- <option name="VM_PARAMETERS" value="-ea" />
185
- <option name="PARAMETERS" />
184
+ <configuration default="true" type="TestNG">
185
+ <option name="TEST_OBJECT" value="CLASS" />
186
186
  <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
187
+ <properties />
188
+ <listeners />
189
+ <method v="2">
190
+ <option name="Make" enabled="true" />
191
+ </method>
187
192
  </configuration>
188
- <configuration name="&lt;template&gt;" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" default="true" selected="false">
193
+ <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType">
194
+ <module name="" />
189
195
  <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
196
+ <option name="PROGRAM_PARAMETERS" />
197
+ <predefined_log_file enabled="true" id="idea.log" />
198
+ <method v="2">
199
+ <option name="Make" enabled="true" />
200
+ </method>
190
201
  </configuration>
191
202
  </component>
192
203
  <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
193
204
  <component name="SvnConfiguration">
194
205
  <configuration />
195
206
  </component>
207
+ <component name="TaskManager">
208
+ <task active="true" id="Default" summary="Default task">
209
+ <created>1570340432394</created>
210
+ <option name="number" value="Default" />
211
+ <option name="presentableId" value="Default" />
212
+ <updated>1570340432394</updated>
213
+ <workItem from="1570340436196" duration="217000" />
214
+ </task>
215
+ <servers />
216
+ </component>
217
+ <component name="TimeTrackingManager">
218
+ <option name="totallyTimeSpent" value="217000" />
219
+ </component>
196
220
  <component name="ToolWindowManager">
197
- <frame x="872" y="321" width="1920" height="1177" extended-state="0" />
221
+ <frame x="254" y="418" width="1920" height="1177" extended-state="0" />
198
222
  <layout>
199
- <window_info anchor="bottom" id="TODO" order="6" />
200
- <window_info anchor="right" id="Palette&#9;" order="3" />
201
- <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
202
- <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
203
- <window_info anchor="bottom" id="Version Control" order="7" />
204
- <window_info anchor="bottom" id="Run" order="2" />
223
+ <window_info id="Image Layers" />
224
+ <window_info id="UI Designer" />
225
+ <window_info id="Capture Tool" />
226
+ <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.19329074" />
227
+ <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
205
228
  <window_info id="Designer" order="2" />
206
- <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.19116081" />
207
- <window_info anchor="right" id="Database" order="3" />
229
+ <window_info id="Favorites" order="3" side_tool="true" />
230
+ <window_info anchor="bottom" id="Docker" show_stripe_button="false" />
231
+ <window_info anchor="bottom" id="Terminal" />
232
+ <window_info anchor="bottom" id="Message" order="0" />
208
233
  <window_info anchor="bottom" id="Find" order="1" />
209
- <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
210
- <window_info id="Favorites" order="2" side_tool="true" />
234
+ <window_info anchor="bottom" id="Run" order="2" />
211
235
  <window_info anchor="bottom" id="Debug" order="3" weight="0.39924315" />
212
- <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
236
+ <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
213
237
  <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
238
+ <window_info anchor="bottom" id="TODO" order="6" />
239
+ <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
240
+ <window_info anchor="bottom" id="Version Control" order="8" />
241
+ <window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
242
+ <window_info anchor="right" id="Palette" />
243
+ <window_info anchor="right" id="Capture Analysis" />
244
+ <window_info anchor="right" id="Maven" />
245
+ <window_info anchor="right" id="Theme Preview" />
214
246
  <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
215
247
  <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
216
- <window_info anchor="bottom" id="Message" order="0" />
217
- <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
248
+ <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
249
+ <window_info anchor="right" id="Database" order="3" />
250
+ <window_info anchor="right" id="Palette&#9;" order="4" />
218
251
  </layout>
219
252
  </component>
220
253
  <component name="TypeScriptGeneratedFilesManager">
221
254
  <option name="version" value="1" />
222
255
  </component>
223
- <component name="VcsContentAnnotationSettings">
224
- <option name="myLimit" value="2678400000" />
225
- </component>
226
256
  <component name="editorHistoryManager">
227
- <entry file="file://$PROJECT_DIR$/exe/iconcreator">
228
- <provider selected="true" editor-type-id="text-editor">
229
- <state relative-caret-position="75">
230
- <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
231
- </state>
232
- </provider>
233
- </entry>
234
257
  <entry file="file://$PROJECT_DIR$/exe/iconcreator">
235
258
  <provider selected="true" editor-type-id="text-editor">
236
259
  <state relative-caret-position="75">
@@ -238,26 +261,16 @@
238
261
  </state>
239
262
  </provider>
240
263
  </entry>
241
- <entry file="file://$PROJECT_DIR$/lib/imagetools/version.rb">
242
- <provider selected="true" editor-type-id="text-editor" />
243
- </entry>
244
- <entry file="file://$PROJECT_DIR$/lib/imagetools/imageresizer.rb">
245
- <provider selected="true" editor-type-id="text-editor">
246
- <state relative-caret-position="300">
247
- <caret line="20" column="40" selection-start-line="20" selection-start-column="40" selection-end-line="20" selection-end-column="40" />
248
- </state>
249
- </provider>
250
- </entry>
251
264
  <entry file="file://$PROJECT_DIR$/lib/imagetools/imagefilter.rb">
252
265
  <provider selected="true" editor-type-id="text-editor">
253
- <state relative-caret-position="218">
266
+ <state relative-caret-position="315">
254
267
  <caret line="21" column="24" selection-start-line="21" selection-start-column="24" selection-end-line="21" selection-end-column="24" />
255
268
  </state>
256
269
  </provider>
257
270
  </entry>
258
271
  <entry file="file://$PROJECT_DIR$/lib/imagetools/imageconcat.rb">
259
272
  <provider selected="true" editor-type-id="text-editor">
260
- <state relative-caret-position="360">
273
+ <state relative-caret-position="315">
261
274
  <caret line="21" column="33" selection-start-line="21" selection-start-column="33" selection-end-line="21" selection-end-column="33" />
262
275
  </state>
263
276
  </provider>
@@ -265,11 +278,19 @@
265
278
  <entry file="file://$PROJECT_DIR$/lib/imagetools/iconextractor.rb">
266
279
  <provider selected="true" editor-type-id="text-editor" />
267
280
  </entry>
268
- <entry file="file://$PROJECT_DIR$/lib/imagetools/iconcreator.rb">
281
+ <entry file="file://$PROJECT_DIR$/lib/imagetools/imageresizer.rb">
269
282
  <provider selected="true" editor-type-id="text-editor">
270
- <state relative-caret-position="-363" />
283
+ <state relative-caret-position="300">
284
+ <caret line="20" column="40" selection-start-line="20" selection-start-column="40" selection-end-line="20" selection-end-column="40" />
285
+ </state>
271
286
  </provider>
272
287
  </entry>
288
+ <entry file="file://$PROJECT_DIR$/lib/imagetools/version.rb">
289
+ <provider selected="true" editor-type-id="text-editor" />
290
+ </entry>
291
+ <entry file="file://$PROJECT_DIR$/lib/imagetools/iconcreator.rb">
292
+ <provider selected="true" editor-type-id="text-editor" />
293
+ </entry>
273
294
  </component>
274
295
  <component name="masterDetails">
275
296
  <states>
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- imagetools (0.9.0)
4
+ imagetools (1.0.0)
5
5
  rmagick
6
6
 
7
7
  GEM
data/imagetools.iml CHANGED
@@ -3,10 +3,13 @@
3
3
  <component name="NewModuleRootManager" inherit-compiler-output="true">
4
4
  <exclude-output />
5
5
  <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="jdk" jdkName="rbenv: 2.5.1" jdkType="RUBY_SDK" />
6
+ <orderEntry type="jdk" jdkName="rbenv: 2.5.5" jdkType="RUBY_SDK" />
7
7
  <orderEntry type="sourceFolder" forTests="false" />
8
8
  <orderEntry type="module-library">
9
- <library name="minitest (vbundled(5.11.3)) [path][gem]" type="ruby">
9
+ <library name="minitest (vbundled(5.11.3)) [path][gem]" type="rubylib">
10
+ <properties>
11
+ <option name="version" value="4" />
12
+ </properties>
10
13
  <CLASSES>
11
14
  <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib" />
12
15
  <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/test" />
@@ -22,7 +25,10 @@
22
25
  </library>
23
26
  </orderEntry>
24
27
  <orderEntry type="module-library">
25
- <library name="rake (vbundled(10.5.0)) [path][gem]" type="ruby">
28
+ <library name="rake (vbundled(10.5.0)) [path][gem]" type="rubylib">
29
+ <properties>
30
+ <option name="version" value="4" />
31
+ </properties>
26
32
  <CLASSES>
27
33
  <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/bin" />
28
34
  <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc" />
@@ -47,36 +53,43 @@
47
53
  </library>
48
54
  </orderEntry>
49
55
  <orderEntry type="module-library">
50
- <library name="rmagick (vbundled(2.16.0)) [path][gem]" type="ruby">
56
+ <library name="rmagick (vbundled(3.1.0)) [path][gem]" type="rubylib">
57
+ <properties>
58
+ <option name="version" value="4" />
59
+ </properties>
51
60
  <CLASSES>
52
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/doc" />
53
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/ext" />
54
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/lib" />
55
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/spec" />
56
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/test" />
57
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/examples" />
58
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/deprecated" />
61
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/doc" />
62
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/ext" />
63
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/lib" />
64
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/spec" />
65
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/test" />
66
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/examples" />
67
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/.circleci" />
68
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/deprecated" />
59
69
  </CLASSES>
60
70
  <JAVADOC />
61
71
  <SOURCES>
62
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/doc" />
63
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/ext" />
64
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/lib" />
65
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/spec" />
66
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/test" />
67
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/examples" />
68
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/deprecated" />
72
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/doc" />
73
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/ext" />
74
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/lib" />
75
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/spec" />
76
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/test" />
77
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/examples" />
78
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/.circleci" />
79
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/deprecated" />
69
80
  </SOURCES>
70
81
  <excluded>
71
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/doc" />
72
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/ext" />
73
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/spec" />
74
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/test" />
75
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/examples" />
76
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-2.16.0/deprecated" />
82
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/doc" />
83
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/ext" />
84
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/spec" />
85
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/test" />
86
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/examples" />
87
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/.circleci" />
88
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.5.0/gems/rmagick-3.1.0/deprecated" />
77
89
  </excluded>
78
90
  </library>
79
91
  </orderEntry>
80
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.16.1, rbenv: 2.5.1) [gem]" level="application" />
92
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.1, rbenv: 2.5.5) [gem]" level="application" />
93
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.3, rbenv: 2.5.5) [gem]" level="application" />
81
94
  </component>
82
95
  </module>
@@ -3,12 +3,47 @@
3
3
  require 'imagetools/version'
4
4
  require 'fileutils'
5
5
  require 'optparse'
6
+ require 'yaml'
6
7
 
7
8
  module Imagetools
8
- class Imagefilter
9
+ class Config
10
+ FILENAME_SEARCH = 's (\d+)-(\d+)-(\d+) (\d+)\.(\d+)\.(\d+)'
11
+ FILENAME_REPLACE = 's_\1\2\3_\4\5\6'
12
+
13
+ def initialize(yaml)
14
+ @yaml = yaml
15
+ @filename_search1 = config_value("filename", "search1", false) || FILENAME_SEARCH
16
+ @filename_replace1 = config_value("filename", "replace1", false) || FILENAME_REPLACE
17
+ @filename_search2 = config_value("filename", "search2", false)
18
+ @filename_replace2 = config_value("filename", "replace2", false)
19
+ @filename_search3 = config_value("filename", "search3", false)
20
+ @filename_replace3 = config_value("filename", "replace3", false)
21
+ end
22
+
23
+ attr_reader :filename_search1, :filename_replace1,
24
+ :filename_search2, :filename_replace2,
25
+ :filename_search3, :filename_replace3
9
26
 
10
- SCREENSHOT_SEARCH = /s (\d+)-(\d+)-(\d+) (\d+)\.(\d+)\.(\d+)/
11
- SCREENSHOT_REPLACE = 's_\1\2\3_\4\5\6'
27
+ def filename_patterns
28
+ [
29
+ [@filename_search1, @filename_replace1],
30
+ [@filename_search2, @filename_replace2],
31
+ [@filename_search3, @filename_replace3],
32
+ ]
33
+ end
34
+
35
+ private
36
+ def config_value(section, key, require)
37
+ return nil unless @yaml
38
+ value = @yaml[section][key]
39
+ if require && (value.nil? || value.empty?)
40
+ raise RuntimeError, "#{section}:#{key}: is empty"
41
+ end
42
+ value
43
+ end
44
+ end
45
+
46
+ class Imagefilter
12
47
  OTHER_JPG_SEARCH = /\.(large|huge|jpg_large)$/i
13
48
  OTHER_JPG_REPLACE = '.jpg'
14
49
 
@@ -49,7 +84,19 @@ EOM
49
84
  opt.on('-v', '--verbose', 'Verbose message') {|v| opts[:v] = v}
50
85
  opt.on('-n', '--dry-run', 'Message only') {|v| opts[:n] = v}
51
86
  opt.on('-t', '--self-test', 'Run Self Test') {|v| opts[:t] = v}
87
+ opt.on('-c', '--config', 'Config file'){|v| opts[:c] = v }
52
88
  opt.parse!(argv)
89
+
90
+ config_file = opts[:c] || "~/.imagefilterrc"
91
+ config_file = File.expand_path(config_file)
92
+ p config_file
93
+ yaml = nil
94
+ if FileTest.file?(config_file)
95
+ yaml = YAML.load_file(config_file)
96
+ p "aaaaaaaaa"
97
+ end
98
+ config = Config.new(yaml)
99
+ p config.filename_patterns
53
100
  if opts[:t]
54
101
  ret = selftest
55
102
  exit(ret)
@@ -60,7 +107,7 @@ EOM
60
107
  exit
61
108
  end
62
109
  filepaths.each do |filepath|
63
- command = Imagefilter.new(opts)
110
+ command = Imagefilter.new(opts, config)
64
111
  command.run(filepath)
65
112
  end
66
113
  end
@@ -76,18 +123,25 @@ EOM
76
123
  filepaths
77
124
  end
78
125
 
79
- def self.replace_image_filename(filename)
80
- result = filename.sub!(SCREENSHOT_SEARCH, SCREENSHOT_REPLACE)
81
- return result if result
82
- filename.sub!(OTHER_JPG_SEARCH, OTHER_JPG_REPLACE)
126
+ def self.replace_image_filename(filename, patterns)
127
+ filename = filename.dup
128
+ patterns.each do |search, replace|
129
+ if search && replace
130
+ p search
131
+ p replace
132
+ reg = Regexp.new(search, Regexp::IGNORECASE)
133
+ filename = filename.sub(reg, replace)
134
+ end
135
+ end
136
+ filename.sub(OTHER_JPG_SEARCH, OTHER_JPG_REPLACE)
83
137
  end
84
138
 
85
139
  def self.replace_webp2jpg(filename)
86
- filename.sub!(WEBP_SEARCH, WEBP_REPLACE)
140
+ filename.sub(WEBP_SEARCH, WEBP_REPLACE)
87
141
  end
88
142
 
89
143
  def self.replace_png2jpg(filename)
90
- filename.sub!(PNG_SEARCH, PNG_REPLACE)
144
+ filename.sub(PNG_SEARCH, PNG_REPLACE)
91
145
  end
92
146
 
93
147
  def self.match_exclude_image?(filename)
@@ -111,8 +165,9 @@ EOM
111
165
  `which #{cmd}` != ""
112
166
  end
113
167
 
114
- def initialize(opts)
168
+ def initialize(opts, config)
115
169
  @opts = opts
170
+ @config = config
116
171
  end
117
172
 
118
173
  def run(filepath)
@@ -140,8 +195,8 @@ EOM
140
195
 
141
196
  def rename_image(filepath)
142
197
  fromname = File.basename(filepath)
143
- toname = self.class.replace_image_filename(fromname)
144
- return filepath if toname.nil?
198
+ toname = self.class.replace_image_filename(fromname, @config.filename_patterns)
199
+ return filepath if fromname == toname
145
200
 
146
201
  dir = File.dirname(filepath)
147
202
  topath = File.join(dir, toname)
@@ -153,7 +208,7 @@ EOM
153
208
  def webp2jpg(filepath)
154
209
  fromname = File.basename(filepath)
155
210
  toname = self.class.replace_webp2jpg(fromname)
156
- return filepath if toname.nil?
211
+ return filepath if fromname == toname
157
212
 
158
213
  dir = File.dirname(filepath)
159
214
  topath = File.join(dir, toname)
@@ -169,7 +224,7 @@ EOM
169
224
  def png2jpg(filepath)
170
225
  fromname = File.basename(filepath)
171
226
  toname = self.class.replace_png2jpg(fromname)
172
- return filepath if toname.nil?
227
+ return filepath if fromname == toname
173
228
 
174
229
  dir = File.dirname(filepath)
175
230
  topath = File.join(dir, toname)
@@ -1,3 +1,3 @@
1
1
  module Imagetools
2
- VERSION = "0.9.0"
2
+ VERSION = "1.0.0"
3
3
  end
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.9.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - src
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-07 00:00:00.000000000 Z
11
+ date: 2019-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rmagick