vcs_ruby 1.0.0 → 1.0.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.
- data/bin/vcs.rb +24 -11
- data/lib/libav.rb +8 -3
- data/lib/oldstyle.yml +15 -5
- data/lib/tools.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
data/bin/vcs.rb
CHANGED
@@ -79,14 +79,14 @@ optparse = OptionParser.new do|opts|
|
|
79
79
|
end
|
80
80
|
opts.on( '-o [FILE]', '--output [FILE]', 'File name of output. When ommited will be derived from the input filename. Can be repeated for multiple files.') do |file|
|
81
81
|
options[:output] << file
|
82
|
-
end
|
82
|
+
end
|
83
83
|
opts.on( '-s [SIGNATURE]', '--signature [SIGNATURE]', 'Change the image signature to your preference.') do |signature|
|
84
84
|
options[:signature] = signature
|
85
85
|
end
|
86
86
|
opts.on( '--no-signature', 'Remove footer with signature') do
|
87
87
|
options[:no_signature] = true
|
88
88
|
end
|
89
|
-
opts.on( '-l [HIGHLIGHT]', '--highlight [HIGHLIGHT]' 'Add the frame found at timestamp [HIGHLIGHT] as a highlight.') do |highlight|
|
89
|
+
opts.on( '-l [HIGHLIGHT]', '--highlight [HIGHLIGHT]', 'Add the frame found at timestamp [HIGHLIGHT] as a highlight.') do |highlight|
|
90
90
|
options[:highlight] = TimeIndex.new highlight
|
91
91
|
end
|
92
92
|
opts.on("--[no-]timestamp", "Add timestamp to thumbnails. Default: true") do |timestamp|
|
@@ -95,19 +95,22 @@ optparse = OptionParser.new do|opts|
|
|
95
95
|
opts.on("--[no-]shadow", "Add shadow to thumbnails. Default: true") do |shadow|
|
96
96
|
options[:shadow] = shadow
|
97
97
|
end
|
98
|
-
opts.on("--[no-]polaroid", "
|
98
|
+
opts.on("--[no-]polaroid", "Add polaroid frame to thumbnail. Default: false") do |polaroid|
|
99
99
|
options[:polaroid] = polaroid
|
100
100
|
end
|
101
|
-
opts.on( '-p [PROFILE]', '--profile [PROFILE]' 'Loads additional setting from profile.yml.') do |profile|
|
101
|
+
opts.on( '-p [PROFILE]', '--profile [PROFILE]', 'Loads additional setting from profile.yml.') do |profile|
|
102
102
|
options[:profile] = profile
|
103
103
|
end
|
104
|
-
opts.on( '-q', '--quiet', 'Don\'t print progress messages just errors.
|
104
|
+
opts.on( '-q', '--quiet', 'Don\'t print progress messages just errors.') do |file|
|
105
105
|
options[:quiet] = true
|
106
106
|
end
|
107
|
+
opts.on('--continue', 'Prints Error message and continues with next file (if any left)') do |file|
|
108
|
+
options[:continue] = true
|
109
|
+
end
|
107
110
|
opts.on("-V", "--verbose", "More verbose Output.") do
|
108
111
|
options[:verbose] = true
|
109
112
|
end
|
110
|
-
opts.on( '-v', '--version', 'Version' ) do
|
113
|
+
opts.on( '-v', '--version', 'Current Version' ) do
|
111
114
|
puts $vcs_ruby_name + ' ' + $vcs_ruby_version.to_s
|
112
115
|
exit 0
|
113
116
|
end
|
@@ -143,14 +146,24 @@ Tools::quiet = options[:quiet]
|
|
143
146
|
|
144
147
|
# Invoke ContactSheet
|
145
148
|
|
146
|
-
|
147
|
-
|
149
|
+
errors = {}
|
150
|
+
ARGV.each_with_index do |video, index|
|
151
|
+
begin
|
148
152
|
sheet = Tools::contact_sheet_with_options video, options
|
149
153
|
sheet.initialize_filename(options[:output][index]) if options[:output][index]
|
150
154
|
sheet.build
|
155
|
+
rescue Exception => e
|
156
|
+
errors[video] = e
|
157
|
+
STDERR.puts "ERROR: #{e.message}"
|
158
|
+
STDERR.puts "#{e.backtrace.join("\n")}" if options[:verbose]
|
159
|
+
break unless options[:continue]
|
151
160
|
end
|
152
|
-
rescue Exception => e
|
153
|
-
STDERR.puts "ERROR: #{e.message}"
|
154
|
-
STDERR.puts "#{e.backtrace.join("\n")}" if options[:verbose]
|
155
161
|
end
|
156
162
|
|
163
|
+
if options[:continue] && errors.length > 0
|
164
|
+
errors.each do |video, e|
|
165
|
+
STDERR.puts "File: #{video}"
|
166
|
+
STDERR.puts "ERROR: #{e.message}"
|
167
|
+
end
|
168
|
+
STDERR.puts "Total: #{errors.length} Errors"
|
169
|
+
end
|
data/lib/libav.rb
CHANGED
@@ -104,10 +104,14 @@ module VCSRuby
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def format_split line
|
107
|
-
|
108
|
-
|
107
|
+
correction = 0
|
108
|
+
unless line[0] == ' '
|
109
|
+
correction = 1
|
110
|
+
end
|
111
|
+
e = line[ENCODING_SUPPORT - correction] == 'E'
|
112
|
+
v = line[VIDEO_CODEC - correction] == 'V'
|
109
113
|
|
110
|
-
name = line[NAME..-1].split(' ', 2).first
|
114
|
+
name = line[NAME-correction..-1].split(' ', 2).first
|
111
115
|
return name, e, v
|
112
116
|
rescue
|
113
117
|
return nil, false, false
|
@@ -166,6 +170,7 @@ private
|
|
166
170
|
end
|
167
171
|
|
168
172
|
def split_stream_line line
|
173
|
+
return [nil, nil, 'none'] unless line
|
169
174
|
parts = line.split(',')
|
170
175
|
stream = parts.shift
|
171
176
|
result = stream.split(':')
|
data/lib/oldstyle.yml
CHANGED
@@ -1,12 +1,22 @@
|
|
1
1
|
style:
|
2
2
|
header:
|
3
|
-
|
4
|
-
|
3
|
+
font: Nimbus-Mono-L-Bold
|
4
|
+
size: 18
|
5
|
+
color: Green
|
6
|
+
background: Black
|
5
7
|
title:
|
8
|
+
font: Nimbus-Mono-L-Bold
|
9
|
+
size: 40
|
10
|
+
color: Green
|
11
|
+
background: Black
|
6
12
|
color: White
|
7
13
|
background: Black
|
8
14
|
contact:
|
9
|
-
background:
|
15
|
+
background: Black
|
10
16
|
signature:
|
11
|
-
|
12
|
-
|
17
|
+
font: Nimbus-Mono-L-Bold
|
18
|
+
size: 18
|
19
|
+
color: Green
|
20
|
+
background: Black
|
21
|
+
filter:
|
22
|
+
softshadow: false
|
data/lib/tools.rb
CHANGED
@@ -58,7 +58,7 @@ module VCSRuby
|
|
58
58
|
sheet.to = options[:to] if options[:to]
|
59
59
|
sheet.highlight = options[:highlight] if options[:highlight]
|
60
60
|
|
61
|
-
sheet.
|
61
|
+
sheet.timestamp = options[:timestamp] if options[:timestamp] != nil
|
62
62
|
sheet.softshadow = options[:softshadow] if options[:softshadow] != nil
|
63
63
|
sheet.polaroid = options[:polaroid] if options[:polaroid] != nil
|
64
64
|
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcs_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-05-
|
12
|
+
date: 2016-05-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mini_magick
|