vollbremsung 0.0.15 → 0.0.16
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 +8 -8
- data/bin/vollbremsung +18 -4
- data/lib/vollbremsung.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmI5NmM3OTYxYTVmNDQ1YmQ3Y2VmOTU5ZDc3MmYwNzU4N2M5ZjNlMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDk0MmJlMmE5ZGQ4NTNlODNkZmU2YzIyYzhiYzJmZjAwMWVhMWQ4MA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmIyNzc2OGUxNDZiMWI4NjViM2EwMzhkMThkNzI1ZGFhNDJlMDMxNGEzZWMy
|
10
|
+
MzdmZDlmNjU2M2I4NWMzYmEwODM5NjExMjhlYWE5ZTE2Nzc0ZTliMjc1ZWNm
|
11
|
+
YjE4ODMyZDQxYjhiZmNiYmQ1ZTA0OGY0ZDVhNGMyYmJlMTEwMmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWFhMGFjNzQ0NWYyZDA4ZWFiOWM0ZDA3ODkxODJiMTcxYTdkNmQ2MTkxMzJl
|
14
|
+
Yzg5NGJhNjk3ZDVjNmU2NDY5NzFjMmJjNDUzZWE3ZWIxMDgyYjQ4ZDE3Yjkx
|
15
|
+
NWQ3NjA4ZmJlMGJmOTI4MjNiZmZlNzMxMjkxMjdlY2RmMmVlMGI=
|
data/bin/vollbremsung
CHANGED
@@ -22,6 +22,13 @@ def ffprobe(file)
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
# square brackets have a special meaning in the context of shell globbing
|
26
|
+
# --> escape them in order to find files in directories with [, ], {, }
|
27
|
+
# symbols in their path
|
28
|
+
def escape_glob(s)
|
29
|
+
s.gsub(/[\\\{\}\[\]\*\?]/) { |x| "\\"+x }
|
30
|
+
end
|
31
|
+
|
25
32
|
options = {}
|
26
33
|
|
27
34
|
OptionParser.new do |opts|
|
@@ -107,29 +114,36 @@ unless options[:list_only]
|
|
107
114
|
unless find_executable('HandbrakeCLI') || find_executable('HandBrakeCLI')
|
108
115
|
puts "It seems you do not have HandbrakeCLI installed or it is not available in your $PATH."
|
109
116
|
puts "You can get the executable from http://handbrake.fr/downloads.php"
|
117
|
+
|
118
|
+
File.delete 'mkmf.log' if File.exists?('mkmf.log') # find_executable seems to create such file in case executable is not found
|
110
119
|
exit 1
|
111
120
|
end
|
112
121
|
|
113
122
|
unless find_executable 'ffprobe'
|
114
123
|
puts "It seems you do not have ffprobe installed or it is not available in your $PATH."
|
115
124
|
puts "ffprobe is part of ffmpeg. Install it for your system and run again."
|
125
|
+
|
126
|
+
File.delete 'mkmf.log' if File.exists?('mkmf.log') # find_executable seems to create such file in case executable is not found
|
116
127
|
exit 1
|
117
128
|
end
|
118
129
|
end
|
119
130
|
|
120
131
|
|
121
|
-
|
132
|
+
|
122
133
|
|
123
134
|
#HANDBRAKE_OPTIONS = "--encoder x264 --quality 20.0 --aencode faac -B 160 --mixdown dpl2 --arate Auto -D 0.0 --format mp4 --markers --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 --x264-preset veryfast --loose-anamorphic --modulus 2"
|
124
135
|
|
125
|
-
|
136
|
+
|
126
137
|
target_files = []
|
127
|
-
|
138
|
+
|
128
139
|
if File.directory?(TARGET_PATH)
|
129
140
|
|
130
141
|
scope = options[:recursive] ? "/**/*" : "/*"
|
131
142
|
|
132
|
-
|
143
|
+
log "probing for target files in #{File.absolute_path(TARGET_PATH) + scope}"
|
144
|
+
log "files found:"
|
145
|
+
|
146
|
+
Dir[escape_glob(File.absolute_path(TARGET_PATH)) + scope].sort.each do |file|
|
133
147
|
unless File.directory?(file)
|
134
148
|
if Vollbremsung::CONVERT_TYPES.include?(File.extname(file).downcase[1..-1])
|
135
149
|
puts "* " + File.absolute_path(file)[File.absolute_path(TARGET_PATH).length+1..-1]
|
data/lib/vollbremsung.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Vollbremsung
|
2
2
|
|
3
3
|
USAGE = "Usage: vollbremsung [options] <target>"
|
4
|
-
VERSION = '0.0.
|
4
|
+
VERSION = '0.0.16'
|
5
5
|
CONVERT_TYPES = ['mkv','avi','mov','flv','mpg','wmv','ogm']
|
6
6
|
FFMPEG_OPTIONS = "-map 0 -acodec copy -vcodec copy -scodec copy"
|
7
7
|
X264_DEFAULT_PRESET = "veryfast"
|