phtools 0.10.0 → 0.11.1

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +43 -0
  3. data/.rubocop_todo.yml +373 -0
  4. data/Guardfile +6 -3
  5. data/History.md +4 -0
  6. data/TODO.md +2 -0
  7. data/exe/phbackup +2 -1
  8. data/exe/phfixdto +2 -1
  9. data/exe/phfixfmd +2 -1
  10. data/exe/phgettags +2 -1
  11. data/exe/phls +2 -1
  12. data/exe/phmove +6 -3
  13. data/exe/phrename +2 -1
  14. data/exe/phtools +3 -1
  15. data/lib/phbackup.rb +2 -2
  16. data/lib/phevent.rb +2 -1
  17. data/lib/phfixdto.rb +4 -3
  18. data/lib/phfixfmd.rb +2 -2
  19. data/lib/phgettags.rb +7 -7
  20. data/lib/phls.rb +5 -6
  21. data/lib/phmove.rb +12 -21
  22. data/lib/phrename.rb +7 -6
  23. data/lib/phtagset.rb +2 -1
  24. data/lib/phtools/error.rb +2 -1
  25. data/lib/phtools/exif_tagger/error.rb +1 -0
  26. data/lib/phtools/exif_tagger/tag_collection.rb +17 -14
  27. data/lib/phtools/exif_tagger/tag_writer.rb +8 -7
  28. data/lib/phtools/exif_tagger/tags/_tag.rb +92 -37
  29. data/lib/phtools/exif_tagger/tags/_tag_array_of_strings.rb +35 -0
  30. data/lib/phtools/exif_tagger/tags/_tag_date.rb +25 -27
  31. data/lib/phtools/exif_tagger/tags/_tag_hash_of_strings.rb +39 -0
  32. data/lib/phtools/exif_tagger/tags/_tag_string.rb +32 -0
  33. data/lib/phtools/exif_tagger/tags/city.rb +7 -21
  34. data/lib/phtools/exif_tagger/tags/coded_character_set.rb +6 -21
  35. data/lib/phtools/exif_tagger/tags/collections.rb +20 -26
  36. data/lib/phtools/exif_tagger/tags/copyright.rb +6 -22
  37. data/lib/phtools/exif_tagger/tags/country.rb +6 -23
  38. data/lib/phtools/exif_tagger/tags/country_code.rb +5 -21
  39. data/lib/phtools/exif_tagger/tags/create_date.rb +17 -13
  40. data/lib/phtools/exif_tagger/tags/creator.rb +14 -25
  41. data/lib/phtools/exif_tagger/tags/date_time_original.rb +18 -13
  42. data/lib/phtools/exif_tagger/tags/gps_created.rb +21 -44
  43. data/lib/phtools/exif_tagger/tags/image_unique_id.rb +12 -27
  44. data/lib/phtools/exif_tagger/tags/keywords.rb +15 -27
  45. data/lib/phtools/exif_tagger/tags/location.rb +6 -23
  46. data/lib/phtools/exif_tagger/tags/modify_date.rb +8 -8
  47. data/lib/phtools/exif_tagger/tags/state.rb +6 -23
  48. data/lib/phtools/exif_tagger/tags/world_region.rb +6 -22
  49. data/lib/phtools/exif_tagger/tags.rb +2 -1
  50. data/lib/phtools/exif_tagger.rb +1 -0
  51. data/lib/phtools/ph_file.rb +35 -14
  52. data/lib/phtools/runner.rb +4 -4
  53. data/lib/phtools/utils.rb +1 -0
  54. data/lib/phtools/version.rb +2 -1
  55. data/lib/phtools.rb +11 -9
  56. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11a9513d5b974ef96b53c7d9f7b4a30299fecb37
4
- data.tar.gz: d5156efe4cb97fd0c352168c9a8be41db697eb85
3
+ metadata.gz: 8b870faad66b71d5eded7b173fdf24414091b4d4
4
+ data.tar.gz: 9e4c922a4c4c21f168bd181a2e4cc3e61149caa2
5
5
  SHA512:
6
- metadata.gz: 95b747d7110174f61b325c8cdd58ff6b79d21ca3ae494ea96c9bc0bdc1c6c43ba8621d9d81f0d297ee5b67a74d9486d38ea5405f5df4c1723bc5c2b26b14948b
7
- data.tar.gz: 15c18ab1c5cc87c2e98f8008b0768452efc2db051daae2054ed01fcfc3d91785055c89a58643b7cd82de89bb07eb30abf0043b991a29d7fc278e7d0801db3f00
6
+ metadata.gz: 6523f3e82c098c59ae843ec995ee8ed30c2aa92a541e4abd32e84fffd98a41b3c301a790f418b85cda69c309822a3653969580fb749e93ecc26988f8b315c7d4
7
+ data.tar.gz: ff88484ba7758fffd0418b79185b95ded9f880e7e3f31b1080114221009df484ece40d86745ba72726f3e6873f9dcd23921019fe76415fcd429a6fb3b0b9aaae
data/.rubocop.yml ADDED
@@ -0,0 +1,43 @@
1
+ # This is the configuration used to check the rubocop source code.
2
+ AllCops:
3
+ Exclude:
4
+ - 'vendor/**/*'
5
+ - 'spec/fixtures/**/*'
6
+ - 'spec/**/*'
7
+ - 'tmp/**/*'
8
+ - 'Guardfile'
9
+ TargetRubyVersion: 2.3
10
+
11
+ Style/Encoding:
12
+ EnforcedStyle: when_needed
13
+ Enabled: true
14
+
15
+ #Style/FrozenStringLiteralComment:
16
+ # EnforcedStyle: always
17
+
18
+ Metrics/LineLength:
19
+ Enabled: false
20
+
21
+ Metrics/ClassLength:
22
+ Enabled: false
23
+
24
+ Metrics/MethodLength:
25
+ Enabled: false
26
+
27
+ Metrics/CyclomaticComplexity:
28
+ Enabled: false
29
+
30
+ Metrics/AbcSize:
31
+ Enabled: false
32
+
33
+ Metrics/PerceivedComplexity:
34
+ Enabled: false
35
+
36
+ Style/Documentation:
37
+ Enabled: false
38
+
39
+ Style/SignalException:
40
+ Enabled: false
41
+
42
+ Style/AccessorMethodName:
43
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,373 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2016-09-29 21:33:08 +0300 using RuboCop version 0.43.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
12
+ Lint/UnusedBlockArgument:
13
+ Exclude:
14
+ - 'Guardfile'
15
+
16
+ # Offense count: 1
17
+ # Cop supports --auto-correct.
18
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
19
+ Lint/UnusedMethodArgument:
20
+ Exclude:
21
+ - 'lib/phtools/exif_tagger/tags/keywords.rb'
22
+
23
+ # Offense count: 1
24
+ Lint/UselessAssignment:
25
+ Exclude:
26
+ - 'lib/phtools.rb'
27
+
28
+ # Offense count: 3
29
+ Metrics/BlockNesting:
30
+ Max: 5
31
+
32
+ # Offense count: 3
33
+ # Cop supports --auto-correct.
34
+ Performance/RedundantMatch:
35
+ Exclude:
36
+ - 'lib/phtools/ph_file.rb'
37
+
38
+ # Offense count: 1
39
+ # Cop supports --auto-correct.
40
+ # Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
41
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
42
+ Style/AlignHash:
43
+ Exclude:
44
+ - 'spec/lib/phtools/ph_file_spec.rb'
45
+
46
+ # Offense count: 1
47
+ # Cop supports --auto-correct.
48
+ # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
49
+ # SupportedStyles: with_first_parameter, with_fixed_indentation
50
+ Style/AlignParameters:
51
+ Exclude:
52
+ - 'lib/phtools/ph_file.rb'
53
+
54
+ # Offense count: 3
55
+ # Cop supports --auto-correct.
56
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
57
+ # SupportedStyles: always, conditionals
58
+ Style/AndOr:
59
+ Exclude:
60
+ - 'lib/phmove.rb'
61
+ - 'lib/phrename.rb'
62
+
63
+ # Offense count: 32
64
+ # Cop supports --auto-correct.
65
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
66
+ # SupportedStyles: percent_q, bare_percent
67
+ Style/BarePercentLiterals:
68
+ Enabled: false
69
+
70
+ # Offense count: 20
71
+ # Cop supports --auto-correct.
72
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
73
+ # SupportedStyles: is_a?, kind_of?
74
+ Style/ClassCheck:
75
+ Exclude:
76
+ - 'lib/phrename.rb'
77
+ - 'lib/phtools/exif_tagger/tags/_tag.rb'
78
+ - 'lib/phtools/exif_tagger/tags/_tag_date.rb'
79
+ - 'lib/phtools/exif_tagger/tags/create_date.rb'
80
+ - 'lib/phtools/exif_tagger/tags/date_time_original.rb'
81
+ - 'lib/phtools/exif_tagger/tags/modify_date.rb'
82
+
83
+ # Offense count: 10
84
+ # Cop supports --auto-correct.
85
+ Style/ColonMethodCall:
86
+ Exclude:
87
+ - 'exe/phtools'
88
+ - 'lib/phtools.rb'
89
+
90
+ # Offense count: 1
91
+ # Cop supports --auto-correct.
92
+ Style/CommentIndentation:
93
+ Exclude:
94
+ - 'lib/phtools/ph_file.rb'
95
+
96
+ # Offense count: 1
97
+ # Cop supports --auto-correct.
98
+ # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
99
+ # SupportedStyles: assign_to_condition, assign_inside_condition
100
+ Style/ConditionalAssignment:
101
+ Exclude:
102
+ - 'lib/phtools/exif_tagger/tags/_tag.rb'
103
+
104
+ # Offense count: 8
105
+ # Cop supports --auto-correct.
106
+ Style/EmptyCaseCondition:
107
+ Exclude:
108
+ - 'lib/phmove.rb'
109
+ - 'lib/phtools/exif_tagger/tag_collection.rb'
110
+ - 'lib/phtools/exif_tagger/tags/_tag.rb'
111
+ - 'lib/phtools/exif_tagger/tags/_tag_date.rb'
112
+ - 'lib/phtools/exif_tagger/tags/create_date.rb'
113
+ - 'lib/phtools/exif_tagger/tags/date_time_original.rb'
114
+ - 'lib/phtools/exif_tagger/tags/modify_date.rb'
115
+ - 'lib/phtools/ph_file.rb'
116
+
117
+ # Offense count: 2
118
+ # Cop supports --auto-correct.
119
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
120
+ # SupportedStyles: empty_lines, no_empty_lines
121
+ Style/EmptyLinesAroundBlockBody:
122
+ Exclude:
123
+ - 'phtools.gemspec'
124
+ - 'spec/lib/phtools/ph_file_spec.rb'
125
+
126
+ # Offense count: 5
127
+ # Cop supports --auto-correct.
128
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
129
+ # SupportedStyles: empty_lines, no_empty_lines
130
+ Style/EmptyLinesAroundClassBody:
131
+ Exclude:
132
+ - 'lib/phbackup.rb'
133
+ - 'lib/phfixfmd.rb'
134
+ - 'lib/phgettags.rb'
135
+ - 'lib/phmove.rb'
136
+ - 'lib/phtools/utils/os_win.rb'
137
+
138
+ # Offense count: 1
139
+ # Cop supports --auto-correct.
140
+ # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
141
+ Style/ExtraSpacing:
142
+ Exclude:
143
+ - 'lib/phtools/ph_file.rb'
144
+
145
+ # Offense count: 11
146
+ # Cop supports --auto-correct.
147
+ # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
148
+ # SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
149
+ Style/FirstParameterIndentation:
150
+ Exclude:
151
+ - 'spec/lib/phtools/ph_file_spec.rb'
152
+
153
+ # Offense count: 24
154
+ # Configuration parameters: MinBodyLength.
155
+ Style/GuardClause:
156
+ Exclude:
157
+ - 'lib/phtools/exif_tagger/tags/city.rb'
158
+ - 'lib/phtools/exif_tagger/tags/coded_character_set.rb'
159
+ - 'lib/phtools/exif_tagger/tags/collections.rb'
160
+ - 'lib/phtools/exif_tagger/tags/copyright.rb'
161
+ - 'lib/phtools/exif_tagger/tags/country.rb'
162
+ - 'lib/phtools/exif_tagger/tags/country_code.rb'
163
+ - 'lib/phtools/exif_tagger/tags/creator.rb'
164
+ - 'lib/phtools/exif_tagger/tags/gps_created.rb'
165
+ - 'lib/phtools/exif_tagger/tags/image_unique_id.rb'
166
+ - 'lib/phtools/exif_tagger/tags/keywords.rb'
167
+ - 'lib/phtools/exif_tagger/tags/location.rb'
168
+ - 'lib/phtools/exif_tagger/tags/state.rb'
169
+ - 'lib/phtools/exif_tagger/tags/world_region.rb'
170
+
171
+ # Offense count: 1
172
+ # Cop supports --auto-correct.
173
+ # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
174
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
175
+ Style/HashSyntax:
176
+ Exclude:
177
+ - 'Rakefile'
178
+
179
+ # Offense count: 6
180
+ # Cop supports --auto-correct.
181
+ # Configuration parameters: MaxLineLength.
182
+ Style/IfUnlessModifier:
183
+ Exclude:
184
+ - 'lib/phtools/exif_tagger/tags/city.rb'
185
+ - 'lib/phtools/exif_tagger/tags/copyright.rb'
186
+ - 'lib/phtools/exif_tagger/tags/country.rb'
187
+ - 'lib/phtools/exif_tagger/tags/image_unique_id.rb'
188
+ - 'lib/phtools/exif_tagger/tags/location.rb'
189
+ - 'lib/phtools/exif_tagger/tags/state.rb'
190
+
191
+ # Offense count: 1
192
+ # Cop supports --auto-correct.
193
+ # Configuration parameters: Width.
194
+ Style/IndentationWidth:
195
+ Exclude:
196
+ - 'lib/phmove.rb'
197
+
198
+ # Offense count: 4
199
+ # Cop supports --auto-correct.
200
+ Style/LeadingCommentSpace:
201
+ Exclude:
202
+ - 'bin/console'
203
+ - 'lib/phgettags.rb'
204
+ - 'lib/phrename.rb'
205
+
206
+ # Offense count: 1
207
+ # Cop supports --auto-correct.
208
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
209
+ # SupportedStyles: symmetrical, new_line, same_line
210
+ Style/MultilineMethodCallBraceLayout:
211
+ Exclude:
212
+ - 'lib/phfixdto.rb'
213
+
214
+ # Offense count: 3
215
+ # Cop supports --auto-correct.
216
+ # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
217
+ # SupportedStyles: aligned, indented
218
+ Style/MultilineOperationIndentation:
219
+ Exclude:
220
+ - 'lib/phtools/exif_tagger/tags/_tag_date.rb'
221
+ - 'spec/lib/phtools/ph_file_spec.rb'
222
+
223
+ # Offense count: 25
224
+ # Cop supports --auto-correct.
225
+ Style/MutableConstant:
226
+ Enabled: false
227
+
228
+ # Offense count: 3
229
+ # Cop supports --auto-correct.
230
+ # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
231
+ # SupportedStyles: skip_modifier_ifs, always
232
+ Style/Next:
233
+ Exclude:
234
+ - 'lib/phtools/exif_tagger/tags/_tag.rb'
235
+ - 'lib/phtools/exif_tagger/tags/creator.rb'
236
+ - 'lib/phtools/exif_tagger/tags/keywords.rb'
237
+
238
+ # Offense count: 1
239
+ # Cop supports --auto-correct.
240
+ Style/Not:
241
+ Exclude:
242
+ - 'lib/phgettags.rb'
243
+
244
+ # Offense count: 1
245
+ # Cop supports --auto-correct.
246
+ Style/NumericLiterals:
247
+ MinDigits: 6
248
+
249
+ # Offense count: 2
250
+ # Cop supports --auto-correct.
251
+ # Configuration parameters: AllowSafeAssignment.
252
+ Style/ParenthesesAroundCondition:
253
+ Exclude:
254
+ - 'lib/phmove.rb'
255
+
256
+ # Offense count: 24
257
+ # Cop supports --auto-correct.
258
+ # Configuration parameters: PreferredDelimiters.
259
+ Style/PercentLiteralDelimiters:
260
+ Exclude:
261
+ - 'lib/phls.rb'
262
+ - 'lib/phtools/exif_tagger/tag_writer.rb'
263
+ - 'lib/phtools/exif_tagger/tags/coded_character_set.rb'
264
+ - 'lib/phtools/exif_tagger/tags/collections.rb'
265
+ - 'lib/phtools/exif_tagger/tags/copyright.rb'
266
+ - 'lib/phtools/exif_tagger/tags/keywords.rb'
267
+ - 'lib/phtools/exif_tagger/tags/location.rb'
268
+ - 'lib/phtools/exif_tagger/tags/state.rb'
269
+ - 'lib/phtools/exif_tagger/tags/world_region.rb'
270
+ - 'lib/phtools/ph_file.rb'
271
+ - 'phtools.gemspec'
272
+
273
+ # Offense count: 2
274
+ # Cop supports --auto-correct.
275
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
276
+ # SupportedStyles: lower_case_q, upper_case_q
277
+ Style/PercentQLiterals:
278
+ Exclude:
279
+ - 'lib/phls.rb'
280
+ - 'lib/phtools/exif_tagger/tag_writer.rb'
281
+
282
+ # Offense count: 2
283
+ # Cop supports --auto-correct.
284
+ Style/RedundantSelf:
285
+ Exclude:
286
+ - 'lib/phtools/runner.rb'
287
+
288
+ # Offense count: 2
289
+ # Cop supports --auto-correct.
290
+ Style/SelfAssignment:
291
+ Exclude:
292
+ - 'lib/phtools/exif_tagger/tags/creator.rb'
293
+ - 'lib/phtools/exif_tagger/tags/keywords.rb'
294
+
295
+ # Offense count: 1
296
+ # Cop supports --auto-correct.
297
+ Style/SpaceAfterComma:
298
+ Exclude:
299
+ - 'lib/phgettags.rb'
300
+
301
+ # Offense count: 5
302
+ # Cop supports --auto-correct.
303
+ # Configuration parameters: AllowForAlignment.
304
+ Style/SpaceAroundOperators:
305
+ Exclude:
306
+ - 'lib/phrename.rb'
307
+ - 'lib/phtools/error.rb'
308
+
309
+ # Offense count: 31
310
+ # Cop supports --auto-correct.
311
+ # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
312
+ # SupportedStyles: single_quotes, double_quotes
313
+ Style/StringLiterals:
314
+ Exclude:
315
+ - 'Guardfile'
316
+ - 'Rakefile'
317
+ - 'bin/console'
318
+ - 'exe/phtools'
319
+ - 'lib/phbackup.rb'
320
+ - 'lib/phevent.rb'
321
+ - 'lib/phfixfmd.rb'
322
+ - 'lib/phgettags.rb'
323
+ - 'lib/phmove.rb'
324
+ - 'lib/phrename.rb'
325
+ - 'lib/phtagset.rb'
326
+ - 'lib/phtools/runner.rb'
327
+ - 'phtools.gemspec'
328
+
329
+ # Offense count: 1
330
+ # Cop supports --auto-correct.
331
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
332
+ # SupportedStyles: single_quotes, double_quotes
333
+ Style/StringLiteralsInInterpolation:
334
+ Exclude:
335
+ - 'lib/phtools/ph_file.rb'
336
+
337
+ # Offense count: 2
338
+ # Cop supports --auto-correct.
339
+ # Configuration parameters: IgnoredMethods.
340
+ # IgnoredMethods: respond_to, define_method
341
+ Style/SymbolProc:
342
+ Exclude:
343
+ - 'lib/phtools/exif_tagger/tags/creator.rb'
344
+ - 'lib/phtools/exif_tagger/tags/keywords.rb'
345
+
346
+ # Offense count: 13
347
+ # Cop supports --auto-correct.
348
+ Style/UnneededInterpolation:
349
+ Exclude:
350
+ - 'exe/phbackup'
351
+ - 'exe/phfixdto'
352
+ - 'exe/phfixfmd'
353
+ - 'exe/phgettags'
354
+ - 'exe/phls'
355
+ - 'exe/phmove'
356
+ - 'exe/phrename'
357
+ - 'lib/phgettags.rb'
358
+ - 'lib/phrename.rb'
359
+ - 'lib/phtools/exif_tagger/tag_writer.rb'
360
+ - 'lib/phtools/ph_file.rb'
361
+
362
+ # Offense count: 32
363
+ # Cop supports --auto-correct.
364
+ Style/UnneededPercentQ:
365
+ Enabled: false
366
+
367
+ # Offense count: 2
368
+ # Cop supports --auto-correct.
369
+ # Configuration parameters: SupportedStyles, WordRegex.
370
+ # SupportedStyles: percent, brackets
371
+ Style/WordArray:
372
+ EnforcedStyle: percent
373
+ MinSize: 3
data/Guardfile CHANGED
@@ -1,20 +1,23 @@
1
1
  # A sample Guardfile
2
2
  # More info at https://github.com/guard/guard#readme
3
3
 
4
- notification :terminal_notifier, app_name: "phtools"
5
- # notification :terminal_title
4
+ # notification :terminal_notifier, app_name: "phtools"
5
+ notification :terminal_title
6
6
  # notification :tmux, display_message: false
7
7
 
8
8
  guard :rspec, cmd: "bundle exec rspec" do
9
9
  watch(%r{^spec/.+_spec\.rb$})
10
- watch(%r{^bin/(.+)$}) { |m| "spec/#{m[1]}_spec.rb" }
10
+ watch(%r{^exe/(.+)$}) { |m| "spec/#{m[1]}_spec.rb" }
11
11
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
12
12
  watch('spec/spec_helper.rb') { "spec" }
13
+ watch(%r{^spec/support/(.+)\.rb$}) { 'spec' }
13
14
  end
14
15
 
15
16
  cucumber_options = {
16
17
  # Below are examples overriding defaults
17
18
  # cmd: 'bundle exec cucumber',
19
+ cmd_additional_args: '--no-profile --color --format progress --strict',
20
+ # cmd_additional_args: '--no-profile --color --strict',
18
21
  # cmd_additional_args: '--profile guard',
19
22
  # all_after_pass: false,
20
23
  # all_on_start: false,
data/History.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # RELEASED
2
2
 
3
+ ## [v0.10.0](https://github.com/andrewbiz/phtools/compare/v0.8.0...v0.10.0)
4
+ * phgettags added to the bundle
5
+ * phfixdto added to the bundle
6
+
3
7
  ## [v0.8.0](https://github.com/andrewbiz/phtools/compare/v0.7.7...v0.8.0)
4
8
  * phfixfmd added to the bundle
5
9
 
data/TODO.md CHANGED
@@ -13,6 +13,7 @@
13
13
  - [x] phmove: make target_folder as parameter not an option
14
14
  - [x] phmove: -a (--arrange) parameter means to put photo, video, raw files into separate folders inside target. If -a is not set all files are moved to root of target directory (plain collection of files)
15
15
  - [x] phmove: delete unused empty RAW and VIDEO folders
16
+ - [x] phmove: make default TARGET_FOLDER = .
16
17
  - [ ] phmove: make options to set video, raw folder names
17
18
 
18
19
  ### phrename
@@ -31,6 +32,7 @@
31
32
  ### phfixdto
32
33
  - [x] create phfixdto - fix MWG:DateTimeOriginal (DTO) := date-time-in-name
33
34
  - [x] phfixdto: make -N --no_run option = no running exiftool script, only preparation
35
+ - [ ] phfixdto: if DateTimeOriginal or CreateDate already equals date-time-in-the-name then don't touch it
34
36
  - [ ] phfixdto: smartly check if CreateDate set (including MWG subfields). If any - then update CreateDate
35
37
 
36
38
  ### phevent
data/exe/phbackup CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
5
6
  module PhTools
6
7
  tool_name = File.basename(__FILE__)
7
- require "#{tool_name}"
8
+ require tool_name.to_s
8
9
 
9
10
  file_type = FILE_TYPE_IMAGE + FILE_TYPE_VIDEO + FILE_TYPE_AUDIO
10
11
  usage = <<DOCOPT
data/exe/phfixdto CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
5
6
  module PhTools
6
7
  tool_name = File.basename(__FILE__)
7
- require "#{tool_name}"
8
+ require tool_name.to_s
8
9
 
9
10
  file_type = FILE_TYPE_IMAGE + FILE_TYPE_VIDEO + FILE_TYPE_AUDIO
10
11
  usage = <<DOCOPT
data/exe/phfixfmd CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
5
6
  module PhTools
6
7
  tool_name = File.basename(__FILE__)
7
- require "#{tool_name}"
8
+ require tool_name.to_s
8
9
 
9
10
  file_type = FILE_TYPE_IMAGE + FILE_TYPE_VIDEO + FILE_TYPE_AUDIO
10
11
  usage = <<DOCOPT
data/exe/phgettags CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
5
6
  module PhTools
6
7
  tool_name = File.basename(__FILE__)
7
- require "#{tool_name}"
8
+ require tool_name.to_s
8
9
 
9
10
  file_type = FILE_TYPE_IMAGE + FILE_TYPE_VIDEO + FILE_TYPE_AUDIO
10
11
  usage = <<DOCOPT
data/exe/phls CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
5
6
  module PhTools
6
7
  tool_name = File.basename(__FILE__)
7
- require "#{tool_name}"
8
+ require tool_name.to_s
8
9
 
9
10
  file_type = FILE_TYPE_IMAGE + FILE_TYPE_VIDEO + FILE_TYPE_AUDIO
10
11
  usage = <<DOCOPT
data/exe/phmove CHANGED
@@ -1,17 +1,19 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
5
6
  module PhTools
6
7
  tool_name = File.basename(__FILE__)
7
- require "#{tool_name}"
8
+ require tool_name.to_s
8
9
 
9
10
  file_type = FILE_TYPE_IMAGE + FILE_TYPE_VIDEO + FILE_TYPE_AUDIO
10
11
  usage = <<DOCOPT
11
12
  ***************************************************
12
13
  phtools - *Keep Your Photos In Order* (c) ANB
13
14
  ***************************************************
14
- #{tool_name} moves input file(s) into TARGET_FOLDER
15
+ #{tool_name} moves input file(s) into TARGET_FOLDER.
16
+ If TARGET_FOLDER is not set - current folder (.) will be used as a target.
15
17
  If --arrange option is set it separates photo files, RAW photo files and VIDEO files
16
18
  to corresponding subfolders.
17
19
  phtools friendly files: #{file_type * ','}
@@ -19,8 +21,9 @@ phtools friendly files: #{file_type * ','}
19
21
  Optimized to be used with other *phtools* via pipes.
20
22
  Example: phls | phrename -a anb | #{tool_name} -a target/folder
21
23
 
24
+
22
25
  Usage:
23
- #{tool_name} [-D] [-a] TARGET_FOLDER
26
+ #{tool_name} [-D] [-a] [TARGET_FOLDER]
24
27
  #{tool_name} -h | --help
25
28
  #{tool_name} -v | --version
26
29
 
data/exe/phrename CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
5
6
  module PhTools
6
7
  tool_name = File.basename(__FILE__)
7
- require "#{tool_name}"
8
+ require tool_name.to_s
8
9
 
9
10
  file_type = FILE_TYPE_IMAGE + FILE_TYPE_VIDEO + FILE_TYPE_AUDIO
10
11
  usage = <<DOCOPT
data/exe/phtools CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
- require "phtools"
5
+
6
+ require 'phtools'
5
7
 
6
8
  puts PhTools::about
data/lib/phbackup.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
@@ -6,9 +7,8 @@ require 'phtools/runner'
6
7
 
7
8
  module PhTools
8
9
  class Phbackup < Runner
9
-
10
10
  def self.about
11
- "copies input files to backup folder"
11
+ 'copies input files to backup folder'
12
12
  end
13
13
 
14
14
  private
data/lib/phevent.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
@@ -7,7 +8,7 @@ require 'phtools/runner'
7
8
  module PhTools
8
9
  class Phevent < Runner
9
10
  def self.about
10
- "!UNDER CONSTRUCTION!"
11
+ '!UNDER CONSTRUCTION!'
11
12
  end
12
13
  end
13
14
  end
data/lib/phfixdto.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  # encoding: UTF-8
3
4
  # (c) ANB Andrew Bizyaev
4
5
 
@@ -7,7 +8,6 @@ require 'phtools/runner'
7
8
  require 'phtools/exif_tagger'
8
9
 
9
10
  module PhTools
10
- # phfixdto logic
11
11
  class Phfixdto < Runner
12
12
  def self.about
13
13
  'fixes DateTimeOriginal tag to be equal to date-time-in-the-name'
@@ -19,7 +19,8 @@ module PhTools
19
19
  @writer = ExifTagger::TagWriter.new(
20
20
  script_name: 'exif_tagger_dto.txt',
21
21
  memo: "#{DateTime.now}: Script generated by #{@tool_name} version #{PhTools::VERSION})",
22
- output: STDERR)
22
+ output: STDERR
23
+ )
23
24
  end
24
25
 
25
26
  def process_file(phfile)
@@ -47,7 +48,7 @@ module PhTools
47
48
  @tags_to_write.check_for_warnings(original_values: @tags_original)
48
49
  fail PhTools::Error, @tags_to_write.error_message unless @tags_to_write.valid?
49
50
 
50
- @writer.add_to_script(phfile: phfile, tags: @tags_to_write)
51
+ @writer.add_to_script(filename: phfile, tags: @tags_to_write)
51
52
 
52
53
  return ''
53
54