sensible-cinema 0.13.1 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +23 -0
- data/README +18 -15
- data/Rakefile +5 -0
- data/TODO +89 -47
- data/VERSION +1 -1
- data/bin/sensible-cinema +105 -56
- data/bin/sensible-cinema-cli +1 -1
- data/lib/mouse.rb +46 -23
- data/{spec → lib}/mouse_forever.rb +0 -0
- data/lib/swing_helpers.rb +68 -0
- data/lib/vlc_programmer.rb +10 -10
- data/never_do +9 -0
- data/spec/mouse.spec.rb +31 -9
- data/spec/recreate_odd.rb +9 -0
- data/spec/screen_tracker.spec.rb +2 -2
- data/spec/swing_helpers.spec.rb +18 -0
- data/spec/test10.rb +1 -0
- data/spec/vlc_programmer.spec.rb +3 -2
- data/zamples/players/hulu/{total_length_over_an_hour.yml → total_length_over_an_hour.txt} +0 -0
- data/zamples/players/vlc/{full_screened_total_length_over_an_hour.yml → full_screened_total_length_over_an_hour.txt} +0 -0
- data/zamples/players/vlc/{windowed_total_length_over_an_hour.yml → windowed_total_length_over_an_hour.txt} +0 -0
- data/zamples/players/vlc/{windowed_total_length_under_an_hour.yml → windowed_total_length_under_an_hour.txt} +0 -0
- data/zamples/players/youtube/{full_screened_1024x768.yml → full_screened_1024x768.txt} +0 -0
- data/zamples/players/youtube/{full_screened_1152x864.yml → full_screened_1152x864.txt} +0 -0
- data/zamples/players/youtube/{full_screened_1680x1050.yml → full_screened_1680x1050.txt} +0 -0
- data/zamples/players/youtube/{normal_in_youtube.com.chrome.yml → normal_in_youtube.com.chrome.txt} +0 -0
- data/zamples/scene_lists/category descriptions.yml b/data/zamples/scene_lists/category → descriptions.txt +0 -0
- data/zamples/scene_lists/dvds/White Christmas.yml b/data/zamples/scene_lists/dvds/White → Christmas.txt +0 -0
- data/zamples/scene_lists/dvds/{all_dogs_go_to_heaven_dvd.yml → all_dogs_go_to_heaven_dvd.txt} +0 -0
- data/zamples/scene_lists/dvds/{bobs_big_plan.yml → bobs_big_plan.txt} +0 -0
- data/zamples/scene_lists/dvds/{cars_disney.yml → cars_disney.txt} +1 -1
- data/zamples/scene_lists/dvds/{happy_feet_dvd.yml → happy_feet_dvd.txt} +0 -0
- data/zamples/scene_lists/dvds/{labyrinth.yml → labyrinth.txt} +0 -0
- data/zamples/scene_lists/dvds/making marriage work.yml b/data/zamples/scene_lists/dvds/making marriage → work.txt +0 -0
- data/zamples/scene_lists/{example_scene_descriptions_list.yml → example_scene_descriptions_list.txt} +0 -0
- data/zamples/scene_lists/{star_trek_generations_hulu.yml → star_trek_generations_hulu.txt} +1 -1
- data/zamples/scene_lists/youtube/{gummy_bear_song_youtube.yml → gummy_bear_song_youtube.txt} +0 -0
- data/zamples/scene_lists/youtube/{nuki_song_youtube.yml → nuki_song_youtube.txt} +0 -0
- metadata +33 -27
- data/bin/swing_helpers.rb +0 -48
data/ChangeLog
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
== 0.14.1 ==
|
2
|
+
|
3
|
+
Add ChangeLog (this file).
|
4
|
+
|
5
|
+
== 0.14.0 ==
|
6
|
+
|
7
|
+
Now it offers you a button to either play it on your computer, using VLC, or rip it to a file
|
8
|
+
(possibly write that to some other media, then play it say on your DVD player), or play it using screen tracking.
|
9
|
+
|
10
|
+
== From various previous releases ==
|
11
|
+
It now provides for screen tracking of DVD's, youtube, hulu, and anything else you want to play on VLC, and has
|
12
|
+
automatic detection of CD-Drives for ripping/playing back. It can handle full screen or windows playback.
|
13
|
+
It can rip from user specified "title tracks" now. It has a nice GUI. The GUI can tell you which DVD is in which
|
14
|
+
drive so you know more easily which one to choose.
|
15
|
+
|
16
|
+
When screen tracking, it employs a "mouse moving" (feedback to computer) in order to keep the screen timestamp visible.
|
17
|
+
It allows for both "instant playback" watching a DVD, as well as "ripping a stream to a single file on your computer" in order to view
|
18
|
+
it from there (which is arguably easier to view). The single file can be put on a flash drive and played
|
19
|
+
via some console or other player, or can be copied to a disc and played in a DVD/blu-ray player.
|
20
|
+
|
21
|
+
When screen tracking, it uses input to the system (simulated keystrokes) to simulate a user "mute"
|
22
|
+
It overlays the playing screen (movie) with a separate window in order to simulate a "blank out" or
|
23
|
+
"skip this scene" which can be used with or without the mutes, as well.
|
data/README
CHANGED
@@ -15,13 +15,13 @@ the command line thus:
|
|
15
15
|
|
16
16
|
C:\> jruby -S sensible-cinema
|
17
17
|
|
18
|
-
It prompts you for
|
19
|
-
and then for a player
|
18
|
+
It prompts you for an EL (Edit decision List) file (ex: bambi.txt),
|
19
|
+
and then for a player file (ex: hulu_full_screen.txt).
|
20
20
|
|
21
21
|
Sensible-cinema will now run in a console window, screen tracking the player to monitor its position,
|
22
|
-
and react appropriately.
|
22
|
+
and react'ing appropriately.
|
23
23
|
|
24
|
-
It is presumed that you'll then minimize
|
24
|
+
It is presumed that you'll then minimize sensible-cinema and proceed to enjoy the movie.
|
25
25
|
|
26
26
|
You'll know that it's working if, when you change the time of your player (ex: dragging it to a new spot
|
27
27
|
in the playback), the screen output in sensible-cinema's console should change to match the new time.
|
@@ -44,11 +44,11 @@ choosing the hulu player.
|
|
44
44
|
|
45
45
|
It will proceed do a few "demo" mutes and blank outs.
|
46
46
|
|
47
|
-
== Programming Your Own
|
47
|
+
== Programming Your Own Edit List ==
|
48
48
|
|
49
49
|
To program sensible-cinema, you create a scene description list it can use.
|
50
50
|
|
51
|
-
|
51
|
+
An Edit List looks something like this example:
|
52
52
|
|
53
53
|
mutes:
|
54
54
|
"01:00:00" : "01:01:02.5" # mute from exactly one hour to one hour, one minute, two seconds and a half will be muted.
|
@@ -74,8 +74,8 @@ The easiest way to do this is to start sensible-cinema, then instead of choosing
|
|
74
74
|
now right click below the list of files and choose "paste"
|
75
75
|
This will create the file "example_scene_list Copy.yml"
|
76
76
|
Right click on it, choose rename, and give it a better name.
|
77
|
-
Now
|
78
|
-
|
77
|
+
Now open it.
|
78
|
+
You can make changes to this file *on the fly* while the player is still playing. It will notice
|
79
79
|
changes as the file is saved and apply them.
|
80
80
|
|
81
81
|
Now select it for use in sensible-cinema (even though it's still blank).
|
@@ -153,20 +153,23 @@ See the LICENSE file for licensing, usage terms (basically gplv3).
|
|
153
153
|
|
154
154
|
== Related ==
|
155
155
|
|
156
|
-
The concept isn't too novel:
|
156
|
+
The concept isn't too novel. Some examples:
|
157
157
|
|
158
|
+
Clean Flicks
|
158
159
|
http://en.wikipedia.org/wiki/Linear_video_editing
|
159
160
|
http://imdb.com tends to have reasonably good lists of what occurs in movies (find a movie, click on "parent's guide" on the left). Sometimes it even lists the time signatures for events (ex: "Labyrinth" http://www.imdb.com/title/tt0047673/parentalguide) which you could use to translate into a sensible-cinema compatible list.
|
160
|
-
Edited "
|
161
|
-
http://en.wikipedia.org/wiki/Edit_decision_list (it's a linear editing tool, after all)
|
162
|
-
http://www.oreillynet.com/sysadmin/blog/2005/06/make_your_own_phantom_edit_wit.html mplayer has had this ability for awhile.
|
163
|
-
http://clearplay.com commercial (closed source, costs money, no user
|
161
|
+
Edited "on airplane" style movies.
|
162
|
+
http://en.wikipedia.org/wiki/Edit_decision_list (it's a linear editing tool, after all--so see the vast list of those)
|
163
|
+
http://www.oreillynet.com/sysadmin/blog/2005/06/make_your_own_phantom_edit_wit.html (mplayer has had this ability for awhile).
|
164
|
+
http://clearplay.com commercial (tracks DVD's while they play--closed source, costs money, no user contribution possible), and only for DVD's (uses its own DVD-player in its current incantation).
|
164
165
|
http://forum.bsplayer.com/feature-requests-feedback-suggestions/7157-chapter-playlist-scene-cut-3.html
|
165
166
|
http://www.inmatrix.com/ "scene cut editor" of the zoom player
|
166
167
|
http://wiki.xbmc.org/?title=EDL_(commercial_skipping)_and_SceneMarker_support (XBMC's scene cut support--also contains links to some other editors)
|
167
|
-
http://code.google.com/p/movie-content-editor (written in Python, controls VLC based on captions)
|
168
|
+
http://code.google.com/p/movie-content-editor (written in Python, controls VLC based on captions and scene lists)
|
168
169
|
http://www.imdb.com/swiki/special?ParentalGuideHelp (search for "scene description")
|
169
|
-
http://www.mythtv.org/wiki/
|
170
|
+
http://www.mythtv.org/wiki/Removing_Commercials
|
171
|
+
The remote control with the pause, mute, stop, fast forward, and play buttons, along with previous knowledge of scene locations
|
172
|
+
The scissors and old VHS tapes (Clean Flicks' origin, BTW).
|
170
173
|
|
171
174
|
== Feedback ==
|
172
175
|
|
data/Rakefile
CHANGED
data/TODO
CHANGED
@@ -1,34 +1,101 @@
|
|
1
1
|
== medium ==
|
2
2
|
|
3
|
-
amazon player
|
4
3
|
|
5
|
-
== probably next up
|
4
|
+
== probably next up+low prio ==
|
6
5
|
|
7
|
-
better timing for the
|
8
|
-
|
9
|
-
|
6
|
+
better timing for the saver-er...
|
7
|
+
match better
|
8
|
+
merge better
|
10
9
|
speed up unit tests
|
11
|
-
a
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
add a progress bar for encoding
|
11
|
+
|
12
|
+
== slightly lower than that even ==
|
13
|
+
|
14
|
+
auto-select EDL
|
15
15
|
|
16
16
|
== slightly lower than that ==
|
17
17
|
|
18
18
|
can parse IMDB (require they put in the URL by hand fer now)
|
19
19
|
add stuffs to imdb hmmm
|
20
|
+
IMDB easy mapping
|
20
21
|
screencast of things helpful (use, creation...).
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
unit test the GUI
|
23
|
+
can have collaborators re-selling EL's
|
24
|
+
good license for their stuff like "public domain" or what not :P
|
25
|
+
80/20
|
26
|
+
can "watch as it is being ripped" (concat, watching it as it grows faster than you watch...)
|
27
|
+
a "big download" of the whole thing (so that people can actually use it without pain...batch file even would probably work splendidly...
|
28
|
+
leaner gem (size-wise...) but I guess some ability to have a zip downloader...hmm...
|
29
|
+
burnable to DVD/CD multi DVD, etc.
|
30
|
+
easily
|
31
|
+
automagically... (call into iso blah blah blah?)
|
32
|
+
can lop off sections to save space (?)
|
33
|
+
can burn the extra sections, too?
|
34
|
+
easy editor for this style of edit
|
35
|
+
split the two projects cleanly (project, distribution)
|
36
|
+
partner (Jon, Karlie if interested...give beta)
|
37
|
+
survey/beta release
|
38
|
+
a certified clean list (?)
|
39
|
+
== DVD backlog ==
|
40
|
+
|
41
|
+
some way to choose between x,y,z when auto-select sees several
|
42
|
+
careful phrasing "if you can't afford it..."
|
43
|
+
authorize instead of paypal?
|
44
|
+
honest about DMCA (we don't distribute the cracker, we don't redistribute, don't perform any acts, etc.)
|
45
|
+
if you burn you'll eventually be using a DMCA compatible player :P
|
46
|
+
long list of players...we're not alone :)
|
47
|
+
one part is probably not against copyright
|
48
|
+
the authors of the program might not be liable for damages. We don't feel dishonest about it, as long as
|
49
|
+
we own the DVD and have it with us when we watch the edited version.
|
50
|
+
blu-ray support somehow (real-time? rip?)
|
51
|
+
|
52
|
+
prototypes of the experimental stuff.
|
53
|
+
|
54
|
+
some type of one click installer that can setup the registry...
|
55
|
+
auto-assignment of EDL's to media:
|
56
|
+
auto-play option for DVD's (auto-start?)
|
57
|
+
use volume label differentiation
|
58
|
+
use spiffy differentiation for DVD's on windows
|
59
|
+
DVD's (right click on DVD player, play with SC?)
|
60
|
+
a real website (github-y?)
|
61
|
+
instructions on how to do their own (private) or do one and submit it (public), or email their friends :P
|
24
62
|
|
25
63
|
== random backlog ... note: just plow forward, to "grab" available ideas...except that for now, just what *I* plan on needing for myself (filters for what I need/want). ==
|
26
64
|
|
27
|
-
|
65
|
+
byu.tv descriptor
|
66
|
+
youtube non full screen: work with all browsers
|
67
|
+
easier "here's how on the command line, BTW"
|
68
|
+
amazon player
|
69
|
+
a netflix player descriptor
|
70
|
+
"just choose VLCx55" LOL
|
71
|
+
beep at them when not tracking [?]
|
72
|
+
default on...hmm
|
73
|
+
|
74
|
+
note that you are watching it using only bits and pieces of the original, similar to said bill. And the
|
75
|
+
authors of the program might not be cupable of copyright infringement themselves, since they distribute no infringed materials.
|
76
|
+
|
77
|
+
Not responsible for your actions. Don't redistribute. "You run the risk on your own"
|
78
|
+
"should the courts someday rule..." If DVD next to me...
|
79
|
+
|
80
|
+
install VLC from .msi where needed. Pretty low prio...
|
81
|
+
|
82
|
+
An 'edit preferences' button et al.
|
83
|
+
|
84
|
+
Just fold if s....
|
85
|
+
|
86
|
+
For the monetized version: nothing but cut and paste, no merging et al
|
87
|
+
|
88
|
+
a descriptor for some closed source app player...
|
89
|
+
|
90
|
+
when saving to hard drive, you can "insert" streams where desired (experimental version only)
|
91
|
+
|
92
|
+
can save stuff "for review later" as they watch it,
|
93
|
+
|
94
|
+
can "overlay-audio/video"
|
28
95
|
|
29
96
|
GUI:
|
30
97
|
preferences for levels, etc.
|
31
|
-
|
98
|
+
|
32
99
|
blanker: allow for one side of the screen or another...
|
33
100
|
|
34
101
|
PISH
|
@@ -47,20 +114,17 @@ advertise on ruby flow
|
|
47
114
|
can record from online [huh? do I even want this?]
|
48
115
|
maybe can record something, then extract the bad, and get a better looking video...
|
49
116
|
low prio
|
50
|
-
research this "record netflix" et al
|
51
|
-
and track it as ripping, I guess (time -> time...)
|
52
|
-
and then able to edit that...
|
53
117
|
remove commercials?
|
54
118
|
|
55
|
-
DRY up
|
119
|
+
DRY up :levels--it's in the ocr spec as well as the others...
|
56
120
|
|
57
121
|
unit tests pass with normal ruby
|
58
122
|
|
59
123
|
screen time change only detected... [unexpected] [rid myself of it]
|
60
124
|
|
61
|
-
|
125
|
+
when polling for bmp changes, just use two lines (if needed speed-wise?)
|
62
126
|
|
63
|
-
|
127
|
+
super duper VLC
|
64
128
|
|
65
129
|
try new GOCR version...
|
66
130
|
|
@@ -70,9 +134,8 @@ preference for beeping at them, et al
|
|
70
134
|
|
71
135
|
itunes video on demand
|
72
136
|
|
73
|
-
blockbuster "rent" on demand
|
137
|
+
blockbuster "rent" on demand player
|
74
138
|
|
75
|
-
a real website
|
76
139
|
|
77
140
|
no money making for now...all volunteer...more respectful.
|
78
141
|
or make it so it can work with an editor of some kind...like a "save here" command line snip this tuck that.
|
@@ -84,26 +147,20 @@ integrate with librivox' audio so you can avoid profanity in classics. Somehow.
|
|
84
147
|
You know, for static things like this, a 'pre-cutter' would sure be convenient...
|
85
148
|
provide download of edited mp3's for people. ahhh.
|
86
149
|
|
87
|
-
some type of static 'ok grab it using x, then apply y' oh yeah. That would rock for the DVD market, really. Just not the online market.
|
88
|
-
|
89
150
|
itunes player for profanity (music)?
|
90
151
|
|
91
152
|
make a list of "known clean" movies or what not...hmm...
|
92
153
|
|
93
154
|
an "online anybody can chat while watching this movie" (or anybody can edit this wav and listen to it as overlay...) prefer the latter.
|
94
155
|
|
95
|
-
blu-ray support somehow (real-time, rip?)
|
96
|
-
|
97
156
|
an online applet web runnable? Why not?
|
98
157
|
click here to watch your favorite film edited on hulu! Just click! [* yea!]
|
99
158
|
a chrome plugin with imdb/community backing :)
|
100
159
|
|
101
|
-
a known list of "compatible" imdb
|
160
|
+
a known list of "compatible" imdb'ers...
|
102
161
|
|
103
162
|
code refactors: "screen time change", order should be swapped in bin/x output (just cleanup)
|
104
163
|
|
105
|
-
auto-play on detect youtube url access...
|
106
|
-
|
107
164
|
easier installer for windows: release a zip file that they can just click on a .bat file to run it
|
108
165
|
later: it installs/uninstalls appropo
|
109
166
|
suggestion: self-extractor
|
@@ -123,8 +180,6 @@ user customizable levels...
|
|
123
180
|
|
124
181
|
with VLC/youtube non full screen, it does the annoying mouse thing needlessly (which doesn't bug as much these days...)
|
125
182
|
|
126
|
-
hulu non full screened descriptor
|
127
|
-
|
128
183
|
can overlay with wav file (would work already for VLC [?], could also "click to mute" for others...hmm...)
|
129
184
|
|
130
185
|
the muting currently is so togglesy...if VLC ever fixes itself, fix this!
|
@@ -135,6 +190,7 @@ can permanently black out certain coords to keep things prettier...et al
|
|
135
190
|
remove black when they really move the mouse?
|
136
191
|
|
137
192
|
Linux port (call that good enough for usability on TV's...), should be...
|
193
|
+
OS X port
|
138
194
|
|
139
195
|
blanker outer with user specifiable color
|
140
196
|
better default color?
|
@@ -161,31 +217,17 @@ Have a "list of all known movies (url's)" and be able to open (IE et al) to the
|
|
161
217
|
|
162
218
|
does my sweet heart have any suggestions? (make it work well for laymen)
|
163
219
|
|
164
|
-
|
165
|
-
|
166
|
-
auto-assignment of EDL's to media:
|
167
|
-
auto-play option for DVD's (auto-start?)
|
168
|
-
use normal differentiation
|
169
|
-
use spiffy differentiation for DVD's on windows
|
170
|
-
DVD's (right click on DVD player, play with scene-skipper?)
|
171
|
-
web browser plugin?
|
220
|
+
web browser plugin?
|
172
221
|
|
173
222
|
Programmatically do all of the above, by driving VLC with its real API.
|
174
223
|
VLC
|
175
224
|
Allow it to record somehow (recordable)
|
176
|
-
burnable to DVD/CD ...
|
177
225
|
use VLC's web interface? telnet?
|
178
226
|
optimize it with best appropriate iframes (LOL)
|
179
227
|
|
180
|
-
star trek: generations first profanidade...
|
181
|
-
|
182
228
|
integrate with google TV/bravia...maybe...somehow...boxxee? roku?
|
183
229
|
itunes TV? apple tv?
|
184
230
|
|
185
231
|
OCR the captioning as an auto profanity filter? (or perhaps download subtitles to be able to pre-screen), like the python fella does..
|
186
232
|
|
187
|
-
|
188
|
-
|
189
|
-
--server? optionally higher prio?
|
190
|
-
|
191
|
-
http://en.wikipedia.org/wiki/RiffTrax (possible?)
|
233
|
+
--server? optionally higher prio?
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.14.1
|
data/bin/sensible-cinema
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
|
1
|
+
#!/usr/bin/ruby # so my editor will like it...
|
2
|
+
|
3
|
+
puts 'Loading Sensible Cinema...'
|
3
4
|
|
4
5
|
require 'rubygems'
|
5
|
-
require 'sane'
|
6
|
-
require File.dirname(__FILE__) + '/swing_helpers'
|
6
|
+
require 'sane' # File.write
|
7
|
+
require File.dirname(__FILE__) + '/../lib/swing_helpers'
|
7
8
|
load File.dirname(__FILE__) + '/sensible-cinema-cli'
|
8
9
|
require 'tmpdir'
|
9
10
|
require 'ruby-wmi'
|
@@ -23,58 +24,34 @@ module SensibleSwing
|
|
23
24
|
jlabel.setFont(happy)
|
24
25
|
jlabel.set_bounds(44,44,136,14)
|
25
26
|
panel.add jlabel
|
26
|
-
b = JButton.new( "Play Hulu, Youtube, or a DVD" ).on_clicked {
|
27
|
+
b = JButton.new( "Play Hulu, Youtube, or a DVD (Tracking)" ).on_clicked {
|
27
28
|
self.close
|
28
29
|
go_sc
|
29
30
|
}
|
30
|
-
|
31
|
+
button_width = 230
|
32
|
+
b.set_bounds(44,120,button_width,23)
|
31
33
|
panel.add b
|
32
34
|
|
33
35
|
c=JButton.new( "Copy edited DVD to Hard Drive" )
|
34
36
|
c.on_clicked {
|
35
|
-
|
36
|
-
fc = JFileChooser.new
|
37
|
-
fc.setFileSelectionMode(nil)
|
38
|
-
fc.set_dialog_title "Please pick a DVD descriptor file"
|
39
|
-
fc.set_current_directory(JFile.new( __dir__ + "/../zamples/scene_lists/dvds"))
|
40
|
-
descriptor_path = fc.go
|
41
|
-
descriptors = YAML.load_file descriptor_path
|
42
|
-
|
43
|
-
fc = JFileChooser.new
|
44
|
-
# LODO allow for spaces in save to file
|
45
|
-
fc.set_dialog_title "Pick a location to save file to"
|
46
|
-
save_to_file_name = ((descriptors["title"] || "my dvd") + ' edited').gsub(' ', '_').gsub( /\W/, '') # no punctuation for now...
|
47
|
-
fc.setSelectedFile(JFile.new(get_drive_with_most_space + save_to_file_name))
|
48
|
-
save_to = fc.go
|
49
|
-
# LODO don't pop up those annoying windows
|
50
|
-
dvd_title_track = descriptors["dvd_title_track"]
|
51
|
-
bat_file = VLCProgrammer.convert_to_full_xspf(descriptors, save_to, drive)
|
52
|
-
temp_dir = Dir.tmpdir
|
53
|
-
temp_file = temp_dir + '/' + 'convert_it.bat'
|
54
|
-
File.write(temp_file, bat_file)
|
55
|
-
p 'running', temp_file
|
56
|
-
# TODO change title to "running" or something, while it runs...
|
57
|
-
if !ARGV.find{|a| a == '--test'} && system(temp_file)
|
58
|
-
JOptionPane.showMessageDialog(nil, " Done--you may now watch file #{save_to}.ps in VLC player", "Done!", JOptionPane::ERROR_MESSAGE)
|
59
|
-
command = "explorer /e,/select,\"#{File.expand_path(save_to).gsub('/', '\\')}.ps\""
|
60
|
-
system command
|
61
|
-
File.delete temp_file
|
62
|
-
self.close
|
63
|
-
else
|
64
|
-
JOptionPane.showMessageDialog(nil, " Failed--please examine #{temp_file} and screen output and report back!", "Failed", JOptionPane::ERROR_MESSAGE)
|
65
|
-
end
|
66
|
-
# TODO warn if they don't have VLC installed...
|
67
|
-
# LODO warn if they will overwrite a file
|
37
|
+
do_copy_dvd_to_hard_drive true
|
68
38
|
}
|
39
|
+
c.set_bounds(44,220,button_width,23)
|
40
|
+
panel.add c
|
69
41
|
|
70
|
-
|
71
|
-
|
42
|
+
d=JButton.new( "Play edited DVD with VLC" )
|
43
|
+
d.on_clicked {
|
44
|
+
do_copy_dvd_to_hard_drive false
|
45
|
+
}
|
46
|
+
|
47
|
+
d.set_bounds(44,180,button_width,23)
|
48
|
+
panel.add d
|
72
49
|
|
73
|
-
exit = JButton.new("Exit").on_clicked {
|
50
|
+
@exit = JButton.new("Exit").on_clicked {
|
74
51
|
self.close
|
75
52
|
}
|
76
|
-
exit.set_bounds(44,320,
|
77
|
-
panel.add exit
|
53
|
+
@exit.set_bounds(44,320,button_width,23)
|
54
|
+
panel.add @exit
|
78
55
|
|
79
56
|
reload = JButton.new( "reload code" ).on_clicked {
|
80
57
|
eval File.read(__FILE__), nil, __FILE__
|
@@ -82,37 +59,97 @@ module SensibleSwing
|
|
82
59
|
}
|
83
60
|
reload.set_bounds(44,280,200,23)
|
84
61
|
panel.add reload if ARGV.find{|a| a == '--test'}
|
62
|
+
@buttons = [b,c,d,@exit]
|
85
63
|
|
86
64
|
end
|
87
65
|
|
88
|
-
def
|
89
|
-
|
90
|
-
|
91
|
-
|
66
|
+
def do_copy_dvd_to_hard_drive should_save_file
|
67
|
+
drive = choose_dvd_drive
|
68
|
+
fc = JFileChooser.new
|
69
|
+
fc.setFileSelectionMode(nil)
|
70
|
+
fc.set_dialog_title "Please pick a DVD Edit List File"
|
71
|
+
fc.set_current_directory(JFile.new( __dir__ + "/../zamples/scene_lists/dvds"))
|
72
|
+
edit_list_path = fc.go
|
73
|
+
descriptors = YAML.load_file edit_list_path
|
74
|
+
|
75
|
+
if should_save_file
|
76
|
+
fc = JFileChooser.new
|
77
|
+
# LODO allow for spaces in save to file
|
78
|
+
fc.set_dialog_title "Pick where to save the file to"
|
79
|
+
save_to_file_name = ((descriptors["title"] || "my dvd") + ' edited').gsub(' ', '_').gsub( /\W/, '') # no punctuation for now...
|
80
|
+
fc.setSelectedFile(JFile.new(get_drive_with_most_space_with_slash + save_to_file_name))
|
81
|
+
save_to = fc.go
|
82
|
+
else
|
83
|
+
save_to = nil
|
84
|
+
end
|
85
|
+
# LODO don't pop up those annoying windows
|
86
|
+
dvd_title_track = descriptors["dvd_title_track"]
|
87
|
+
bat_file_or_xspf = VLCProgrammer.convert_to_full_xspf(descriptors, save_to, drive, dvd_title_track)
|
88
|
+
temp_dir = Dir.tmpdir
|
89
|
+
if should_save_file
|
90
|
+
temp_file = temp_dir + '/' + 'convert_it.bat'
|
91
|
+
File.write(temp_file, bat_file_or_xspf)
|
92
|
+
# allow our popups to still be serviced while it is running
|
93
|
+
Thread.new {
|
94
|
+
run_copy_commands temp_file, save_to
|
95
|
+
}
|
96
|
+
else
|
97
|
+
temp_file = temp_dir + '/' + 'vlc.xspf'
|
98
|
+
File.write(temp_file, bat_file_or_xspf)
|
99
|
+
command = "vlc \"#{temp_file.to_filename}\" vlc://quit"
|
100
|
+
p 'running', command
|
101
|
+
system(c) # blocks the current window while running...
|
102
|
+
end
|
103
|
+
# TODO warn if they don't have VLC installed, with instructions...
|
104
|
+
# LODO warn if they will overwrite a file in the end
|
105
|
+
end
|
106
|
+
|
107
|
+
def run_copy_commands temp_file, save_to
|
108
|
+
popup = ModeLessDialog.new("Running the encoding in the background...\n" +
|
109
|
+
"This could take quite awhile, and will prompt you when it is done.\n" +
|
110
|
+
"It may also cause small popup ballon dialogs to appear.")
|
111
|
+
p 'running', temp_file, 'to ' + save_to + '.ps'
|
112
|
+
@buttons.each{|b| b.set_enabled false}
|
113
|
+
success = system(temp_file) unless ARGV.find{|a| a == '--test'}
|
114
|
+
@buttons.each{|b| b.set_enabled true}
|
115
|
+
popup.dispose
|
116
|
+
if success
|
117
|
+
JOptionPane.showMessageDialog(nil, " Done--you may now watch file #{save_to}.ps in VLC player", "Done!", JOptionPane::INFORMATION_MESSAGE)
|
118
|
+
show_file = "explorer /e,/select,\"#{File.expand_path(save_to).to_filename}.ps\""
|
119
|
+
system show_file
|
120
|
+
File.delete temp_file
|
121
|
+
self.close
|
122
|
+
else
|
123
|
+
JOptionPane.showMessageDialog(nil, " Failed--please examine #{temp_file} and screen output and report back!", "Failed", JOptionPane::ERROR_MESSAGE)
|
124
|
+
end
|
92
125
|
end
|
93
126
|
|
94
|
-
|
95
127
|
def choose_dvd_drive
|
96
128
|
opticals = get_dvd_drives
|
97
|
-
opticals.map!{|d| d.Name + "\\" + " (" + d.VolumeName + ")"}
|
129
|
+
opticals.map!{|d| d.Name + "\\" + " (" + (d.VolumeName || 'empty') + ")"}
|
98
130
|
|
99
131
|
if opticals.length != 1
|
100
132
|
dialog = GetDisk.new(self, opticals)
|
133
|
+
dialog.setSize 200,125
|
101
134
|
dialog.show
|
102
135
|
selected = dialog.selected
|
103
136
|
else
|
104
137
|
selected = opticals[0]
|
105
138
|
end
|
106
|
-
|
139
|
+
if selected
|
140
|
+
return selected[0..2]
|
141
|
+
else
|
142
|
+
puts 'did not select drive'
|
143
|
+
java.lang.System.exit 1
|
144
|
+
end
|
107
145
|
end
|
108
146
|
|
109
|
-
def
|
147
|
+
def get_drive_with_most_space_with_slash
|
110
148
|
disks = WMI::Win32_LogicalDisk.find(:all)
|
111
149
|
out = disks.sort_by{|d| d.FreeSpace.to_i}[-1].Name + "\\"
|
112
150
|
out
|
113
151
|
end
|
114
152
|
|
115
|
-
|
116
153
|
private
|
117
154
|
def get_dvd_drives
|
118
155
|
disks = WMI::Win32_LogicalDisk.find(:all)
|
@@ -121,6 +158,7 @@ module SensibleSwing
|
|
121
158
|
|
122
159
|
end
|
123
160
|
|
161
|
+
|
124
162
|
class GetDisk < JDialog
|
125
163
|
attr_reader :selected
|
126
164
|
def initialize parent, options_array
|
@@ -135,10 +173,10 @@ module SensibleSwing
|
|
135
173
|
end
|
136
174
|
end
|
137
175
|
|
138
|
-
box.add_item "
|
176
|
+
box.add_item "Click to select DVD drive" # put something in index 0
|
139
177
|
options_array.each{|drive|
|
140
178
|
box.add_item drive
|
141
|
-
}
|
179
|
+
}
|
142
180
|
add box
|
143
181
|
pack
|
144
182
|
end
|
@@ -147,6 +185,17 @@ module SensibleSwing
|
|
147
185
|
|
148
186
|
end
|
149
187
|
|
188
|
+
require 'os'
|
189
|
+
class String
|
190
|
+
def to_filename
|
191
|
+
if OS.windows?
|
192
|
+
self.gsub('/', "\\")
|
193
|
+
else
|
194
|
+
self
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
150
199
|
SensibleSwing::MainWindow.new.set_visible true
|
151
200
|
|
152
|
-
puts 'Please use the Sensible Cinema GUI window'
|
201
|
+
puts 'Please use the Sensible Cinema GUI window popup'
|
data/bin/sensible-cinema-cli
CHANGED
@@ -19,7 +19,7 @@ def go_sc(args=ARGV)
|
|
19
19
|
puts 'cleared cache'
|
20
20
|
end
|
21
21
|
|
22
|
-
$stderr.puts 'warning: currently windows only for certain parts currently' unless
|
22
|
+
$stderr.puts 'warning: currently windows only for certain parts currently' unless ENV['OS'] == 'Windows_NT'
|
23
23
|
|
24
24
|
if args.detect{|arg| arg == '-h' || arg == '--help'}
|
25
25
|
|
data/lib/mouse.rb
CHANGED
@@ -3,6 +3,7 @@ require 'ffi'
|
|
3
3
|
|
4
4
|
module Mouse
|
5
5
|
extend FFI::Library
|
6
|
+
MouseInfo = java.awt.MouseInfo
|
6
7
|
|
7
8
|
ffi_lib 'user32'
|
8
9
|
ffi_convention :stdcall
|
@@ -29,32 +30,54 @@ module Mouse
|
|
29
30
|
|
30
31
|
# UINT SendInput(UINT nInputs, LPINPUT pInputs, int cbSize);
|
31
32
|
attach_function :SendInput, [ :uint, :pointer, :int ], :uint
|
32
|
-
|
33
|
-
def self.jitter_forever_in_own_thread
|
33
|
+
class << self
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
35
|
+
def jitter_forever_in_own_thread
|
36
|
+
|
37
|
+
myinput = Mouse::Input.new
|
38
|
+
myinput[:type] = Mouse::INPUT_MOUSE
|
39
|
+
|
40
|
+
in_evt = myinput[:evt][:mi]
|
41
|
+
|
42
|
+
in_evt[:mouse_data] = 0
|
43
|
+
in_evt[:flags] = Mouse::MOUSEEVENTF_MOVE # | Mouse::MOUSEEVENTF_ABSOLUTE
|
44
|
+
in_evt[:time] = 0
|
45
|
+
in_evt[:extra] = 0
|
46
|
+
in_evt[:dx] = 0
|
47
|
+
in_evt[:dy] = 8 # just enough for VLC full screen...
|
48
|
+
|
49
|
+
old_x = get_mouse.x
|
50
|
+
old_y = get_mouse.y
|
51
|
+
Thread.new {
|
52
|
+
loop {
|
53
|
+
cur_x = get_mouse.x
|
54
|
+
cur_y = get_mouse.y
|
55
|
+
if(cur_x == old_x && cur_y == old_y)
|
56
|
+
@total_movements += 1
|
57
|
+
in_evt[:dy] *= -1
|
58
|
+
Mouse.SendInput(1, myinput, Mouse::Input.size)
|
59
|
+
in_evt[:dy] *= -1
|
60
|
+
sleep 0.05
|
61
|
+
Mouse.SendInput(1, myinput, Mouse::Input.size)
|
62
|
+
old_x = get_mouse.x
|
63
|
+
old_y = get_mouse.y
|
64
|
+
sleep 0.75
|
65
|
+
else
|
66
|
+
old_x = get_mouse.x
|
67
|
+
old_y = get_mouse.y
|
68
|
+
sleep 3
|
69
|
+
end
|
70
|
+
}
|
55
71
|
}
|
56
|
-
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
def get_mouse
|
76
|
+
MouseInfo.getPointerInfo.getLocation
|
77
|
+
end
|
57
78
|
|
79
|
+
attr_accessor :total_movements
|
58
80
|
end
|
59
81
|
|
60
82
|
end
|
83
|
+
Mouse.total_movements = 0
|
File without changes
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'java'
|
2
|
+
module SensibleSwing
|
3
|
+
include_package 'javax.swing'
|
4
|
+
[JButton, JFrame, JLabel, JPanel, JOptionPane,
|
5
|
+
JFileChooser, JComboBox, JDialog, SwingUtilities] # grab these constants (http://jira.codehaus.org/browse/JRUBY-5107)
|
6
|
+
include_package 'java.awt'
|
7
|
+
[FlowLayout, Font]
|
8
|
+
include_class 'java.awt.event.ActionListener'
|
9
|
+
JFile = java.io.File
|
10
|
+
|
11
|
+
class JButton
|
12
|
+
def initialize *args
|
13
|
+
super *args
|
14
|
+
set_font Font.new("Tahoma", Font::PLAIN, 11)
|
15
|
+
end
|
16
|
+
|
17
|
+
def on_clicked &block
|
18
|
+
raise unless block
|
19
|
+
add_action_listener do |e|
|
20
|
+
block.call
|
21
|
+
end
|
22
|
+
self
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
class JFrame
|
28
|
+
def close
|
29
|
+
dispose # sigh
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class JFileChooser
|
34
|
+
# raises on failure...
|
35
|
+
def go
|
36
|
+
success = show_open_dialog nil
|
37
|
+
unless success == Java::javax::swing::JFileChooser::APPROVE_OPTION
|
38
|
+
raise 'did not choose one' # don't kill background proc...
|
39
|
+
end
|
40
|
+
get_selected_file.get_absolute_path
|
41
|
+
end
|
42
|
+
end
|
43
|
+
#showMessageDialog JOptionPane
|
44
|
+
class ModeLessDialog < JDialog
|
45
|
+
def initialize title_and_display_text, close_button_text= 'Close'
|
46
|
+
super nil
|
47
|
+
set_title title_and_display_text.split("\n")[0]
|
48
|
+
get_content_pane.set_layout nil
|
49
|
+
title_and_display_text.split("\n").each_with_index{|line, idx|
|
50
|
+
jlabel = JLabel.new line
|
51
|
+
jlabel.set_bounds(10, 15*idx, 400, 24)
|
52
|
+
get_content_pane.add jlabel
|
53
|
+
}
|
54
|
+
close = JButton.new( close_button_text ).on_clicked {
|
55
|
+
self.dispose
|
56
|
+
}
|
57
|
+
close.set_bounds(125,50,70,25)
|
58
|
+
get_content_pane.add close
|
59
|
+
set_size 400,125
|
60
|
+
set_visible true
|
61
|
+
setDefaultCloseOperation JFrame::DISPOSE_ON_CLOSE
|
62
|
+
setLocationRelativeTo nil # center it on the screen
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# code examples
|
68
|
+
# JOptionPane.showInputDialog(nil, "not implemented yet", "not implemented yet", JOptionPane::ERROR_MESSAGE)
|
data/lib/vlc_programmer.rb
CHANGED
@@ -12,7 +12,7 @@ class VLCProgrammer
|
|
12
12
|
|
13
13
|
def self.convert_to_full_xspf incoming, filename = nil, drive_with_slash = nil, dvd_title_track = nil
|
14
14
|
@drive = drive_with_slash || "e:\\"
|
15
|
-
@
|
15
|
+
@filename_or_playlist_if_nil = filename
|
16
16
|
@dvd_title_track = dvd_title_track || "1"
|
17
17
|
mutes = incoming["mutes"] || {}
|
18
18
|
blanks = incoming["blank_outs"] || {}
|
@@ -86,7 +86,7 @@ class VLCProgrammer
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def self.get_header
|
89
|
-
if
|
89
|
+
if @filename_or_playlist_if_nil == nil
|
90
90
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
91
91
|
<playlist version=\"1\" xmlns=\"http://xspf.org/ns/0/\" xmlns:vlc=\"http://www.videolan.org/vlc/playlist/ns/0/\">
|
92
92
|
<title>Playlist</title>
|
@@ -99,7 +99,7 @@ class VLCProgrammer
|
|
99
99
|
|
100
100
|
def self.get_section title, start, stop, idx, no_audio = false
|
101
101
|
loc = "dvd://#{@drive}@#{@dvd_title_track}"
|
102
|
-
if
|
102
|
+
if @filename_or_playlist_if_nil == nil
|
103
103
|
"<track>
|
104
104
|
<title>#{title}</title>
|
105
105
|
<extension application=\"http://www.videolan.org/vlc/playlist/0\">
|
@@ -111,22 +111,22 @@ class VLCProgrammer
|
|
111
111
|
<location>#{loc}</location>
|
112
112
|
</track>"
|
113
113
|
else
|
114
|
-
"call vlc -
|
115
|
-
#"call vlc #{@
|
114
|
+
"call vlc --qt-start-minimized #{loc} --start-time=#{start} --stop-time=#{stop} --sout=\"file/ps:#{@filename_or_playlist_if_nil}.ps.#{idx}\" #{"--no-sout-audio" if no_audio} vlc://quit\n" # +
|
115
|
+
#"call vlc #{@filename_or_playlist_if_nil}.ps.#{idx}.tmp --sout=file/ps:go.ps
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
119
|
def self.get_footer idx
|
120
|
-
if
|
120
|
+
if @filename_or_playlist_if_nil == nil
|
121
121
|
"</trackList></playlist>"
|
122
122
|
else
|
123
|
-
|
123
|
+
filename = @filename_or_playlist_if_nil
|
124
|
+
files = (1..idx).map{|n| "#{filename}.ps.#{n}"}
|
124
125
|
# concat
|
125
126
|
line = 'type ' + files.join(' ')
|
126
|
-
line += " > #{@
|
127
|
-
|
127
|
+
line += " > #{@filename_or_playlist_if_nil}.ps\n"
|
128
128
|
line += "rm " + files.join(' ') + "\n"
|
129
|
-
line += "echo Done--you may now watch file #{
|
129
|
+
line += "echo Done--you may now watch file #{filename}.ps in VLC player"
|
130
130
|
end
|
131
131
|
|
132
132
|
end
|
data/never_do
CHANGED
@@ -4,6 +4,8 @@ allow x2,y2 for player descriptions...
|
|
4
4
|
|
5
5
|
user-assignable "confidence" (how much time to 'wrap' surround the mutes, etc. to accomodate for slow computers/laggy internet/different players/poor input)
|
6
6
|
|
7
|
+
make an index of watchable on imdb ordered by stars (?)
|
8
|
+
|
7
9
|
able to make it "quieter" at certain parts, arbitrarily...
|
8
10
|
|
9
11
|
can overlay with a "fuzzer-outer" for specific coordinates somehow or other...
|
@@ -12,6 +14,8 @@ can overlay with a "fuzzer-outer" for specific coordinates somehow or other...
|
|
12
14
|
|
13
15
|
amazon video on demand
|
14
16
|
|
17
|
+
super duper VLC with multi-thread, compiler optimizations...LOL
|
18
|
+
|
15
19
|
super easy streamer windows -> {XBOX360, wii, etc..} basically playon.tv competitor, which appears to have no free equivalent, I guess, though you can
|
16
20
|
Currently it's either a cable, a computer (with its cable), or "ask me for this it might already work"
|
17
21
|
todo: refit a VLC version that works *if your soundcard supports it*
|
@@ -29,3 +33,8 @@ super easy streamer windows -> {XBOX360, wii, etc..} basically playon.tv competi
|
|
29
33
|
does blu-ray work with HDMI well?
|
30
34
|
|
31
35
|
"If someone builds an app that will allow Google TV to stream video from my computer's iTunes collection, it *could* be worth the investment."
|
36
|
+
|
37
|
+
http://en.wikipedia.org/wiki/RiffTrax (possible?)
|
38
|
+
community rifftrax?
|
39
|
+
realtime
|
40
|
+
editable
|
data/spec/mouse.spec.rb
CHANGED
@@ -1,11 +1,33 @@
|
|
1
|
-
require '
|
2
|
-
require 'sane'
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/common')
|
3
2
|
require_relative '../lib/mouse'
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
describe Mouse do
|
5
|
+
|
6
|
+
it "should move it a couple times" do
|
7
|
+
old = Mouse.total_movements
|
8
|
+
begin
|
9
|
+
Timeout::timeout(2) {
|
10
|
+
Mouse::jitter_forever_in_own_thread.join
|
11
|
+
}
|
12
|
+
rescue Timeout::Error
|
13
|
+
end
|
14
|
+
Mouse.total_movements.should be > old
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should not move it if the user does" do
|
18
|
+
old = Mouse.total_movements
|
19
|
+
begin
|
20
|
+
Timeout::timeout(2) {
|
21
|
+
Mouse::jitter_forever_in_own_thread
|
22
|
+
x = 1
|
23
|
+
loop {java.awt.Robot.new.mouse_move(500 + (x+=1),500); sleep 0.1; }
|
24
|
+
}
|
25
|
+
rescue Timeout::Error
|
26
|
+
end
|
27
|
+
Mouse.total_movements.should == old + 1
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
end
|
data/spec/screen_tracker.spec.rb
CHANGED
@@ -173,7 +173,7 @@ describe ScreenTracker do
|
|
173
173
|
context "using hulu" do
|
174
174
|
it "should be able to parse all digits" do
|
175
175
|
pending "completion"
|
176
|
-
a = ScreenTracker.new_from_yaml File.read("../zamples/players/hulu/total_length_over_an_hour.
|
176
|
+
a = ScreenTracker.new_from_yaml File.read("../zamples/players/hulu/total_length_over_an_hour.txt"), nil
|
177
177
|
end
|
178
178
|
|
179
179
|
end
|
@@ -185,7 +185,7 @@ describe ScreenTracker do
|
|
185
185
|
context "using a digit capable setting" do
|
186
186
|
|
187
187
|
before do
|
188
|
-
@a = ScreenTracker.new_from_yaml File.read("../zamples/players/vlc/windowed_total_length_under_an_hour.
|
188
|
+
@a = ScreenTracker.new_from_yaml File.read("../zamples/players/vlc/windowed_total_length_under_an_hour.txt"), nil
|
189
189
|
end
|
190
190
|
|
191
191
|
it "should use OCR against the changes appropriately" do
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/common')
|
2
|
+
|
3
|
+
require_relative '../lib/swing_helpers'
|
4
|
+
module SensibleSwing
|
5
|
+
describe SensibleSwing do
|
6
|
+
|
7
|
+
it "should close its modeless dialog" do
|
8
|
+
|
9
|
+
dialog = ModeLessDialog.new("Is this modeless?")
|
10
|
+
dialog = ModeLessDialog.new("Is this modeless?\nSecond lineLL")
|
11
|
+
dialog = ModeLessDialog.new("Is this modeless?\nSecond lineLL\nThird line too!")
|
12
|
+
dialog = ModeLessDialog.new("Can this take very long lines of input, like super long?")
|
13
|
+
#dialog.dispose # should get here :P
|
14
|
+
# let them close it :P
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
data/spec/test10.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
asfd
|
data/spec/vlc_programmer.spec.rb
CHANGED
@@ -5,7 +5,7 @@ require_relative '../lib/vlc_programmer'
|
|
5
5
|
describe 'VLC Programmer' do
|
6
6
|
|
7
7
|
it "should be able to convert" do
|
8
|
-
a = YAML.load_file "../zamples/scene_lists/dvds/happy_feet_dvd.
|
8
|
+
a = YAML.load_file "../zamples/scene_lists/dvds/happy_feet_dvd.txt"
|
9
9
|
out = VLCProgrammer.convert_to_full_xspf(a)
|
10
10
|
out.length.should_not == 0
|
11
11
|
out.should include("<title>Playlist</title>")
|
@@ -91,7 +91,8 @@ describe 'VLC Programmer' do
|
|
91
91
|
bat_file.scan(/type/).length.should == 1
|
92
92
|
bat_file.scan(/rm go.ps.1/).length.should == 1
|
93
93
|
bat_file.scan(/echo/).length.should == 1
|
94
|
-
|
94
|
+
# should not have extra popups...
|
95
|
+
bat_file.scan(/--qt-start-minimized/i).length.should == 3
|
95
96
|
File.write('mute5-10.bat', bat_file)
|
96
97
|
puts 'run it like $ mute5-10.bat'
|
97
98
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/zamples/players/youtube/{normal_in_youtube.com.chrome.yml → normal_in_youtube.com.chrome.txt}
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/zamples/scene_lists/dvds/{all_dogs_go_to_heaven_dvd.yml → all_dogs_go_to_heaven_dvd.txt}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/zamples/scene_lists/{example_scene_descriptions_list.yml → example_scene_descriptions_list.txt}
RENAMED
File without changes
|
@@ -5,4 +5,4 @@ mutes:
|
|
5
5
|
11:21 : 11:24.5 # re
|
6
6
|
19:45 : 19:50 # religious exclamation weak "may *** have mercy on your soul"
|
7
7
|
"01:15:38.5" : "01:15:41.5" # "scatalogical" Data when they are about to plummet to earth
|
8
|
-
missing: "religious exclamation strong near beginning"
|
8
|
+
missing: "religious exclamation strong near beginning [sorry]"
|
data/zamples/scene_lists/youtube/{gummy_bear_song_youtube.yml → gummy_bear_song_youtube.txt}
RENAMED
File without changes
|
File without changes
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 14
|
8
8
|
- 1
|
9
|
-
version: 0.
|
9
|
+
version: 0.14.1
|
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-11-
|
17
|
+
date: 2010-11-23 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -157,14 +157,15 @@ email: rogerdpack@gmail.com
|
|
157
157
|
executables:
|
158
158
|
- sensible-cinema
|
159
159
|
- sensible-cinema-cli
|
160
|
-
- swing_helpers.rb
|
161
160
|
extensions:
|
162
161
|
- ext/mkrf_conf.rb
|
163
162
|
extra_rdoc_files:
|
163
|
+
- ChangeLog
|
164
164
|
- LICENSE
|
165
165
|
- README
|
166
166
|
- TODO
|
167
167
|
files:
|
168
|
+
- ChangeLog
|
168
169
|
- LICENSE
|
169
170
|
- README
|
170
171
|
- Rakefile
|
@@ -172,7 +173,6 @@ files:
|
|
172
173
|
- VERSION
|
173
174
|
- bin/sensible-cinema
|
174
175
|
- bin/sensible-cinema-cli
|
175
|
-
- bin/swing_helpers.rb
|
176
176
|
- ext/mkrf_conf.rb
|
177
177
|
- gplv3.txt
|
178
178
|
- lib/blanker.rb
|
@@ -180,10 +180,12 @@ files:
|
|
180
180
|
- lib/file_chooser.rb
|
181
181
|
- lib/keyboard_input.rb
|
182
182
|
- lib/mouse.rb
|
183
|
+
- lib/mouse_forever.rb
|
183
184
|
- lib/muter.rb
|
184
185
|
- lib/ocr.rb
|
185
186
|
- lib/overlayer.rb
|
186
187
|
- lib/screen_tracker.rb
|
188
|
+
- lib/swing_helpers.rb
|
187
189
|
- lib/vlc_programmer.rb
|
188
190
|
- never_do
|
189
191
|
- spec/blanker.spec.rb
|
@@ -237,12 +239,12 @@ files:
|
|
237
239
|
- spec/images/youtube_small_4.bmp
|
238
240
|
- spec/keyboard_input.spec.rb
|
239
241
|
- spec/mouse.spec.rb
|
240
|
-
- spec/mouse_forever.rb
|
241
242
|
- spec/muter.spec.rb
|
242
243
|
- spec/ocr.spec.rb
|
243
244
|
- spec/overlayer.spec.rb
|
244
245
|
- spec/screen_tracker.spec.rb
|
245
246
|
- spec/silence.wav
|
247
|
+
- spec/swing_helpers.spec.rb
|
246
248
|
- spec/test_yaml.yml
|
247
249
|
- spec/vlc_programmer.spec.rb
|
248
250
|
- vendor/gocr048.exe
|
@@ -269,27 +271,29 @@ files:
|
|
269
271
|
- vendor/imagemagick/msvcr90.dll
|
270
272
|
- vendor/imagemagick/vcomp90.dll
|
271
273
|
- zamples/players/how_to_create_more_players.txt
|
272
|
-
- zamples/players/hulu/total_length_over_an_hour.
|
273
|
-
- zamples/players/vlc/full_screened_total_length_over_an_hour.
|
274
|
-
- zamples/players/vlc/windowed_total_length_over_an_hour.
|
275
|
-
- zamples/players/vlc/windowed_total_length_under_an_hour.
|
276
|
-
- zamples/players/youtube/full_screened_1024x768.
|
277
|
-
- zamples/players/youtube/full_screened_1152x864.
|
278
|
-
- zamples/players/youtube/full_screened_1680x1050.
|
279
|
-
- zamples/players/youtube/normal_in_youtube.com.chrome.
|
274
|
+
- zamples/players/hulu/total_length_over_an_hour.txt
|
275
|
+
- zamples/players/vlc/full_screened_total_length_over_an_hour.txt
|
276
|
+
- zamples/players/vlc/windowed_total_length_over_an_hour.txt
|
277
|
+
- zamples/players/vlc/windowed_total_length_under_an_hour.txt
|
278
|
+
- zamples/players/youtube/full_screened_1024x768.txt
|
279
|
+
- zamples/players/youtube/full_screened_1152x864.txt
|
280
|
+
- zamples/players/youtube/full_screened_1680x1050.txt
|
281
|
+
- zamples/players/youtube/normal_in_youtube.com.chrome.txt
|
280
282
|
- zamples/players/youtube/note_these_assume_less_than_10_minutes_length.txt
|
281
|
-
- zamples/scene_lists/category descriptions.
|
282
|
-
- zamples/scene_lists/dvds/White Christmas.
|
283
|
-
- zamples/scene_lists/dvds/all_dogs_go_to_heaven_dvd.
|
284
|
-
- zamples/scene_lists/dvds/bobs_big_plan.
|
285
|
-
- zamples/scene_lists/dvds/cars_disney.
|
286
|
-
- zamples/scene_lists/dvds/happy_feet_dvd.
|
287
|
-
- zamples/scene_lists/dvds/labyrinth.
|
288
|
-
- zamples/scene_lists/dvds/making marriage work.
|
289
|
-
- zamples/scene_lists/example_scene_descriptions_list.
|
290
|
-
- zamples/scene_lists/star_trek_generations_hulu.
|
291
|
-
- zamples/scene_lists/youtube/gummy_bear_song_youtube.
|
292
|
-
- zamples/scene_lists/youtube/nuki_song_youtube.
|
283
|
+
- zamples/scene_lists/category descriptions.txt
|
284
|
+
- zamples/scene_lists/dvds/White Christmas.txt
|
285
|
+
- zamples/scene_lists/dvds/all_dogs_go_to_heaven_dvd.txt
|
286
|
+
- zamples/scene_lists/dvds/bobs_big_plan.txt
|
287
|
+
- zamples/scene_lists/dvds/cars_disney.txt
|
288
|
+
- zamples/scene_lists/dvds/happy_feet_dvd.txt
|
289
|
+
- zamples/scene_lists/dvds/labyrinth.txt
|
290
|
+
- zamples/scene_lists/dvds/making marriage work.txt
|
291
|
+
- zamples/scene_lists/example_scene_descriptions_list.txt
|
292
|
+
- zamples/scene_lists/star_trek_generations_hulu.txt
|
293
|
+
- zamples/scene_lists/youtube/gummy_bear_song_youtube.txt
|
294
|
+
- zamples/scene_lists/youtube/nuki_song_youtube.txt
|
295
|
+
- spec/recreate_odd.rb
|
296
|
+
- spec/test10.rb
|
293
297
|
has_rdoc: true
|
294
298
|
homepage: http://github.com/rdp
|
295
299
|
licenses: []
|
@@ -328,9 +332,11 @@ test_files:
|
|
328
332
|
- spec/convert_image.rb
|
329
333
|
- spec/keyboard_input.spec.rb
|
330
334
|
- spec/mouse.spec.rb
|
331
|
-
- spec/mouse_forever.rb
|
332
335
|
- spec/muter.spec.rb
|
333
336
|
- spec/ocr.spec.rb
|
334
337
|
- spec/overlayer.spec.rb
|
338
|
+
- spec/recreate_odd.rb
|
335
339
|
- spec/screen_tracker.spec.rb
|
340
|
+
- spec/swing_helpers.spec.rb
|
341
|
+
- spec/test10.rb
|
336
342
|
- spec/vlc_programmer.spec.rb
|
data/bin/swing_helpers.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
require 'java'
|
2
|
-
module SensibleSwing
|
3
|
-
include_package 'javax.swing'
|
4
|
-
[JButton, JFrame, JLabel, JPanel, JOptionPane,
|
5
|
-
JFileChooser, JComboBox, JDialog] # grab these constants (http://jira.codehaus.org/browse/JRUBY-5107)
|
6
|
-
include_package 'java.awt'
|
7
|
-
[FlowLayout, Font]
|
8
|
-
include_class 'java.awt.event.ActionListener'
|
9
|
-
JFile = java.io.File
|
10
|
-
|
11
|
-
class JButton
|
12
|
-
def initialize *args
|
13
|
-
super *args
|
14
|
-
set_font Font.new("Tahoma", Font::PLAIN, 11)
|
15
|
-
end
|
16
|
-
|
17
|
-
def on_clicked &block
|
18
|
-
raise unless block
|
19
|
-
add_action_listener do |e|
|
20
|
-
block.call
|
21
|
-
end
|
22
|
-
self
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
class JFrame
|
28
|
-
def close
|
29
|
-
dispose # sigh
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
class JFileChooser
|
34
|
-
# returns nil on failure...
|
35
|
-
def go
|
36
|
-
success = show_open_dialog nil
|
37
|
-
unless success == Java::javax::swing::JFileChooser::APPROVE_OPTION
|
38
|
-
puts "did not choose one"
|
39
|
-
java.lang.System.exit 1
|
40
|
-
end
|
41
|
-
get_selected_file.get_absolute_path
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
# code examples
|
48
|
-
# JOptionPane.showInputDialog(nil, "not implemented yet", "not implemented yet", JOptionPane::ERROR_MESSAGE)
|