parker 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/parker +15 -15
- data/lib/parker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4de533ca51093b5ae208b415f9f5f17ffb2cd3f6
|
4
|
+
data.tar.gz: aebb29fd5cbe81af657be6bd05a9a18db564c2a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55502b335bb5d3b8c1363f8a4dad73c2b3223b59d76c62f5431795c908bbe965c62a1ce36dc3d5e98e2c6c801cb1487993109a8bb87622fb9682450e3f3b1e30
|
7
|
+
data.tar.gz: 179ad0483ad2dd9117b56a0965ecbf8895d668ae6d067c7b2d34ac2e098a689af41c9aa16b75f1c32e31b7d69f06aaeabdc9e61e6e5976eefbe99200e3b00b24
|
data/bin/parker
CHANGED
@@ -15,15 +15,20 @@ end
|
|
15
15
|
|
16
16
|
source_directory = File.expand_path(File.join('~/', '.config', 'parker'))
|
17
17
|
|
18
|
-
Optimist.options do
|
18
|
+
options = Optimist.options do
|
19
19
|
version "parker v#{Parker::VERSION}"
|
20
20
|
banner <<-BANNER
|
21
21
|
A ridiculous tool for organising game screenshots.
|
22
22
|
|
23
23
|
Usage:
|
24
|
-
parker
|
24
|
+
parker
|
25
25
|
Options:
|
26
|
-
BANNER
|
26
|
+
BANNER
|
27
|
+
|
28
|
+
opt :destination,
|
29
|
+
'Screenshot destination path',
|
30
|
+
type: :string,
|
31
|
+
default: '~/Pictures/Screenshots'
|
27
32
|
end
|
28
33
|
|
29
34
|
unless Dir.exist?(source_directory)
|
@@ -32,11 +37,9 @@ unless Dir.exist?(source_directory)
|
|
32
37
|
exit
|
33
38
|
end
|
34
39
|
|
35
|
-
Optimist.educate if ARGV.empty?
|
36
|
-
|
37
40
|
platforms = []
|
38
41
|
|
39
|
-
Dir
|
42
|
+
Dir[File.join(source_directory, 'platforms', '*.json')].each do |path|
|
40
43
|
klass = case File.basename(path, File.extname(path)).to_sym
|
41
44
|
when :ps4
|
42
45
|
'PS4'
|
@@ -62,7 +65,7 @@ if platforms.empty?
|
|
62
65
|
exit
|
63
66
|
end
|
64
67
|
|
65
|
-
output_path = File.expand_path(
|
68
|
+
output_path = File.expand_path(options[:destination])
|
66
69
|
FileUtils.mkdir_p(output_path) unless Dir.exist?(output_path)
|
67
70
|
|
68
71
|
puts 'Scanning...'
|
@@ -71,16 +74,13 @@ platforms.each do |platform|
|
|
71
74
|
platform.games.each_value do |game|
|
72
75
|
next unless game.screenshots.count.positive?
|
73
76
|
|
74
|
-
print "- #{game.name} (#{platform.name}): "
|
75
|
-
|
76
77
|
platform_path = File.join(output_path, platform.name)
|
77
|
-
|
78
|
+
copied = game.copy_screenshots(platform_path)
|
79
|
+
|
80
|
+
next unless copied.positive?
|
78
81
|
|
79
|
-
|
80
|
-
|
81
|
-
else
|
82
|
-
puts '✓'
|
83
|
-
end
|
82
|
+
print "- #{game.name} (#{platform.name}): "
|
83
|
+
puts "Copied #{copied} new screenshot#{'s' if copied != 1}."
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
data/lib/parker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Bogan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: optimist
|