sensible-cinema 0.22.1 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.TXT +7 -4
- data/README +84 -68
- data/Rakefile +21 -23
- data/TODO +93 -60
- data/VERSION +1 -1
- data/bin/sensible-cinema +201 -123
- data/change_log_with_feature_list.txt +10 -0
- data/development.txt +11 -2
- data/go.bat +1 -1
- data/go.sh +1 -0
- data/go_ocr_tracker.bat +1 -1
- data/goc.bat +1 -0
- data/lib/auto_convert.rb +4 -3
- data/lib/check_installed_mac.rb +40 -0
- data/lib/drive_info.rb +25 -13
- data/lib/edl_parser.rb +1 -3
- data/lib/mencoder_wrapper.rb +11 -6
- data/lib/mouse.rb +1 -1
- data/lib/mplayer_edl.rb +1 -2
- data/lib/ocr.rb +8 -3
- data/lib/subtitle_profanity_finder.rb +68 -21
- data/lib/swing_helpers.rb +1 -1
- data/sensible-cinema.gemspec +20 -5
- data/spec/arse.srt +36 -0
- data/spec/common.rb +1 -1
- data/spec/deity_end.srt +11 -0
- data/spec/dragon.srt +1 -2
- data/spec/drive_info.spec.rb +25 -6
- data/spec/notes +99 -15
- data/spec/sensible_cinema_gui.spec.rb +8 -5
- data/spec/subtitle_profanity_finder.spec.rb +56 -6
- data/template_bats/RUN SENSIBLE CINEMA CLICK HERE.bat +2 -2
- data/todo.inventionzy.txt +0 -12
- data/todo.open_edl_list_org.txt +2 -0
- data/{propaganda → todo.propaganda} +4 -1
- data/todo.subtitle +3 -22
- data/vendor/mac_dvdid/bin/dvdid +0 -0
- data/vendor/mac_dvdid/include/dvdid/dvdid.h +67 -0
- data/vendor/mac_dvdid/include/dvdid/dvdid2.h +131 -0
- data/vendor/mac_dvdid/include/dvdid/export.h +32 -0
- data/vendor/mac_dvdid/lib/libdvdid.0.dylib +0 -0
- data/vendor/mac_dvdid/lib/libdvdid.a +0 -0
- data/vendor/mac_dvdid/lib/libdvdid.dylib +0 -0
- data/vendor/mac_dvdid/lib/libdvdid.la +41 -0
- data/www/index.html +16 -5
- data/zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt +3 -3
- data/zamples/edit_decision_lists/dvds/Harry Potter 2.txt +3 -4
- data/zamples/edit_decision_lists/dvds/bambi.txt +20 -0
- data/zamples/edit_decision_lists/dvds/big_buck_bunny_dvd.txt +6 -7
- data/zamples/edit_decision_lists/dvds/bob the builder pets in a pickle.txt +1 -1
- data/zamples/edit_decision_lists/dvds/bobs_big_plan.txt +1 -1
- data/zamples/edit_decision_lists/dvds/happiest baby on the block.txt +1 -1
- data/zamples/edit_decision_lists/dvds/how_to_train_your_dragon.txt +2 -2
- data/zamples/edit_decision_lists/dvds/kung_fu_panda_1.txt +17 -0
- data/zamples/edit_decision_lists/dvds/legend_of_the_guardians_the_owls_of_gahoole.txt +1 -1
- data/zamples/edit_decision_lists/dvds/making_marriage_work.txt +3 -5
- data/zamples/edit_decision_lists/dvds/narnia_voyage_of_the_dawn_treader.txt +16 -0
- data/zamples/edit_decision_lists/dvds/old_and_inaccurate/star_trek_generations_hulu.txt +1 -1
- data/zamples/edit_decision_lists/dvds/pack_wedding_2007-03-03.txt +4 -4
- data/zamples/edit_decision_lists/dvds/sintel_open_source_blender.txt +2 -1
- data/zamples/edit_decision_lists/dvds/tron_legacy.txt +1 -1
- data/zamples/edit_decision_lists/dvds/turn_around_alma_younger.txt +1 -1
- data/zamples/edit_decision_lists/dvds/{example_delete_list_that_has_no_cuts_in_it.txt → zz_example_delete_list_that_has_no_cuts_in_it.txt} +2 -2
- data/zamples/edit_decision_lists/old_not_yet_updated/example_edit_decision_list.txt +2 -2
- data/zamples/edit_decision_lists/youtube/demo_mutes.txt +1 -1
- metadata +20 -5
- data/gocreatemode.bat +0 -1
@@ -1,3 +1,13 @@
|
|
1
|
+
== 0.23.0 ==
|
2
|
+
|
3
|
+
OS X compatibility. Though not heavily used it might work.
|
4
|
+
|
5
|
+
Subtitle parser/scanner: now it can scan for "complete" words (e.g. hello is no longer considered a profanity)
|
6
|
+
even if they complete words are at the end of lines, middle, beginning, or the entire line. With unit tests.
|
7
|
+
|
8
|
+
Added a "play unedited with smplayer/mplayer" buttons that work better now. These are useful for
|
9
|
+
double checking the timestamps of subtitle files for accuracy.
|
10
|
+
|
1
11
|
== 0.22.1 ==
|
2
12
|
|
3
13
|
Test release for automated sourceforge build system
|
data/development.txt
CHANGED
@@ -29,14 +29,23 @@ Currently it's windows only, ping me if you want that changed.
|
|
29
29
|
|
30
30
|
Note: you transfer (c) to copyrighted published of sensible cinema when you submit patches.
|
31
31
|
|
32
|
-
|
32
|
+
To run:
|
33
|
+
$ jruby bin/sensible-cinema # DVD output "parser/cutter"
|
34
|
+
$ jruby bin/sensible-cinema --create-mode # DVD output "parser/cutter" create mode [advanced]
|
35
|
+
$ jruby bin/sensible-cinema-cli # the experimental OCR tracker for arbitrary online/local/internet players.
|
36
|
+
|
37
|
+
See also the rake file for ability to bundle/run all the specs.
|
33
38
|
|
34
39
|
All feedback/contribution welcome :)
|
35
40
|
|
41
|
+
== mac os x developers ==
|
42
|
+
|
43
|
+
You'll have to install a few dependencies. It will tell you which, or you can discover them by running lib/check_installed_xxx.rb
|
44
|
+
|
36
45
|
== Advanced Usage ==
|
37
46
|
|
38
47
|
For the screen tracker (experimental version--see experimental.txt),
|
39
48
|
you could specify the scene descriptions list and player list on the command-line, so you don't want to have
|
40
49
|
to re-select them like this will tell you how to run it from the command line:
|
41
50
|
|
42
|
-
C:\sensible-cinema-git-clone>jruby bin\sensible-cinema-cli --help
|
51
|
+
C:\sensible-cinema-git-clone>jruby bin\sensible-cinema-cli --help
|
data/go.bat
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
@rem NB that you can call it like go --debug
|
2
|
-
call j %* bin\sensible-cinema
|
2
|
+
call j %* bin\sensible-cinema
|
data/go.sh
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
jruby bin/sensible-cinema $1 $2 $3 $4 $5 # --create-mode
|
data/go_ocr_tracker.bat
CHANGED
@@ -1 +1 @@
|
|
1
|
-
call j bin\sensible-cinema-cli %*
|
1
|
+
call j bin\sensible-cinema-cli %*
|
data/goc.bat
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
call j %* bin\sensible-cinema --create-mode
|
data/lib/auto_convert.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
seconds = (ARGV[0] || 1000).to_f
|
1
|
+
seconds = eval(ARGV[0] || "1000").to_f
|
2
2
|
p 'syntax: second to convert, first conversion ratio, second conversation ratio'
|
3
|
-
|
4
|
-
p '
|
3
|
+
twentyNinePointNineSeven = 30000/1001.0
|
4
|
+
p 'converted value is', seconds * (ARGV[1] || twentyNinePointNineSeven/30).to_f
|
5
|
+
p 'another converted value is', seconds* (ARGV[2] || 30/twentyNinePointNineSeven).to_f
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'os'
|
3
|
+
success = true
|
4
|
+
|
5
|
+
# MPlayer OSX Extended instead of smplayer... ?
|
6
|
+
module CheckInstalledMac
|
7
|
+
def self.check_for_installed name
|
8
|
+
if name == 'mencoder'
|
9
|
+
output = `mencoder --fail 2>&1`
|
10
|
+
if output =~ /mencoder/i
|
11
|
+
# success, it is installed
|
12
|
+
return true
|
13
|
+
else
|
14
|
+
# fall through
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
command = {"gocr" => "gocr --help", "convert" => "convert --help",
|
19
|
+
"mplayer" => "mplayer", "mencoder" => "fakey", "ffmpeg" => "ffmpeg -version"}[name]
|
20
|
+
|
21
|
+
raise 'unknown ' + name unless command # double check
|
22
|
+
|
23
|
+
unless system(command + " 1> " + OS.dev_null + " 2>" + OS.dev_null)
|
24
|
+
name = 'ImageMagick' if name == 'convert' # special case...
|
25
|
+
puts 'lacking dependency! Please install ' + name + ' by running $ sudo port install ' + name
|
26
|
+
false
|
27
|
+
else
|
28
|
+
true
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
if $0 == __FILE__
|
35
|
+
for name in ['gocr', 'convert', 'mplayer', 'ffmpeg'] do
|
36
|
+
if CheckInstalledMac.check_for_installed name
|
37
|
+
puts 'has dep:' + name
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/drive_info.rb
CHANGED
@@ -16,51 +16,63 @@ This file is part of Sensible Cinema.
|
|
16
16
|
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
17
|
=end
|
18
18
|
require 'digest/md5'
|
19
|
+
require 'rubygems'
|
19
20
|
require 'sane'
|
20
21
|
require 'ostruct'
|
21
22
|
|
22
23
|
class DriveInfo
|
23
24
|
|
24
25
|
def self.md5sum_disk(dir)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
if OS.mac?
|
27
|
+
output = `#{__DIR__}/../vendor/mac_dvdid/bin/dvdid #{dir}`
|
28
|
+
else
|
29
|
+
output = `#{__DIR__}/../vendor/dvdid.exe #{dir}`
|
30
|
+
end
|
31
|
+
puts 'dvdid command failed?' unless $?.exitstatus == 0 # hope this accomodates for it barfing...
|
32
|
+
output.strip
|
32
33
|
end
|
33
34
|
|
34
35
|
def self.get_dvd_drives_as_openstruct
|
35
36
|
disks = get_all_drives_as_ostructs
|
36
|
-
disks.select{|d| d.Description =~ /CD-ROM/}
|
37
|
+
disks.select{|d| d.Description =~ /CD-ROM/}
|
37
38
|
end
|
38
39
|
|
39
40
|
def self.get_drive_with_most_space_with_slash
|
40
41
|
disks = get_all_drives_as_ostructs
|
41
42
|
most_space = disks.sort_by{|d| d.FreeSpace}[-1]
|
42
|
-
most_space.
|
43
|
+
most_space.MountPoint + "/"
|
43
44
|
end
|
44
45
|
|
45
46
|
def self.get_all_drives_as_ostructs
|
46
47
|
if OS.mac?
|
47
48
|
require 'plist'
|
48
|
-
|
49
|
+
Dir['/Volumes/*'].map{|dir|
|
49
50
|
parsed = Plist.parse_xml(`diskutil info -plist "#{dir}"`)
|
50
51
|
d2 = OpenStruct.new
|
51
52
|
d2.VolumeName = parsed["VolumeName"]
|
52
53
|
d2.Name = dir # DevNode?
|
53
54
|
d2.FreeSpace = parsed["FreeSpace"].to_i
|
54
|
-
d2.Description = parsed['
|
55
|
+
d2.Description = parsed['OpticalDeviceType']
|
56
|
+
d2.MountPoint = parsed['MountPoint']
|
57
|
+
if d2.MountPoint == '/'
|
58
|
+
d2.MountPoint = File.expand_path '~' # better ?
|
59
|
+
end
|
55
60
|
d2
|
56
61
|
}
|
57
|
-
a
|
58
62
|
else
|
59
63
|
require 'ruby-wmi'
|
60
64
|
disks = WMI::Win32_LogicalDisk.find(:all)
|
61
|
-
disks.map{|d| d2 = OpenStruct.new; d2.Description = d.Description; d2.VolumeName = d.VolumeName; d2.Name = d.Name;
|
65
|
+
disks.map{|d| d2 = OpenStruct.new; d2.Description = d.Description; d2.VolumeName = d.VolumeName; d2.Name = d.Name;
|
66
|
+
d2.FreeSpace = d.FreeSpace.to_i
|
67
|
+
d2.MountPoint = d.Name[0..2]
|
68
|
+
d2
|
69
|
+
}
|
62
70
|
end
|
63
71
|
end
|
64
72
|
|
65
73
|
end
|
66
74
|
|
75
|
+
if $0 == __FILE__
|
76
|
+
require 'pp'
|
77
|
+
p DriveInfo.get_dvd_drives_as_openstruct
|
78
|
+
end
|
data/lib/edl_parser.rb
CHANGED
@@ -16,8 +16,6 @@ This file is part of Sensible Cinema.
|
|
16
16
|
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
17
|
=end
|
18
18
|
|
19
|
-
require_relative 'overlayer'
|
20
|
-
|
21
19
|
class EdlParser
|
22
20
|
|
23
21
|
def self.parse_file filename, ignore_settings = false
|
@@ -203,4 +201,4 @@ end
|
|
203
201
|
|
204
202
|
if RUBY_VERSION < '1.8.7'
|
205
203
|
raise 'needs ruby 1.8.7 at least'
|
206
|
-
end
|
204
|
+
end
|
data/lib/mencoder_wrapper.rb
CHANGED
@@ -23,15 +23,20 @@ class MencoderWrapper
|
|
23
23
|
end
|
24
24
|
class << self
|
25
25
|
|
26
|
-
def get_header
|
26
|
+
def get_header this_file, these_settings
|
27
27
|
out = ''
|
28
28
|
if File.exist?(@big_temp) && File.exist?(@big_temp + '.done')
|
29
|
-
out = '@rem '
|
29
|
+
out = '@rem ' # don't re-do this file if .done file already exists...
|
30
30
|
end
|
31
31
|
audio_codec = these_settings['audio_codec'] || 'mp3lame' # not copy...sniff...or you can't hear cars... LODO
|
32
|
-
# LODO do I need mp3lame for sintel, or can I get away with lavc?
|
33
|
-
|
34
|
-
|
32
|
+
# LODO do I need mp3lame for sintel, or can I get away with lavc? will it work overall currently?
|
33
|
+
# -vf pullup,softskip "fixes" freaky mixed DVD's, or so they tell me...
|
34
|
+
# harddup is "to create a DVD compliant" video which...I think I don't need...but DVD players require it...
|
35
|
+
# "This will result in a slightly bigger file, but will not cause problems when demuxing or remuxing into other container formats." LODO no harddup ok ???
|
36
|
+
# lodo: can I use ffmpeg to unmux-ify/GOP'ify perhaps?
|
37
|
+
# LODO 24000/1001 ?
|
38
|
+
video_opts = "-vf scale=pullup,softskip,harddup -ovc lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=1:vstrict=0:acodec=ac3:abitrate=192:autoaspect -ofps 30000/1001"
|
39
|
+
out += "mencoder \"#{this_file.gsub('"', '\\"')}\" -of mpeg -mpegopts format=dvd:tsaf -alang en -nocache -sid 1000 -oac #{audio_codec} #{video_opts} -o #{@big_temp} -dvd-device #{this_drive} && echo done_grabbing > #{@big_temp}.done\n"
|
35
40
|
end
|
36
41
|
|
37
42
|
def calculate_final_filename to_here_final_file
|
@@ -44,7 +49,7 @@ class MencoderWrapper
|
|
44
49
|
@dvd_title_track = dvd_title_track
|
45
50
|
assert dvd_title_track
|
46
51
|
if start_here || end_here
|
47
|
-
raise 'need
|
52
|
+
raise 'need end and start' unless end_here && start_here
|
48
53
|
start_here = EdlParser.translate_string_to_seconds(start_here)
|
49
54
|
end_here = EdlParser.translate_string_to_seconds(end_here)
|
50
55
|
combined.select!{|start, endy, type| start > start_here && endy < end_here }
|
data/lib/mouse.rb
CHANGED
data/lib/mplayer_edl.rb
CHANGED
@@ -16,7 +16,6 @@ This file is part of Sensible Cinema.
|
|
16
16
|
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
17
|
=end
|
18
18
|
|
19
|
-
require_relative 'overlayer'
|
20
19
|
require_relative 'edl_parser'
|
21
20
|
|
22
21
|
class MplayerEdl
|
@@ -30,4 +29,4 @@ class MplayerEdl
|
|
30
29
|
end
|
31
30
|
out
|
32
31
|
end
|
33
|
-
end
|
32
|
+
end
|
data/lib/ocr.rb
CHANGED
@@ -29,8 +29,13 @@ end
|
|
29
29
|
|
30
30
|
# helper for OCR'ing single digits that were screen captured
|
31
31
|
module OCR
|
32
|
-
|
33
|
-
|
32
|
+
if OS.windows?
|
33
|
+
GOCR = File.expand_path(File.dirname(__FILE__) + "/../vendor/gocr049.exe -C 0-9:/ ")
|
34
|
+
else
|
35
|
+
require_relative 'check_installed_mac'
|
36
|
+
exit 1 unless CheckInstalledMac.check_for_installed 'gocr'
|
37
|
+
GOCR = "gocr"
|
38
|
+
end
|
34
39
|
|
35
40
|
CACHE = {}
|
36
41
|
|
@@ -107,4 +112,4 @@ module OCR
|
|
107
112
|
|
108
113
|
extend self
|
109
114
|
|
110
|
-
end
|
115
|
+
end
|
@@ -50,14 +50,15 @@ module SubtitleProfanityFinder
|
|
50
50
|
|
51
51
|
|
52
52
|
|
53
|
-
profanities = {'hell' => '
|
53
|
+
profanities = {'hell' => ['he..', true],
|
54
54
|
'g' +
|
55
|
-
'o' + 100.chr => '
|
55
|
+
'o' + 100.chr => 'deity', 'g' +
|
56
56
|
111.chr +
|
57
57
|
100.chr +
|
58
|
-
's' => '
|
58
|
+
's' => 'deitys',
|
59
59
|
'lord' => 'lo..', 'da' +
|
60
|
-
'mn' => 'da..',
|
60
|
+
'mn' => 'da..',
|
61
|
+
'f' +
|
61
62
|
117.chr +
|
62
63
|
99.chr +
|
63
64
|
107.chr =>
|
@@ -65,10 +66,17 @@ module SubtitleProfanityFinder
|
|
65
66
|
'bi' +
|
66
67
|
'tc' + 104.chr => 'b.....',
|
67
68
|
'bas' +
|
68
|
-
'
|
69
|
-
('a' +
|
70
|
-
's'*2) => 'a..',
|
71
|
-
|
69
|
+
'ta' + 'r' + 100.chr => 'ba.....',
|
70
|
+
((arse = 'a' +
|
71
|
+
's'*2)) => ['a..', true],
|
72
|
+
arse + 'h' +
|
73
|
+
'ole' => 'a..h...',
|
74
|
+
arse + 'wipe' => 'a..w....',
|
75
|
+
'breast' => 'br....',
|
76
|
+
'jesus' => 'jes..',
|
77
|
+
'chri' +
|
78
|
+
'st'=> ['chri..', true], # allow for christian [?]
|
79
|
+
'a realllly bad word' => ['test bad word', true]
|
72
80
|
}
|
73
81
|
|
74
82
|
incoming = File.read(args.shift)
|
@@ -79,35 +87,74 @@ module SubtitleProfanityFinder
|
|
79
87
|
profanities[prof] = sanitized
|
80
88
|
end
|
81
89
|
|
82
|
-
|
90
|
+
all_profanity_combinations = []
|
83
91
|
|
84
|
-
|
85
|
-
|
92
|
+
profanities.to_a.sort.reverse.each{|profanity, sanitized|
|
93
|
+
as_regexp = Regexp.new(profanity, Regexp::IGNORECASE)
|
94
|
+
sanitized = Array(sanitized)
|
95
|
+
is_single_word_profanity = sanitized[1]
|
96
|
+
permutations = [profanity]
|
97
|
+
|
98
|
+
if profanity =~ /l/
|
99
|
+
permutations << profanity.gsub(/l/i, 'i')
|
100
|
+
end
|
101
|
+
|
102
|
+
if profanity =~ /i/
|
103
|
+
permutations << profanity.gsub(/i/i, 'l')
|
104
|
+
end
|
105
|
+
|
106
|
+
for profanity in permutations
|
107
|
+
if is_single_word_profanity
|
108
|
+
# oh wow this is ughly...
|
109
|
+
sanitized_version = sanitized[0]
|
110
|
+
as_regexp = Regexp.new("\s" + profanity + "\s", Regexp::IGNORECASE)
|
111
|
+
all_profanity_combinations << [as_regexp, ' ' + sanitized_version + ' ']
|
112
|
+
as_regexp = Regexp.new("^" + profanity + "\s", Regexp::IGNORECASE)
|
113
|
+
all_profanity_combinations << [as_regexp, sanitized_version + ' ']
|
114
|
+
as_regexp = Regexp.new("\s" + profanity + "$", Regexp::IGNORECASE)
|
115
|
+
all_profanity_combinations << [as_regexp, ' ' + sanitized_version]
|
116
|
+
as_regexp = Regexp.new("^" + profanity + "$", Regexp::IGNORECASE)
|
117
|
+
all_profanity_combinations << [as_regexp, sanitized_version]
|
118
|
+
else
|
119
|
+
raise unless sanitized.length == 1 # that would be weird elsewise...
|
120
|
+
all_profanity_combinations << [as_regexp, sanitized[0]]
|
121
|
+
end
|
122
|
+
end
|
123
|
+
}
|
86
124
|
|
87
|
-
|
125
|
+
output = ''
|
126
|
+
# from a timestamp to a line with nothing :)
|
127
|
+
for glop in incoming.scan(/\d\d:\d\d:\d\d.*?^$/m)
|
128
|
+
for profanity, (sanitized, whole_word) in all_profanity_combinations
|
88
129
|
# dunno if we should force words to just start with this or contain it anywhere...
|
89
130
|
# what about 'g..ly' for example?
|
90
|
-
# or 'un...ly' ?
|
131
|
+
# or 'un...ly' ? I think we're ok there...
|
91
132
|
|
92
133
|
if glop =~ profanity
|
93
134
|
# create english-ified version
|
94
135
|
# take out timing line, number line
|
95
|
-
sanitized_glop = glop.lines.to_a[1..-
|
136
|
+
sanitized_glop = glop.lines.to_a[1..-1].join(' ')
|
96
137
|
sanitized_glop.gsub!(/[\r\n]/, '') # flatten 3 lines to 1
|
97
|
-
sanitized_glop.gsub!(/<i
|
98
|
-
sanitized_glop.gsub!(/[^a-zA-Z0-9]/, ' ') # kill weird stuff like ellipses
|
99
|
-
|
100
|
-
|
138
|
+
sanitized_glop.gsub!(/<(.|)(\/|)i>/i, '') # kill <i>
|
139
|
+
sanitized_glop.gsub!(/[^a-zA-Z0-9'""]/, ' ') # kill weird stuff like ellipses
|
140
|
+
sanitized_glop.gsub!(/\W\W+/, ' ') # remove duplicate " " 's
|
141
|
+
|
101
142
|
# sanitize
|
102
|
-
for (prof2, sanitized2) in
|
103
|
-
sanitized_glop
|
143
|
+
for (prof2, (sanitized2, whole_word2)) in all_profanity_combinations
|
144
|
+
if sanitized_glop =~ prof2
|
145
|
+
require 'ruby-debug'
|
146
|
+
#debugger
|
147
|
+
end
|
148
|
+
if sanitized_glop =~ prof2
|
149
|
+
sanitized_glop.gsub!(prof2, sanitized2)
|
150
|
+
end
|
104
151
|
end
|
105
152
|
|
106
153
|
# extract timing info
|
107
154
|
timing_line = glop.split("\n").first.strip
|
108
155
|
timing_line =~ /((\d\d:\d\d:\d\d),(\d\d\d) --> (\d\d:\d\d:\d\d),(\d\d\d))/
|
109
156
|
# "00:03:00.0" , "00:04:00.0", "violence", "of some sort",
|
110
|
-
output += %!"#{$2}.#{$3}" , "#{$4}.#{$5}", "profanity", "#{sanitized}", "#{sanitized_glop.strip}",\n!
|
157
|
+
output += %!"#{$2}.#{$3}" , "#{$4}.#{$5}", "profanity", "#{sanitized.strip}", "#{sanitized_glop.strip}",\n!
|
111
158
|
end
|
112
159
|
|
113
160
|
end
|
data/lib/swing_helpers.rb
CHANGED
@@ -89,7 +89,7 @@ module SensibleSwing
|
|
89
89
|
end
|
90
90
|
|
91
91
|
class NonBlockingDialog < JDialog
|
92
|
-
def initialize title_and_display_text, close_button_text= 'Close'
|
92
|
+
def initialize title_and_display_text, close_button_text = 'Close'
|
93
93
|
super nil
|
94
94
|
lines = title_and_display_text.split("\n")
|
95
95
|
set_title lines[0]
|
data/sensible-cinema.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sensible-cinema}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.23.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Roger Pack"]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-27}
|
13
13
|
s.email = %q{rogerdpack@gmail.com}
|
14
14
|
s.executables = ["sensible-cinema", "sensible-cinema-cli"]
|
15
15
|
s.extra_rdoc_files = [
|
@@ -31,8 +31,9 @@ Gem::Specification.new do |s|
|
|
31
31
|
"development.txt",
|
32
32
|
"experimental_ocr_readme.txt",
|
33
33
|
"go.bat",
|
34
|
+
"go.sh",
|
34
35
|
"go_ocr_tracker.bat",
|
35
|
-
"
|
36
|
+
"goc.bat",
|
36
37
|
"gplv3.txt",
|
37
38
|
"how_to_create_your_own_delete_lists.txt",
|
38
39
|
"is_it_legal_to_copy_dvds.txt",
|
@@ -42,6 +43,7 @@ Gem::Specification.new do |s|
|
|
42
43
|
"lib/add_any_bundled_gems_to_load_path.rb",
|
43
44
|
"lib/auto_convert.rb",
|
44
45
|
"lib/blanker.rb",
|
46
|
+
"lib/check_installed_mac.rb",
|
45
47
|
"lib/count_down_timer_jruby_swing.rb",
|
46
48
|
"lib/drive_info.rb",
|
47
49
|
"lib/edl_converter.rb",
|
@@ -66,11 +68,12 @@ Gem::Specification.new do |s|
|
|
66
68
|
"never_do",
|
67
69
|
"ocr.todo_if_need_speed",
|
68
70
|
"preamble",
|
69
|
-
"propaganda",
|
70
71
|
"sensible-cinema.gemspec",
|
72
|
+
"spec/arse.srt",
|
71
73
|
"spec/blanker.spec.rb",
|
72
74
|
"spec/common.rb",
|
73
75
|
"spec/convert_image.rb",
|
76
|
+
"spec/deity_end.srt",
|
74
77
|
"spec/dragon.srt",
|
75
78
|
"spec/drive_info.spec.rb",
|
76
79
|
"spec/edl_parser.spec.rb",
|
@@ -96,23 +99,34 @@ Gem::Specification.new do |s|
|
|
96
99
|
"todo.build_library.txt",
|
97
100
|
"todo.inventionzy.txt",
|
98
101
|
"todo.open_edl_list_org.txt",
|
102
|
+
"todo.propaganda",
|
99
103
|
"todo.subtitle",
|
100
104
|
"vendor/jruby-complete-1.6.2.jar",
|
105
|
+
"vendor/mac_dvdid/bin/dvdid",
|
106
|
+
"vendor/mac_dvdid/include/dvdid/dvdid.h",
|
107
|
+
"vendor/mac_dvdid/include/dvdid/dvdid2.h",
|
108
|
+
"vendor/mac_dvdid/include/dvdid/export.h",
|
109
|
+
"vendor/mac_dvdid/lib/libdvdid.0.dylib",
|
110
|
+
"vendor/mac_dvdid/lib/libdvdid.a",
|
111
|
+
"vendor/mac_dvdid/lib/libdvdid.dylib",
|
112
|
+
"vendor/mac_dvdid/lib/libdvdid.la",
|
101
113
|
"vendor/monkey.png",
|
102
114
|
"vendor/readme.txt",
|
103
115
|
"www/index.html",
|
104
116
|
"zamples/edit_decision_lists/category descriptions.txt",
|
105
117
|
"zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt",
|
106
118
|
"zamples/edit_decision_lists/dvds/Harry Potter 2.txt",
|
119
|
+
"zamples/edit_decision_lists/dvds/bambi.txt",
|
107
120
|
"zamples/edit_decision_lists/dvds/big_buck_bunny_dvd.txt",
|
108
121
|
"zamples/edit_decision_lists/dvds/bob the builder pets in a pickle.txt",
|
109
122
|
"zamples/edit_decision_lists/dvds/bobs_big_plan.txt",
|
110
123
|
"zamples/edit_decision_lists/dvds/example_delete_list.txt",
|
111
|
-
"zamples/edit_decision_lists/dvds/example_delete_list_that_has_no_cuts_in_it.txt",
|
112
124
|
"zamples/edit_decision_lists/dvds/happiest baby on the block.txt",
|
113
125
|
"zamples/edit_decision_lists/dvds/how_to_train_your_dragon.txt",
|
126
|
+
"zamples/edit_decision_lists/dvds/kung_fu_panda_1.txt",
|
114
127
|
"zamples/edit_decision_lists/dvds/legend_of_the_guardians_the_owls_of_gahoole.txt",
|
115
128
|
"zamples/edit_decision_lists/dvds/making_marriage_work.txt",
|
129
|
+
"zamples/edit_decision_lists/dvds/narnia_voyage_of_the_dawn_treader.txt",
|
116
130
|
"zamples/edit_decision_lists/dvds/old_and_inaccurate/White Christmas.txt",
|
117
131
|
"zamples/edit_decision_lists/dvds/old_and_inaccurate/all_dogs_go_to_heaven.txt",
|
118
132
|
"zamples/edit_decision_lists/dvds/old_and_inaccurate/cars_disney.txt",
|
@@ -124,6 +138,7 @@ Gem::Specification.new do |s|
|
|
124
138
|
"zamples/edit_decision_lists/dvds/sintel_open_source_blender.txt",
|
125
139
|
"zamples/edit_decision_lists/dvds/tron_legacy.txt",
|
126
140
|
"zamples/edit_decision_lists/dvds/turn_around_alma_younger.txt",
|
141
|
+
"zamples/edit_decision_lists/dvds/zz_example_delete_list_that_has_no_cuts_in_it.txt",
|
127
142
|
"zamples/edit_decision_lists/netflix/greatest_story_ever_told_netflix.txt",
|
128
143
|
"zamples/edit_decision_lists/old_not_yet_updated/example_edit_decision_list.txt",
|
129
144
|
"zamples/edit_decision_lists/old_not_yet_updated/youtube/gummy_bear_song_youtube.txt",
|