sensible-cinema 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/ChangeLog +4 -0
  2. data/LICENSE.TXT +70 -0
  3. data/README +95 -29
  4. data/TODO +85 -71
  5. data/USAGE_TERMS.TXT +15 -0
  6. data/VERSION +1 -1
  7. data/bin/sensible-cinema +90 -32
  8. data/bin/sensible-cinema-cli +17 -0
  9. data/edit sensible cinema decision list files.bat b/data/create new sensible cinema decision list → files.bat +0 -0
  10. data/ext/mkrf_conf.rb +17 -0
  11. data/how_to_create +1 -0
  12. data/lib/add_any_bundled_gems_to_load_path.rb +17 -0
  13. data/lib/blanker.rb +17 -0
  14. data/lib/drive_info.rb +17 -0
  15. data/lib/edl_parser.rb +17 -0
  16. data/lib/fake_blanker.rb +17 -0
  17. data/lib/file_chooser.rb +17 -0
  18. data/lib/keyboard_input.rb +17 -0
  19. data/lib/mencoder_wrapper.rb +32 -33
  20. data/lib/mouse.rb +17 -0
  21. data/lib/mouse_forever.rb +17 -0
  22. data/lib/mplayer_edl.rb +31 -0
  23. data/lib/muter.rb +17 -0
  24. data/lib/ocr.rb +17 -0
  25. data/lib/overlayer.rb +17 -0
  26. data/lib/screen_tracker.rb +18 -1
  27. data/lib/storage.rb +99 -82
  28. data/lib/swing_helpers.rb +17 -0
  29. data/lib/vlc_programmer.rb +17 -0
  30. data/preamble +17 -0
  31. data/sensible-cinema.gemspec +12 -5
  32. data/spec/blanker.spec.rb +17 -0
  33. data/spec/common.rb +17 -0
  34. data/spec/convert_image.rb +17 -0
  35. data/spec/drive_info.spec.rb +17 -0
  36. data/spec/edl_parser.spec.rb +17 -0
  37. data/spec/keyboard_input.spec.rb +17 -0
  38. data/spec/mencoder_wrapper.spec.rb +61 -21
  39. data/spec/mouse.spec.rb +17 -0
  40. data/spec/mplayer_edl.spec.rb +33 -0
  41. data/spec/muter.spec.rb +17 -0
  42. data/spec/ocr.spec.rb +17 -0
  43. data/spec/overlayer.spec.rb +17 -0
  44. data/spec/screen_tracker.spec.rb +17 -0
  45. data/spec/sensible_cinema_gui.spec.rb +38 -16
  46. data/spec/swing_helpers.spec.rb +17 -0
  47. data/spec/vlc_programmer.spec.rb +17 -0
  48. data/zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt +23 -1
  49. data/zamples/edit_decision_lists/dvds/Harry Potter 2.txt +18 -0
  50. data/zamples/edit_decision_lists/dvds/pack_wedding_2007-03-03.txt +24 -0
  51. data/zamples/edit_decision_lists/example_edit_decision_list.txt +1 -1
  52. metadata +13 -6
  53. data/LICENSE +0 -56
@@ -0,0 +1,33 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
18
+ require File.dirname(__FILE__) + "/common"
19
+ require_relative '../lib/mplayer_edl'
20
+
21
+ describe MplayerEdl do
22
+
23
+ { "mutes" => {5=> 7}, "blank_outs" => {6=>7} }
24
+ it "should translate verbatim" do
25
+ a = MplayerEdl.convert_to_edl({ "mutes"=>{105=>145, "46:33.5"=>2801}, "blank_outs" => {6 => 7} } )
26
+ # 0 for skip, 1 for mute
27
+ a.should == <<EOL
28
+ 105.0 145.0 1
29
+ 2793.5 2801.0 1
30
+ 6.0 7.0 0
31
+ EOL
32
+ end
33
+ end
data/spec/muter.spec.rb CHANGED
@@ -1,3 +1,20 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
1
18
  require File.dirname(__FILE__) + "/common"
2
19
  require_relative '../lib/muter'
3
20
 
data/spec/ocr.spec.rb CHANGED
@@ -1,3 +1,20 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
1
18
  require File.expand_path(File.dirname(__FILE__) + '/common')
2
19
  require_relative "../lib/ocr"
3
20
  require 'benchmark'
@@ -1,3 +1,20 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
1
18
  # avoid full loading if testing impossible
2
19
  if RUBY_VERSION < '1.9.2' && RUBY_PLATFORM !~ /java/
3
20
  puts 'not compatible to MRI < 1.9.2'
@@ -1,3 +1,20 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
1
18
  require File.expand_path(File.dirname(__FILE__) + '/common')
2
19
  require_relative '../lib/overlayer'
3
20
  require_relative '../lib/screen_tracker'
@@ -1,3 +1,20 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
1
18
  require File.expand_path(File.dirname(__FILE__) + '/common')
2
19
  load '../bin/sensible-cinema'
3
20
 
@@ -18,16 +35,19 @@ module SensibleSwing
18
35
 
19
36
  it "should prompt if two EDL's match a DVD title" do
20
37
  old_edl = MainWindow::EDL_DIR
21
- MainWindow.const_set(:EDL_DIR, 'temp')
22
- FileUtils.rm_rf 'temp'
23
- Dir.mkdir 'temp'
24
- MainWindow.new.single_edit_list_matches_dvd("BOBS_BIG_PLAN").should be nil
25
- Dir.chdir 'temp' do
26
- File.binwrite('a.txt', "\"disk_unique_id\" => \"abcdef1234\"")
27
- File.binwrite('b.txt', "\"disk_unique_id\" => \"abcdef1234\"")
28
- end
29
- MainWindow.new.single_edit_list_matches_dvd("abcdef1234").should be nil
38
+ begin
39
+ MainWindow.const_set(:EDL_DIR, 'temp')
40
+ FileUtils.rm_rf 'temp'
41
+ Dir.mkdir 'temp'
42
+ MainWindow.new.single_edit_list_matches_dvd("BOBS_BIG_PLAN").should be nil
43
+ Dir.chdir 'temp' do
44
+ File.binwrite('a.txt', "\"disk_unique_id\" => \"abcdef1234\"")
45
+ File.binwrite('b.txt', "\"disk_unique_id\" => \"abcdef1234\"")
46
+ end
47
+ MainWindow.new.single_edit_list_matches_dvd("abcdef1234").should be nil
48
+ ensure
30
49
  MainWindow.const_set(:EDL_DIR, old_edl)
50
+ end
31
51
  end
32
52
 
33
53
  it "should modify path to have mencder available, and ffmpeg, and download them on the fly" do
@@ -40,7 +60,7 @@ module SensibleSwing
40
60
  ["drive", "Volume", "19d121ae8dc40cdd70b57ab7e8c74f76"] # happiest baby on the block
41
61
  }
42
62
  @subject.stub!(:get_mencoder_commands) { |*args|
43
- args[-4].should match(/abc/)
63
+ args[-5].should match(/abc/)
44
64
  @args = args
45
65
  'sleep 0.1'
46
66
  }
@@ -71,12 +91,13 @@ module SensibleSwing
71
91
 
72
92
  it "should be able to do a normal copy to hard drive, edited" do
73
93
  @subject.do_copy_dvd_to_hard_drive(false).should == [false, "abc.fulli.tmp.avi"]
94
+ File.exist?('test_file_to_see_if_we_have_permission_to_write_to_this_folder').should be false
74
95
  end
75
96
 
76
97
  it "should call through to explorer for the full thing" do
77
98
  @subject.do_copy_dvd_to_hard_drive(false)
78
99
  @subject.background_thread.join
79
- @args[-2].should == nil
100
+ @args[-3].should == nil
80
101
  @command.should match /explorer/
81
102
  @command.should_not match /fulli/
82
103
  end
@@ -90,16 +111,16 @@ module SensibleSwing
90
111
  it "should call explorer for the we can't reach this path of opening a partial without telling it what to do with it" do
91
112
  @subject.do_copy_dvd_to_hard_drive(true).should == [false, "abc.fulli.tmp.avi"]
92
113
  @subject.background_thread.join
93
- @args[-1].should == 1
94
- @args[-2].should == "01:00"
114
+ @args[-2].should == 1
115
+ @args[-3].should == "01:00"
95
116
  @command.should match /explorer/
96
117
  @command.should_not match /fulli/
97
118
  end
98
119
 
99
120
  def prompt_for_start_and_end_times
100
121
  @subject.instance_variable_get(:@preview_section).simulate_click
101
- @args[-1].should == 1
102
- @args[-2].should == "01:00"
122
+ @args[-2].should == 1
123
+ @args[-3].should == "01:00"
103
124
  @subject.background_thread.join
104
125
  @command.should match /smplayer/
105
126
  end
@@ -135,8 +156,9 @@ module SensibleSwing
135
156
  end
136
157
 
137
158
  it "should create a new file for ya" do
138
- out = MainWindow::EDL_DIR + "/volume.txt"
159
+ out = MainWindow::EDL_DIR + "/sweetest_disc_ever.txt"
139
160
  File.exist?( out ).should be_false
161
+ @subject.stub!(:get_user_input) {'sweetest disc ever'}
140
162
  @subject.instance_variable_get(:@create_new_edl_for_current_dvd).simulate_click
141
163
  begin
142
164
  File.exist?( out ).should be_true
@@ -1,3 +1,20 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
1
18
  require File.expand_path(File.dirname(__FILE__) + '/common')
2
19
  require 'os'
3
20
  require_relative '../lib/swing_helpers'
@@ -1,3 +1,20 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
1
18
  require File.dirname(__FILE__) + "/common"
2
19
  require_relative '../lib/vlc_programmer'
3
20
 
@@ -14,7 +14,7 @@
14
14
  "blank_outs" => [
15
15
  "58:40", "58:41", # bad arsenic, but I dislike lip reading.
16
16
  "59:08", "59:09", # "
17
- "1:16:57.0" , "1:16:57.5", "bad a..", # verified
17
+ "1:16:57.0" , "1:16:57.5", "bad a..",
18
18
  # 15:22 irv beats his radio with pool cue should go...
19
19
  "15:20", "15:30",
20
20
  "59:15", "59:59",
@@ -25,3 +25,25 @@
25
25
  "dvd_title_track" => "1",
26
26
  "other stuff" => "fighting (punching) in a bar 1:00:30 'ish could use some editing"
27
27
  # 1:01:42 "shutup snaka"
28
+
29
+
30
+ # 22:25 heck
31
+ # 23:45 heck, something else paranoid
32
+ # 22:00 butt
33
+ # 32:20 shutup
34
+ # 38:30 40:40 g..
35
+ # 1:16 too early
36
+ # 1:22:30 den???
37
+ # 1:21:50 .. heck
38
+ # 1:20:50 dang swiss
39
+ # 1:13:40 paranoid
40
+ # 1:11:40 gah
41
+ # 47:15 a-h
42
+ # 57:20 ... father
43
+ # 1:07:45 hook
44
+ # cut beating (paranoid)
45
+ # 34:00
46
+ # 3:00 backside
47
+ # 6:57 thigh, hug
48
+ # 14:15 under breath
49
+ #
@@ -0,0 +1,18 @@
1
+ # comments can go after a # on any line.
2
+ "mutes" => [
3
+ "00:09:44", "00:09:46", "darn",
4
+ "00:12:28", "00:12:29", "good L..",
5
+ "01:20:59", "01:21:00", "h..",
6
+ "01:21:24", "01:21:25", "h..",
7
+ "02:00:30", "02:00:31", "h..",
8
+ ],
9
+
10
+
11
+ "disk_unique_id" => "9a56136cdd5bc321ebff064cd59b8322",
12
+ "title" => "HP_AND_THE_CHAMBER_OF_SECRETS",
13
+
14
+ #9:44 "darn"
15
+
16
+ #12:28 "good L.."
17
+ #1:21:24 (he. . 2x)
18
+ #2:00:30 (he..)
@@ -0,0 +1,24 @@
1
+ # comments can go after a # on any line, for example this one.
2
+
3
+ "mutes" => [
4
+ "0:00:01.0", "0:00:02.0", "da..",
5
+ ],
6
+
7
+ "blank_outs" => [
8
+ #"1:01:00.0" , "1:02:00.0", "violent scene of some sort",
9
+ ],
10
+ "audio_codec" => "lavc",
11
+
12
+ "disk_unique_id" => "a2e3ece630251e4a785218ce71a20ce1",
13
+ "dvd_title_track" => "1", # most DVD's use title 1. See http://betterlogic.com/roger/2010/11/how-to-use-vlc-to-tell-how-many-titles-and-chapters-and-which-is-the-main/
14
+ "not edited out stuff" => "",
15
+ "name" => "Pack Wedding 2007-03-03"
16
+
17
+ #1:03- 1:08 - 1:16
18
+ #12:13 kissing
19
+
20
+ #28:00 presents???
21
+
22
+ #34:00 "thank g.."
23
+
24
+ #got to 38:00
@@ -35,6 +35,6 @@
35
35
  "source" => "Hulu",
36
36
  "url" => "http://www.byutv.org/watch/1790-100",
37
37
  "whatever_else_you_want" => "this is the old version of the film",
38
- "disk_unique_id" => "19d121ae8dc40cdd70b57ab7e8c74f76", # for DVD's to be able to differentiate (and auto select) themselves.
38
+ "disk_unique_id" => "19d131ae8dc40cdd70b57ab7e8c74f76", # for DVD's to be able to differentiate (and auto select) themselves.
39
39
 
40
40
  # NB that you have to put commas just about everywhere. That might help
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 17
7
+ - 18
8
8
  - 0
9
- version: 0.17.0
9
+ version: 0.18.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Roger Pack
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-08 00:00:00 -07:00
17
+ date: 2010-12-13 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -154,20 +154,21 @@ extensions:
154
154
  - ext/mkrf_conf.rb
155
155
  extra_rdoc_files:
156
156
  - ChangeLog
157
- - LICENSE
157
+ - LICENSE.TXT
158
158
  - README
159
159
  - TODO
160
160
  files:
161
161
  - ChangeLog
162
- - LICENSE
162
+ - LICENSE.TXT
163
163
  - README
164
164
  - RUN SENSIBLE CINEMA CLICK HERE.bat
165
165
  - Rakefile
166
166
  - TODO
167
+ - USAGE_TERMS.TXT
167
168
  - VERSION
168
169
  - bin/sensible-cinema
169
170
  - bin/sensible-cinema-cli
170
- - edit sensible cinema decision list files.bat
171
+ - create new sensible cinema decision list files.bat
171
172
  - experimental_readme.txt
172
173
  - ext/mkrf_conf.rb
173
174
  - gplv3.txt
@@ -182,6 +183,7 @@ files:
182
183
  - lib/mencoder_wrapper.rb
183
184
  - lib/mouse.rb
184
185
  - lib/mouse_forever.rb
186
+ - lib/mplayer_edl.rb
185
187
  - lib/muter.rb
186
188
  - lib/ocr.rb
187
189
  - lib/overlayer.rb
@@ -190,6 +192,7 @@ files:
190
192
  - lib/swing_helpers.rb
191
193
  - lib/vlc_programmer.rb
192
194
  - never_do
195
+ - preamble
193
196
  - sensible-cinema.gemspec
194
197
  - spec/blanker.spec.rb
195
198
  - spec/common.rb
@@ -246,6 +249,7 @@ files:
246
249
  - spec/keyboard_input.spec.rb
247
250
  - spec/mencoder_wrapper.spec.rb
248
251
  - spec/mouse.spec.rb
252
+ - spec/mplayer_edl.spec.rb
249
253
  - spec/muter.spec.rb
250
254
  - spec/ocr.spec.rb
251
255
  - spec/overlayer.spec.rb
@@ -260,6 +264,7 @@ files:
260
264
  - vendor/unzip.exe
261
265
  - zamples/edit_decision_lists/category descriptions.txt
262
266
  - zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt
267
+ - zamples/edit_decision_lists/dvds/Harry Potter 2.txt
263
268
  - zamples/edit_decision_lists/dvds/bob the builder pets in a pickle.txt
264
269
  - zamples/edit_decision_lists/dvds/bobs_big_plan.txt
265
270
  - zamples/edit_decision_lists/dvds/happiest baby on the block.txt
@@ -270,6 +275,7 @@ files:
270
275
  - zamples/edit_decision_lists/dvds/old_and_inaccurate/labyrinth.txt
271
276
  - zamples/edit_decision_lists/dvds/old_and_inaccurate/making marriage work.txt
272
277
  - zamples/edit_decision_lists/dvds/old_and_inaccurate/star_trek_generations_hulu.txt
278
+ - zamples/edit_decision_lists/dvds/pack_wedding_2007-03-03.txt
273
279
  - zamples/edit_decision_lists/example_edit_decision_list.txt
274
280
  - zamples/edit_decision_lists/old_not_yet_update/youtube/gummy_bear_song_youtube.txt
275
281
  - zamples/edit_decision_lists/old_not_yet_update/youtube/nuki_song_youtube.txt
@@ -322,6 +328,7 @@ test_files:
322
328
  - spec/keyboard_input.spec.rb
323
329
  - spec/mencoder_wrapper.spec.rb
324
330
  - spec/mouse.spec.rb
331
+ - spec/mplayer_edl.spec.rb
325
332
  - spec/muter.spec.rb
326
333
  - spec/ocr.spec.rb
327
334
  - spec/overlayer.spec.rb