parker 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/bin/parker +12 -4
- data/lib/parker.rb +1 -0
- data/lib/parker/game.rb +6 -0
- data/lib/parker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e496261dcf8e6181289e2eabaad1a6ac16bc238
|
4
|
+
data.tar.gz: fd1c11d057521bdaf12d470ff654822dd1638e23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b92cd4a72815a0558614fca965d3a64d088ce4dbb2c77eb96b826e0a118013411185ca88248358d215b9d24aee043e43f4394fa11b987410e2149a9830c1639d
|
7
|
+
data.tar.gz: b535019274ff951e15b5aae14d45e9e7b9232cb13a6ba26d977051a6e14eb399c9915ffc46cc84f02302acbd0786f14ca42076195477429a826197ff17959d60
|
data/bin/parker
CHANGED
@@ -57,15 +57,23 @@ end
|
|
57
57
|
output_path = File.expand_path(options[:destination])
|
58
58
|
FileUtils.mkdir_p(output_path) unless Dir.exist?(output_path)
|
59
59
|
|
60
|
-
puts "
|
60
|
+
puts "Scanning..."
|
61
61
|
|
62
62
|
platforms.each do |platform|
|
63
63
|
platform.games.each_value do |game|
|
64
64
|
if game.screenshots.length > 0
|
65
|
-
|
66
|
-
|
65
|
+
print "- #{game.name} (#{platform.name}): "
|
66
|
+
|
67
|
+
platform_path = File.join(output_path, platform.name)
|
68
|
+
copied_count = game.copy_screenshots(platform_path)
|
69
|
+
|
70
|
+
if copied_count > 0
|
71
|
+
puts "Copied #{copied_count} new screenshot#{'s' unless copied_count == 1}."
|
72
|
+
else
|
73
|
+
puts '✓'
|
74
|
+
end
|
67
75
|
end
|
68
76
|
end
|
69
77
|
end
|
70
78
|
|
71
|
-
puts "
|
79
|
+
puts "\nDone!"
|
data/lib/parker.rb
CHANGED
data/lib/parker/game.rb
CHANGED
@@ -8,6 +8,8 @@ module Parker
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def copy_screenshots(output_path)
|
11
|
+
copied_screenshots = 0
|
12
|
+
|
11
13
|
screenshots.each do |screenshot|
|
12
14
|
platform_path = File.join(output_path, name)
|
13
15
|
new_file_path = File.join(platform_path, screenshot.filename)
|
@@ -16,7 +18,11 @@ module Parker
|
|
16
18
|
|
17
19
|
FileUtils.mkdir(platform_path) unless Dir.exist?(platform_path)
|
18
20
|
FileUtils.cp(screenshot.path, new_file_path)
|
21
|
+
|
22
|
+
copied_screenshots += 1
|
19
23
|
end
|
24
|
+
|
25
|
+
copied_screenshots
|
20
26
|
end
|
21
27
|
end
|
22
28
|
end
|
data/lib/parker/version.rb
CHANGED