sensible-cinema 0.28.1 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. data/{README → README.TXT} +35 -14
  2. data/Rakefile +49 -41
  3. data/TODO +337 -250
  4. data/VERSION +1 -1
  5. data/bin/sensible-cinema +15 -14
  6. data/bin/sensible-cinema-cli +1 -1
  7. data/business_ideas.txt +8 -0
  8. data/change_log_with_feature_list.txt +198 -1
  9. data/documentation/is_it_legal_to_copy_dvds.txt +44 -30
  10. data/goc.bat +1 -1
  11. data/gpl-2.0.txt +339 -0
  12. data/history_and_related_works_list.txt +37 -33
  13. data/{cone.png → inventionzy_files/cone.png} +0 -0
  14. data/legal_draft +23 -0
  15. data/lib/add_any_bundled_gems_to_load_path.rb +4 -3
  16. data/lib/check_installed_mac.rb +10 -10
  17. data/lib/count_down_timer_jruby_swing.rb +4 -4
  18. data/lib/edl_parser.rb +155 -142
  19. data/lib/extract/dumpstream.bat +1 -0
  20. data/lib/extract/get_init.bat +3 -0
  21. data/lib/extract/pause_early.rb +13 -0
  22. data/lib/gui/base.rb +707 -0
  23. data/lib/gui/create-file.rb +244 -0
  24. data/lib/gui/create.rb +565 -0
  25. data/lib/gui/dependencies.rb +177 -0
  26. data/lib/gui/normal.rb +190 -0
  27. data/lib/gui/{sensible-cinema-upconvert.rb → upconvert.rb} +33 -14
  28. data/lib/keyboard_input.rb +0 -2
  29. data/lib/mencoder_wrapper.rb +8 -3
  30. data/lib/movie_hasher.rb +27 -0
  31. data/lib/mplayer_edl.rb +1 -0
  32. data/lib/subtitle_profanity_finder.rb +141 -103
  33. data/lib/vlc_programmer.rb +1 -1
  34. data/lib/zoom_player_max_edl.rb +50 -0
  35. data/{developer_how_to_contribute_to_the_project.txt → notes_for_potential_developers.txt} +18 -11
  36. data/roadmap_possibilities +12 -0
  37. data/spec/arse.srt +6 -1
  38. data/spec/dragon.srt +3 -0
  39. data/spec/edl_parser.spec.rb +57 -52
  40. data/spec/mencoder_wrapper.spec.rb +26 -19
  41. data/spec/mplayer_edl.spec.rb +40 -10
  42. data/spec/notes +3043 -9
  43. data/spec/sensible_cinema_gui.spec.rb +8 -3
  44. data/spec/subtitle_profanity_finder.spec.rb +91 -36
  45. data/spec/zoom_player_max_edl.spec.rb +29 -0
  46. data/template_bats/README_DISTRO.TXT +3 -1
  47. data/template_bats/RUN SENSIBLE CINEMA CLICK HERE WINDOWS.bat +25 -0
  48. data/template_bats/mac/RUN SENSIBLE CINEMA CLICK HERE.command +2 -1
  49. data/template_bats/mac/advanced--create or edit sensible cinema edit list files.command +2 -1
  50. data/template_bats/mac/advanced--run-upconverting-video-player.command +2 -1
  51. data/template_bats/pc/advanced--create or edit sensible cinema edit list files.bat +2 -0
  52. data/template_bats/pc/advanced--run-upconverting-video-player.bat +2 -0
  53. data/todo.inventionzy.txt +69 -2
  54. data/todo.propaganda +34 -10
  55. data/todo.upconvert +8 -1
  56. data/{upconvert_netflix/latest2 → upconvert_from_screen}/go_upscaling.bat +0 -0
  57. data/{also_see_rogerdpack_youtube_account_and_sourceforge_files_movies_account → upconvert_from_screen/go_upscaling_works} +0 -0
  58. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/combine_video.avs +0 -0
  59. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/go_no_upscaling.bat +0 -0
  60. data/upconvert_from_screen/old/latest2/go_upscaling.bat +12 -0
  61. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/push2.GRF +0 -0
  62. data/upconvert_from_screen/old/latest2/push3.grf +0 -0
  63. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/setup_capture_coords.rb +0 -0
  64. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/setup_directshow_filter_params.rb +0 -0
  65. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/upconvert_from_screen_me2.avs +1 -1
  66. data/{upconvert_netflix → upconvert_from_screen}/old/latest_now_possibly_oudated/push2.GRF +0 -0
  67. data/{upconvert_netflix → upconvert_from_screen}/old/latest_now_possibly_oudated/upconvert_from_screen_me2.avs +0 -0
  68. data/{upconvert_netflix → upconvert_from_screen}/old/position_window.png +0 -0
  69. data/{upconvert_netflix → upconvert_from_screen}/old/push_source_desktop.GRF +0 -0
  70. data/{upconvert_netflix → upconvert_from_screen/old}/record_screen/record.bat +0 -0
  71. data/{upconvert_netflix → upconvert_from_screen}/old/upconvert_from_screen.avs +0 -0
  72. data/{upconvert_netflix → upconvert_from_screen}/old/upconvert_from_screen_me.avs +0 -0
  73. data/{upconvert_netflix → upconvert_from_screen}/old/upconvert_from_screen_me2.avs +0 -0
  74. data/{upconvert_netflix → upconvert_from_screen}/old/upconvert_from_screen_me_push_source.avs +0 -0
  75. data/{upconvert_netflix → upconvert_from_screen}/old/uscreen.GRF +0 -0
  76. data/{upconvert_netflix → upconvert_from_screen}/old/uscreen_me.GRF +0 -0
  77. data/upconvert_from_screen/push3.grf +0 -0
  78. data/upconvert_from_screen/upconvert_from_screen_me2.avs +19 -0
  79. data/vendor/mplayer_patches/apply.bat +12 -0
  80. data/vendor/{rdp-win32screenshot-0.0.9/RDP_BRANCH_HAS_MASTER_WITH_CORRECT_VERSION_NUMBER → mplayer_patches/configure_from_betterlogic} +0 -0
  81. data/vendor/mplayer_patches/libdvdnav/2905259c3b45529b3d8dedba572b6e4f67a2d8f4.diff +19 -0
  82. data/vendor/mplayer_patches/libdvdnav/83f1c9256f500285e46f1e44bcc74ffce90159db.diff +16 -0
  83. data/vendor/mplayer_patches/libdvdnav/eb91fb74680d30322461a1b9e425918ad4e2b2df.diff +21 -0
  84. data/vendor/mplayer_patches/libdvdnav/jump_to_time.diff +654 -0
  85. data/vendor/mplayer_patches/libdvdnav/non_strict.diff +13 -0
  86. data/vendor/mplayer_patches/mplayer_edl.diff +354 -0
  87. data/vendor/mplayer_patches/port_dir/PortIndex.quick +2 -0
  88. data/vendor/mplayer_patches/port_dir/how_to +13 -0
  89. data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/Portfile +300 -0
  90. data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/files/configure.x11.patch +20 -0
  91. data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/files/llvm-gcc-workaround.patch +11 -0
  92. data/vendor/mplayer_patches/port_dir/multimedia/rdp-projects/Portfile +43 -0
  93. data/vendor/{rdp-win32screenshot-0.0.9/RDP_VERSION_IS_IN_RDP_BRANCH → mplayer_patches/updated_lib_too} +0 -0
  94. data/vendor/{readme.txt → readme.txt.setpriority} +0 -0
  95. data/www/content_editor.html +28 -28
  96. data/www/index.html +6 -1
  97. data/www/upconverting_movie_player.html +13 -3
  98. data/www/youtube_edl/.htaccess +44 -0
  99. data/{inventionzy_files/control_youtube.html → www/youtube_edl/control_youtube.rhtml} +39 -33
  100. data/www/youtube_edl/dispatch.fcgi +25 -0
  101. data/www/youtube_edl/render_edited.rb +25 -0
  102. data/{inventionzy_files/serve.rb → www/youtube_edl/server_this_dir.rb} +0 -0
  103. data/www/youtube_edl/todo +23 -0
  104. data/www/zoomplayer_max.png +0 -0
  105. data/zamples/edit_decision_lists/dvds/Harry Potter 2 chamber of secrets.txt +10 -5
  106. data/zamples/edit_decision_lists/dvds/aladdin.txt +30 -0
  107. data/zamples/edit_decision_lists/dvds/bambi.txt +1 -1
  108. data/zamples/edit_decision_lists/dvds/big_buck_bunny_dvd.txt +2 -0
  109. data/zamples/edit_decision_lists/dvds/bobs_big_plan.txt +2 -2
  110. data/zamples/edit_decision_lists/dvds/cars_2.txt +26 -0
  111. data/zamples/edit_decision_lists/dvds/cars_disney.txt +1 -1
  112. data/zamples/edit_decision_lists/dvds/condor_man_widescreen.txt +22 -0
  113. data/zamples/edit_decision_lists/dvds/court_jester.txt +10 -13
  114. data/zamples/edit_decision_lists/dvds/edls_being_edited/making_marriage_work.txt +15 -0
  115. data/zamples/edit_decision_lists/dvds/edls_being_edited/national_treasure.txt +23 -0
  116. data/zamples/edit_decision_lists/dvds/edls_being_edited/ratatouille.txt +35 -0
  117. data/zamples/edit_decision_lists/dvds/edls_being_edited/the_explorers.txt +49 -0
  118. data/zamples/edit_decision_lists/dvds/finding_neverland.txt +32 -0
  119. data/zamples/edit_decision_lists/dvds/flight_of_the_navigator.txt +22 -16
  120. data/zamples/edit_decision_lists/dvds/harry_potter_3_prisoner_of_azkaban.txt +21 -4
  121. data/zamples/edit_decision_lists/dvds/hitchhiker's_guide_to_the_galaxy.txt +1 -1
  122. data/zamples/edit_decision_lists/dvds/{edls_being_edited/king_of_kings.txt → king_of_kings.txt} +5 -5
  123. data/zamples/edit_decision_lists/dvds/nanny_mcphee.txt +31 -0
  124. data/zamples/edit_decision_lists/dvds/pack_jackson_wedding_2007-03-03.txt +9 -2
  125. data/zamples/edit_decision_lists/dvds/remember_the_titans.txt +35 -0
  126. data/zamples/edit_decision_lists/dvds/sintel_open_source_blender_ntsc_dvd.txt +8 -4
  127. data/zamples/edit_decision_lists/dvds/speed_racer.txt +1 -1
  128. data/zamples/edit_decision_lists/dvds/tangled.txt +21 -0
  129. data/zamples/edit_decision_lists/dvds/tron_legacy.txt +4 -1
  130. data/zamples/edit_decision_lists/files/conference_music_video.txt +10 -0
  131. data/zamples/edit_decision_lists/notes_on_movies_without_edls_yet/tron.txt +10 -0
  132. data/zamples/edit_decision_lists/old_not_yet_updated/example_edit_decision_list.txt +1 -1
  133. metadata +139 -117
  134. data/conclusions +0 -6
  135. data/documentation/how_to_create_your_own_delete_lists.txt +0 -69
  136. data/lib/gui/sensible-cinema-base.rb +0 -620
  137. data/lib/gui/sensible-cinema-create.rb +0 -331
  138. data/lib/gui/sensible-cinema-dependencies.rb +0 -28
  139. data/lib/gui/sensible-cinema-normal.rb +0 -351
  140. data/lib/gui/sensible-cinema-side-by-side.rb +0 -27
  141. data/lib/shutdown_kill.rb +0 -32
  142. data/lib/storage.rb +0 -105
  143. data/ocr.todo_if_need_speed +0 -6
  144. data/upconvert_netflix/record_screen/recording/1.png +0 -0
  145. data/upconvert_netflix/record_screen/recording/10.png +0 -0
  146. data/upconvert_netflix/record_screen/recording/2.png +0 -0
  147. data/upconvert_netflix/record_screen/recording/3.png +0 -0
  148. data/upconvert_netflix/record_screen/recording/4.png +0 -0
  149. data/upconvert_netflix/record_screen/recording/5.png +0 -0
  150. data/upconvert_netflix/record_screen/recording/6.png +0 -0
  151. data/upconvert_netflix/record_screen/recording/7.png +0 -0
  152. data/upconvert_netflix/record_screen/recording/8.png +0 -0
  153. data/upconvert_netflix/record_screen/recording/9.png +0 -0
  154. data/upconvert_netflix/record_screen/recording/d.png +0 -0
  155. data/vendor/monkey.png +0 -0
  156. data/vendor/rdp-win32screenshot-0.0.9/.document +0 -5
  157. data/vendor/rdp-win32screenshot-0.0.9/History.rdoc +0 -53
  158. data/vendor/rdp-win32screenshot-0.0.9/LICENSE +0 -20
  159. data/vendor/rdp-win32screenshot-0.0.9/README.rdoc +0 -95
  160. data/vendor/rdp-win32screenshot-0.0.9/Rakefile +0 -63
  161. data/vendor/rdp-win32screenshot-0.0.9/VERSION +0 -1
  162. data/vendor/rdp-win32screenshot-0.0.9/enumerated +0 -55576
  163. data/vendor/rdp-win32screenshot-0.0.9/lib/aero_offscreen_srccopy_captureblt_doesnt_have_everything.bmp.gz +0 -0
  164. data/vendor/rdp-win32screenshot-0.0.9/lib/enumerate.rb +0 -6
  165. data/vendor/rdp-win32screenshot-0.0.9/lib/firefox.bmp +0 -0
  166. data/vendor/rdp-win32screenshot-0.0.9/lib/normal.bmp +0 -0
  167. data/vendor/rdp-win32screenshot-0.0.9/lib/normal2.bmp +0 -0
  168. data/vendor/rdp-win32screenshot-0.0.9/lib/notes +0 -5
  169. data/vendor/rdp-win32screenshot-0.0.9/lib/snapshot.rb +0 -10
  170. data/vendor/rdp-win32screenshot-0.0.9/lib/srccopy.bmp +0 -0
  171. data/vendor/rdp-win32screenshot-0.0.9/lib/srccopyplus.bmp +0 -0
  172. data/vendor/rdp-win32screenshot-0.0.9/lib/srccopyplusdirectx.bmp +0 -0
  173. data/vendor/rdp-win32screenshot-0.0.9/lib/vc.bmp +0 -0
  174. data/vendor/rdp-win32screenshot-0.0.9/lib/win32/screenshot.rb +0 -95
  175. data/vendor/rdp-win32screenshot-0.0.9/lib/win32/screenshot/bitmap_maker.rb +0 -200
  176. data/vendor/rdp-win32screenshot-0.0.9/lib/win32/util.rb +0 -93
  177. data/vendor/rdp-win32screenshot-0.0.9/spec/spec.opts +0 -1
  178. data/vendor/rdp-win32screenshot-0.0.9/spec/spec_helper.rb +0 -85
  179. data/vendor/rdp-win32screenshot-0.0.9/spec/win32_screenshot_spec.rb +0 -194
  180. data/vendor/rdp-win32screenshot-0.0.9/spec/win32_screenshot_util_spec.rb +0 -75
  181. data/vendor/rdp-win32screenshot-0.0.9/win32screenshot.gemspec +0 -69
  182. data/vendor/tsmuxer_1.10.6/licence.txt +0 -42
  183. data/zamples/edit_decision_lists/dvds/making_marriage_work.txt +0 -15
  184. data/zamples/edit_decision_lists/notes/tron.txt +0 -4
  185. data/zamples/edit_decision_lists/old_not_yet_updated/dvds/making marriage work.txt +0 -9
@@ -1,194 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe Win32::Screenshot do
4
- include SpecHelper
5
-
6
- before :all do
7
- @notepad = IO.popen("notepad").pid
8
- @iexplore = Dir.chdir("c:/program files/Internet Explorer") do; IO.popen(".\\iexplore about:blank").pid; end
9
- @calc = IO.popen("calc").pid
10
- wait_for_programs_to_open
11
- cleanup
12
- end
13
-
14
- it "captures foreground" do
15
- Win32::Screenshot.foreground do |width, height, bmp|
16
- check_image(bmp, 'foreground')
17
- hwnd = Win32::Screenshot::BitmapMaker.foreground_window
18
- [width, height].should == Win32::Screenshot::Util.dimensions_for(hwnd)
19
- end
20
- end
21
-
22
- it "captures area of the foreground" do
23
- Win32::Screenshot.foreground_area(30, 30, 100, 150) do |width, height, bmp|
24
- check_image(bmp, 'foreground_area')
25
- width.should == 70
26
- height.should == 120
27
- end
28
- end
29
-
30
- it "doesn't allow to capture area of the foreground with invalid coordinates" do
31
- lambda {Win32::Screenshot.foreground_area(0, 0, -1, 100) {|width, height, bmp| check_image('foreground2')}}.
32
- should raise_exception("specified coordinates (0, 0, -1, 100) are invalid - cannot be negative!")
33
- end
34
-
35
- it "captures desktop" do
36
- Win32::Screenshot.desktop do |width, height, bmp|
37
- check_image(bmp, 'desktop')
38
- hwnd = Win32::Screenshot::BitmapMaker.desktop_window
39
- [width, height].should == Win32::Screenshot::Util.dimensions_for(hwnd)
40
- end
41
- end
42
-
43
- it "captures area of the desktop" do
44
- Win32::Screenshot.desktop_area(30, 30, 100, 150) do |width, height, bmp|
45
- check_image(bmp, 'desktop_area')
46
- width.should == 70
47
- height.should == 120
48
- end
49
- end
50
-
51
- it "doesn't allow to capture area of the desktop with invalid coordinates" do
52
- lambda {Win32::Screenshot.desktop_area(0, 0, -1, 100) {|width, height, bmp| check_image('desktop2')}}.
53
- should raise_exception("specified coordinates (0, 0, -1, 100) are invalid - cannot be negative!")
54
- end
55
-
56
- it "captures maximized window by window title" do
57
- title = "Internet Explorer"
58
- maximize(title)
59
- Win32::Screenshot.window(title) do |width, height, bmp|
60
- check_image(bmp, 'iexplore')
61
- hwnd = Win32::Screenshot::BitmapMaker.hwnd(title)
62
- [width, height].should == Win32::Screenshot::Util.dimensions_for(hwnd)
63
- end
64
- end
65
-
66
- it "captures minimized window by window title as a regexp" do
67
- title = /calculator/i
68
- minimize(title)
69
- Win32::Screenshot.window(title) do |width, height, bmp|
70
- check_image(bmp, 'calc')
71
- hwnd = Win32::Screenshot::BitmapMaker.hwnd(title)
72
- [width, height].should == Win32::Screenshot::Util.dimensions_for(hwnd)
73
- end
74
- end
75
-
76
- it "can also search by window class name" do
77
- good_pid = Win32::Screenshot::BitmapMaker.hwnd(/calculator/i)
78
- good_pid.should_not be_nil
79
- good_pid.should == Win32::Screenshot::BitmapMaker.hwnd(/calcframe/i, true)
80
- end
81
-
82
- it "can find sub windows as well" do
83
- # search for an IE sub-window by class (doesn't have text)
84
- Win32::Screenshot::BitmapMaker.hwnd(/CommandBarClass/i, true).should_not be_nil
85
- end
86
-
87
- it "captures small windows" do
88
- title = /Notepad/
89
- resize(title)
90
- Win32::Screenshot.window(title) do |width, height, bmp|
91
- check_image(bmp, 'notepad')
92
- # we should get the size of the picture because
93
- # screenshot doesn't include titlebar and the size
94
- # varies between different themes and Windows versions
95
- hwnd = Win32::Screenshot::BitmapMaker.hwnd(title)
96
- [width, height].should == Win32::Screenshot::Util.dimensions_for(hwnd)
97
- end
98
- end
99
-
100
- it "captures area of the window" do
101
- title = /calculator/i
102
- Win32::Screenshot.window_area(title, 30, 30, 100, 150) do |width, height, bmp|
103
- check_image(bmp, 'calc_area')
104
- width.should == 70
105
- height.should == 120
106
- end
107
- end
108
-
109
- it "captures whole window if window size is specified as coordinates" do
110
- title = /calculator/i
111
- hwnd = Win32::Screenshot::BitmapMaker.hwnd(title)
112
- expected_width, expected_height = Win32::Screenshot::Util.dimensions_for(hwnd)
113
- Win32::Screenshot.window_area(title, 0, 0, expected_width, expected_height) do |width, height, bmp|
114
- check_image(bmp, 'calc_area_full_window')
115
- width.should == expected_width
116
- height.should == expected_height
117
- end
118
- end
119
-
120
- it "doesn't allow to capture area of the window with negative coordinates" do
121
- title = /calculator/i
122
- lambda {Win32::Screenshot.window_area(title, 0, 0, -1, 100) {|width, height, bmp| check_image('calc2')}}.
123
- should raise_exception("specified coordinates (0, 0, -1, 100) are invalid - cannot be negative!")
124
- end
125
-
126
- it "doesn't allow to capture area of the window if coordinates are the same" do
127
- title = /calculator/i
128
- lambda {Win32::Screenshot.window_area(title, 10, 0, 10, 20) {|width, height, bmp| check_image('calc4')}}.
129
- should raise_exception("specified coordinates (10, 0, 10, 20) are invalid - cannot have x1 > x2 or y1 > y2!")
130
- end
131
-
132
- it "doesn't allow to capture area of the window if second coordinate is smaller than first one" do
133
- title = /calculator/i
134
- lambda {Win32::Screenshot.window_area(title, 0, 10, 10, 9) {|width, height, bmp| check_image('calc5')}}.
135
- should raise_exception("specified coordinates (0, 10, 10, 9) are invalid - cannot have x1 > x2 or y1 > y2!")
136
- end
137
-
138
- it "doesn't allow to capture area of the window with too big coordinates" do
139
- title = /calculator/i
140
- hwnd = Win32::Screenshot::BitmapMaker.hwnd(title)
141
- expected_width, expected_height = Win32::Screenshot::Util.dimensions_for(hwnd)
142
- lambda {Win32::Screenshot.window_area(title, 0, 0, 10, 1000) {|width, height, bmp| check_image('calc3')}}.
143
- should raise_exception("specified coordinates (0, 0, 10, 1000) are invalid - maximum are x2=#{expected_width} and y2=#{expected_height}!")
144
- end
145
-
146
- it "captures by window with handle" do
147
- title = /calculator/i
148
- hwnd = Win32::Screenshot::BitmapMaker.hwnd(title)
149
- Win32::Screenshot.hwnd(hwnd) do |width, height, bmp|
150
- check_image(bmp, 'calc_hwnd')
151
- [width, height].should == Win32::Screenshot::Util.dimensions_for(hwnd)
152
- end
153
- end
154
-
155
- it "captures area of the window with handle" do
156
- hwnd = Win32::Screenshot::BitmapMaker.hwnd(/calculator/i)
157
- Win32::Screenshot.hwnd_area(hwnd, 30, 30, 100, 150) do |width, height, bmp|
158
- check_image(bmp, 'calc_hwnd_area')
159
- width.should == 70
160
- height.should == 120
161
- end
162
- end
163
-
164
- it "doesn't allow to capture area of the window with handle with invalid coordinates" do
165
- hwnd = Win32::Screenshot::BitmapMaker.hwnd(/calculator/i)
166
- lambda {Win32::Screenshot.hwnd_area(hwnd, 0, 0, -1, 100) {|width, height, bmp| check_image('desktop2')}}.
167
- should raise_exception("specified coordinates (0, 0, -1, 100) are invalid - cannot be negative!")
168
- end
169
-
170
- it "captures based on coordinates" do
171
- hwnd = Win32::Screenshot::BitmapMaker.hwnd(/calculator/i)
172
- bmp1 = bmp2 = nil
173
- Win32::Screenshot.hwnd_area(hwnd, 100, 100, 170, 180) do |width, height, bmp|; bmp1 = bmp; end
174
- Win32::Screenshot.hwnd_area(hwnd, 0, 0, 70, 80) do |width, height, bmp|; bmp2 = bmp; end
175
- bmp1.length.should == bmp2.length
176
- bmp1.should_not == bmp2
177
- end
178
-
179
- it "allows window titles to include regular expressions' special characters" do
180
- lambda {Win32::Screenshot::BitmapMaker.hwnd("Window title *^$?([.")}.should_not raise_exception
181
- end
182
-
183
- it "raises an 'no block given' Exception if no block was given" do
184
- lambda {Win32::Screenshot.foreground}.should raise_exception(LocalJumpError)
185
- end
186
-
187
- after :all do
188
- for name in [/calculator/i, /Notepad/, /Internet Explorer/] do
189
- # kill them in a jruby friendly way
190
- pid = Win32::Screenshot::Util.window_process_id(Win32::Screenshot::Util.window_hwnd(name))
191
- system("taskkill /PID #{pid}")
192
- end
193
- end
194
- end
@@ -1,75 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe Win32::Screenshot::Util do
4
- include SpecHelper
5
-
6
- before :all do
7
- # should not have any running calculators yet...
8
- proc {Win32::Screenshot::Util.window_hwnd("Calculator") }.should raise_exception("window with title 'Calculator' was not found!")
9
- @calc = IO.popen("calc").pid
10
- wait_for_calculator_to_open
11
- @calc_hwnd = Win32::Screenshot::Util.window_hwnd("Calculator")
12
- end
13
-
14
- it ".all_desktop_windows enumerates all available windows" do
15
- all_windows = Win32::Screenshot::Util.all_desktop_windows
16
- all_windows.should_not be_empty
17
- all_windows[0].should be_an(Array)
18
- all_windows[0][0].should be_a(String)
19
- all_windows[0][1].should be_a(Fixnum)
20
-
21
- calculator = all_windows.find {|title, hwnd| title =~ /Calculator/}
22
- calculator.should_not be_nil
23
- calculator[0].should == "Calculator"
24
- calculator[1].should == @calc_hwnd
25
- end
26
-
27
- it ".window_title returns title of a specified window's handle" do
28
- Win32::Screenshot::Util.window_title(@calc_hwnd).should == "Calculator"
29
- end
30
-
31
- it ".dimensions_for window handle returns dimensions of the window in pixels" do
32
- width, height = Win32::Screenshot::Util.dimensions_for(@calc_hwnd)
33
- width.should be > 100
34
- height.should be > 100
35
- end
36
-
37
- it ".window_class returns classname of a specified window's handle" do
38
- Win32::Screenshot::Util.window_class(@calc_hwnd).should == "CalcFrame"
39
- end
40
-
41
- it ".get_info returns lots of info about an hwnd" do
42
- desktop_hwnd = Win32::Screenshot::BitmapMaker.desktop_window
43
- info = Win32::Screenshot::Util.get_info desktop_hwnd
44
- info.should be_a Hash
45
- info.keys.sort.should == [:title, :class, :dimensions, :starting_coordinates].sort
46
- end
47
-
48
- it ".windows_hierarchy returns hwnds" do
49
- a = Win32::Screenshot::Util.windows_hierarchy
50
- # should have root as "desktop"
51
- # though in reality some windows might not be descendants of the desktop
52
- # (see the WinCheat source which discusses this further)
53
- # but we don't worry about that edge case yet
54
- a.should be_a Hash
55
- a[:children].should be_an Array
56
- a[:children].length.should be > 0
57
- a[:children][0].should be_a Hash
58
- a[:hwnd].should == Win32::Screenshot::BitmapMaker.desktop_window
59
- end
60
-
61
- it ".windows_hierarchy can return info" do
62
- a = Win32::Screenshot::Util.windows_hierarchy true
63
- # check for right structure
64
- for hash_example in [a, a[:children][0]] do
65
- hash_example.keys.sort.should == [:title, :hwnd, :class, :dimensions, :starting_coordinates, :children].sort
66
- end
67
- end
68
-
69
- after :all do
70
- # tests our hwnd -> pid method, and conveniently, shuts down the calculator process
71
- calc_pid = Win32::Screenshot::Util.window_process_id(@calc_hwnd)
72
- system("taskkill /PID #{calc_pid}")
73
- proc {Win32::Screenshot::Util.window_hwnd("Calculator") }.should raise_exception("window with title 'Calculator' was not found!")
74
- end
75
- end
@@ -1,69 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{win32screenshot}
8
- s.version = "0.0.7"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Jarmo Pertman", "Aslak Helles\303\270y"]
12
- s.date = %q{2010-08-18}
13
- s.description = %q{Capture Screenshots on Windows with Ruby}
14
- s.email = ["jarmo.p@gmail.com", "aslak.hellesoy@gmail.com"]
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "History.rdoc",
23
- "LICENSE",
24
- "README.rdoc",
25
- "Rakefile",
26
- "VERSION",
27
- "lib/win32/screenshot.rb",
28
- "lib/win32/screenshot/bitmap_maker.rb",
29
- "lib/win32/util.rb",
30
- "spec/spec.opts",
31
- "spec/spec_helper.rb",
32
- "spec/win32_screenshot_spec.rb",
33
- "spec/win32_screenshot_util_spec.rb",
34
- "win32screenshot.gemspec"
35
- ]
36
- s.homepage = %q{http://github.com/jarmo/win32screenshot}
37
- s.rdoc_options = ["--main", "README.rdoc"]
38
- s.require_paths = ["lib"]
39
- s.rubygems_version = %q{1.3.7}
40
- s.summary = %q{Capture Screenshots on Windows with Ruby}
41
- s.test_files = [
42
- "spec/spec_helper.rb",
43
- "spec/win32_screenshot_spec.rb",
44
- "spec/win32_screenshot_util_spec.rb"
45
- ]
46
-
47
- if s.respond_to? :specification_version then
48
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
49
- s.specification_version = 3
50
-
51
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
- s.add_runtime_dependency(%q<ffi>, [">= 0"])
53
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
54
- s.add_development_dependency(%q<os>, [">= 0"])
55
- s.add_development_dependency(%q<rmagick>, [">= 0"])
56
- else
57
- s.add_dependency(%q<ffi>, [">= 0"])
58
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
59
- s.add_dependency(%q<os>, [">= 0"])
60
- s.add_dependency(%q<rmagick>, [">= 0"])
61
- end
62
- else
63
- s.add_dependency(%q<ffi>, [">= 0"])
64
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
65
- s.add_dependency(%q<os>, [">= 0"])
66
- s.add_dependency(%q<rmagick>, [">= 0"])
67
- end
68
- end
69
-
@@ -1,42 +0,0 @@
1
- (c) SmartLabs LLC, 2008-2009
2
-
3
- Freeware Licence Agreement
4
- This licence agreement only applies to the free version of this software.
5
-
6
- Terms and Conditions
7
- BY DOWNLOADING, INSTALLING, USING, TRANSMITTING, DISTRIBUTING OR COPYING THIS SOFTWARE ("THE SOFTWARE"), YOU AGREE TO THE TERMS OF THIS AGREEMENT (INCLUDING THE SOFTWARE LICENCE AND DISCLAIMER OF WARRANTY) WITH SmartLabs LLC (with the business address at 72, Oktyabrskata str., 127521 Moscow, Russia) THE OWNER OF ALL RIGHTS IN RESPECT OF THE SOFTWARE.
8
-
9
- PLEASE READ THIS DOCUMENT CAREFULLY BEFORE USING THE SOFTWARE.
10
-
11
- IF YOU DO NOT AGREE TO ANY OF THE TERMS OF THIS LICENCE THEN DO NOT DOWNLOAD, INSTALL, USE, TRANSMIT, DISTRIBUTE OR COPY THE SOFTWARE.
12
-
13
- THIS DOCUMENT CONSTITUES A LICENCE TO USE THE SOFTWARE ON THE TERMS AND CONDITIONS APPEARING BELOW.
14
-
15
- The Software is licensed to you without charge for use only upon the terms of this licence, and SmartLabs LLC reserves all rights not expressly granted to you. SmartLabs LLC retains ownership of all copies of the Software.
16
-
17
- 1. Licence
18
- You may use the Software without charge.
19
-
20
- You may distribute exact copies of the Software to anyone.
21
-
22
- 2. Restrictions
23
- SmartLabs LLC reserves the right to revoke the above distribution right at any time, for any or no reason.
24
-
25
- YOU MAY NOT MODIFY, ADAPT, TRANSLATE, RENT, LEASE, LOAN, SELL, REQUEST DONATIONS OR CREATE DERIVATE WORKS BASED UPON THE SOFTWARE OR ANY PART THEREOF.
26
-
27
- The Software contains trade secrets and to protect them you may not decompile, reverse engineer, disassemble or otherwise reduce the Software to a humanly perceivable form. You agree not to divulge, directly or indirectly, until such trade secrets cease to be confidential, for any reason not your own fault.
28
-
29
- 3. Termination
30
- This licence is effective until terminated. The Licence will terminate automatically without notice from SmartLabs LLC if you fail to comply with any provision of this Licence. Upon termination you must destroy the Software and all copies thereof. You may terminate this Licence at any time by destroying the Software and all copies thereof. Upon termination of this licence for any reason you shall continue to be bound by the provisions of Section 2 above. Termination will be without prejudice to any rights SmartLabs LLC may have as a result of this agreement.
31
-
32
- 4. Disclaimer of Warranty, Limitation of Remedies
33
- TO THE FULL EXTENT PERMITTED BY LAW, SmartLabs LLC HEREBY EXCLUDES ALL CONDITIONS AND WARRANTIES, WHETHER IMPOSED BY STATUTE OR BY OPERATION OF LAW OR OTHERWISE, NOT EXPRESSLY SET OUT HEREIN. THE SOFTWARE, AND ALL ACCOMPANYING FILES, DATA AND MATERIALS ARE DISTRIBUTED "AS IS" AND WITH NO WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED. SmartLabs LLC DOES NOT WARRANT, GUARANTEE OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE WITH RESPECT TO ITS CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS OR OTHERWISE. THE ENTIRE RISK OF USING THE SOFTWARE IS ASSUMED BY YOU. SmartLabs LLC MAKES NO EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE SOFTWARE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY SmartLabs LLC, IT'S DISTRIBUTORS, AGENTS OR EMPLOYEES SHALL CREATE A WARRANTY, AND YOU MAY NOT RELY ON ANY SUCH INFORMATION OR ADVICE.
34
-
35
- IMPORTANT NOTE: Nothing in this Agreement is intended or shall be construed as excluding or modifying any statutory rights, warranties or conditions which by virtue of any national or state Fair Trading, Trade Practices or other such consumer legislation may not be modified or excluded. If permitted by such legislation, however, SmartLabs LLC' liability for any breach of any such warranty or condition shall be and is hereby limited to the supply of the Software licensed hereunder again as SmartLabs LLC at its sole discretion may determine to be necessary to correct the said breach.
36
-
37
- IN NO EVENT SHALL SmartLabs LLC BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, AND THE LOSS OF BUSINESS INFORMATION OR COMPUTER PROGRAMS), EVEN IF SmartLabs LLC OR ANY SmartLabs LLC REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ADDITION, IN NO EVENT DOES SmartLabs LLC AUTHORISE YOU TO USE THE SOFTWARE IN SITUATIONS WHERE FAILURE OF THE SOFTWARE TO PERFORM CAN REASONABLY BE EXPECTED TO RESULT IN A PHYSICAL INJURY, OR IN LOSS OF LIFE. ANY SUCH USE BY YOU IS ENTIRELY AT YOUR OWN RISK, AND YOU AGREE TO HOLD SmartLabs LLC HARMLESS FROM ANY CLAIMS OR LOSSES RELATING TO SUCH UNAUTHORISED USE.
38
-
39
- 5. General
40
- All rights of any kind in the Software which are not expressly granted in this Agreement are entirely and exclusively reserved to and by SmartLabs LLC.
41
-
42
- This agreement contains the entire Agreement between the parties hereto with respect to the subject matter hereof, and supersedes all prior agreements and/or understandings (oral or written). Failure or delay by SmartLabs LLC in enforcing any right or provision hereof shall not be deemed a waiver of such provision or right with respect to the instant or any subsequent breach. If any provision of this Agreement shall be held by a court of competent jurisdiction to be contrary to law, that provision will be enforced to the maximum extent permissible, and the remaining provisions of this Agreement will remain in force and effect.
@@ -1,15 +0,0 @@
1
- "mutes" => [
2
- #"0:00:01.0", "0:00:02.0", "profanity", "da..",
3
- ],
4
-
5
- "blank_outs" => [
6
- #"00:03:00.0" , "00:04:00.0", "violence", "of some sort",
7
- ],
8
-
9
- "name" => "making_marriage_work",
10
- #"disk_unique_id" => "",
11
-
12
- # "dvd_title_track" => "1", # most DVD's use title 1. Yours might not. If it plays anything except the main title, see http://goo.gl/QHLIF
13
- # "not edited out stuff" => "",
14
- # "closing thoughts" => "still a fairly dark movie",
15
- # "mplayer_dvd_splits" => ["59:59", "1:04:59"], # find these by playing your dvd with smplayer, and noting where the timing switches [buggedly] back to zero in error--common on many DVD's. Setting it here lets the 'insta play' feature work right.
@@ -1,4 +0,0 @@
1
- One scene near-ish the end with risque bods.
2
- Besides the profanity.
3
- Also the skull stuff near the very end.
4
- and possibly killing the bad red guy.
@@ -1,9 +0,0 @@
1
- # comments can go after the # on each line
2
- mutes:
3
- 19:51 : 19:52 #religious exclamation#
4
-
5
- blank_outs:
6
-
7
-
8
- title: making marriage work
9
-