-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.rb
More file actions
66 lines (43 loc) · 1.17 KB
/
gui.rb
File metadata and controls
66 lines (43 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Timelapse Maker
# 2015 Levi D. Smith
# Web: levidsmith.com
# Twitter: @GaTechGrad
# A graphical user interface that I started. Needs a lot of work!
require 'tk'
varVideoDir = TkVariable.new
varVideoDir = "Enter video folder"
def extractFrames
puts "Call encode.rb script"
puts "Parameter #{$textVideoDir.get}"
# system("ruby encode.rb")
# exit
end
def sequenceFrames
puts "Call seq_files.rb script"
# exit
end
root = TkRoot.new { title "Make Video" }
TkLabel.new(root) do
text "Timelapse Maker by Levi D. Smith 2015"
pack { padx 15; pady 15; size 'left' }
end
$textVideoDir = TkEntry.new(root) do
# textvariable varVideoDir
pack("side" => "left", "padx" => "50", "pady" => "10")
end
#textVideoFiles.textvariable = varVideoFiles
#textVideoFiles.place('height' => 25, 'width' => 150, 'x' => 10, 'y' => 40)
TkButton.new(root) do
text "Extract Frames"
borderwidth 5
command (proc {extractFrames})
pack("side" => "left", "padx" => "50", "pady" => "10")
end
TkButton.new(root) do
text "Sequence Frames"
borderwidth 5
command (proc {sequenceFrames})
# command "puts \"hello\" #{textVideoDir.get}"
pack("side" => "left", "padx" => "50", "pady" => "10")
end
Tk.mainloop