edl 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.DS_Store +0 -0
- data/History.txt +4 -0
- data/Manifest.txt +1 -0
- data/README.txt +0 -0
- data/Rakefile +0 -0
- data/SPECS.txt +0 -0
- data/edl.gemspec +0 -0
- data/illustr/edl-explain.ai +0 -0
- data/lib/edl.rb +1 -1
- data/lib/edl/cutter.rb +0 -0
- data/lib/edl/event.rb +0 -0
- data/lib/edl/grabber.rb +0 -0
- data/lib/edl/parser.rb +14 -11
- data/lib/edl/timewarp.rb +0 -0
- data/lib/edl/transition.rb +0 -0
- data/test/.DS_Store +0 -0
- data/test/samples/45S_SAMPLE.EDL +0 -0
- data/test/samples/FCP_REVERSE.EDL +0 -0
- data/test/samples/PLATES.EDL +1 -0
- data/test/samples/REVERSE.EDL +0 -0
- data/test/samples/SIMPLE_DISSOLVE.EDL +0 -0
- data/test/samples/SPEEDUP_AND_FADEOUT.EDL +0 -0
- data/test/samples/SPEEDUP_REVERSE_AND_FADEOUT.EDL +0 -0
- data/test/samples/SPLICEME.EDL +0 -0
- data/test/samples/TIMEWARP.EDL +0 -0
- data/test/samples/TIMEWARP_HALF.EDL +0 -0
- data/test/samples/TRAILER_EDL.edl +0 -0
- data/test/test_edl.rb +7 -0
- metadata +77 -24
data/.DS_Store
CHANGED
File without changes
|
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/README.txt
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/SPECS.txt
CHANGED
File without changes
|
data/edl.gemspec
CHANGED
File without changes
|
data/illustr/edl-explain.ai
CHANGED
File without changes
|
data/lib/edl.rb
CHANGED
data/lib/edl/cutter.rb
CHANGED
File without changes
|
data/lib/edl/event.rb
CHANGED
File without changes
|
data/lib/edl/grabber.rb
CHANGED
File without changes
|
data/lib/edl/parser.rb
CHANGED
@@ -16,22 +16,25 @@ module EDL
|
|
16
16
|
end
|
17
17
|
|
18
18
|
# Parse a passed File or IO object line by line, or the whole string
|
19
|
-
def parse(
|
20
|
-
return parse(
|
21
|
-
|
19
|
+
def parse(input_string_or_io)
|
20
|
+
return parse(input_string_or_io.read) if input_string_or_io.respond_to?(:read)
|
21
|
+
|
22
|
+
# TODO properly normalize line breaks in a stream interface
|
23
|
+
input_string_or_io.gsub!(/(\r\n|\r)/, "\n")
|
24
|
+
input_in_io = StringIO.new(input_string_or_io)
|
25
|
+
|
26
|
+
# Normalize line breaks
|
22
27
|
stack, matchers = List.new, get_matchers
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
current_line = io_or_string.gets.strip
|
28
|
+
|
29
|
+
until input_in_io.eof?
|
30
|
+
|
31
|
+
current_line = input_in_io.gets.strip
|
29
32
|
m = matchers.find{|m| m.matches?(current_line) }
|
33
|
+
|
30
34
|
next unless m
|
31
|
-
|
32
35
|
begin
|
33
36
|
m.apply(stack, current_line)
|
34
|
-
stack[-1].line_number =
|
37
|
+
stack[-1].line_number = input_in_io.lineno if m.is_a?(EventMatcher)
|
35
38
|
rescue Matcher::ApplyError => e
|
36
39
|
STDERR.puts "Cannot parse #{current_line} - #{e}"
|
37
40
|
end
|
data/lib/edl/timewarp.rb
CHANGED
File without changes
|
data/lib/edl/transition.rb
CHANGED
File without changes
|
data/test/.DS_Store
CHANGED
File without changes
|
data/test/samples/45S_SAMPLE.EDL
CHANGED
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
TITLE: PLATES.
|
data/test/samples/REVERSE.EDL
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/samples/SPLICEME.EDL
CHANGED
File without changes
|
data/test/samples/TIMEWARP.EDL
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/test/test_edl.rb
CHANGED
@@ -18,6 +18,7 @@ AVID_REVERSE = File.dirname(__FILE__) + '/samples/REVERSE.EDL'
|
|
18
18
|
SPEEDUP_AND_FADEOUT = File.dirname(__FILE__) + '/samples/SPEEDUP_AND_FADEOUT.EDL'
|
19
19
|
SPEEDUP_REVERSE_AND_FADEOUT = File.dirname(__FILE__) + '/samples/SPEEDUP_REVERSE_AND_FADEOUT.EDL'
|
20
20
|
FCP_REVERSE = File.dirname(__FILE__) + '/samples/FCP_REVERSE.EDL'
|
21
|
+
PLATES = File.dirname(__FILE__) + '/samples/PLATES.EDL'
|
21
22
|
|
22
23
|
class String
|
23
24
|
def tc(fps = Timecode::DEFAULT_FPS)
|
@@ -406,6 +407,7 @@ context "EventMatcher should" do
|
|
406
407
|
'024 AX V C 00:00:00:00 00:00:01:00 01:00:28:19 01:00:29:19',
|
407
408
|
'025 BL V C 00:00:00:00 00:00:00:00 01:00:29:19 01:00:29:19',
|
408
409
|
'025 GEN V D 025 00:00:55:10 00:00:58:11 01:00:29:19 01:00:32:20',
|
410
|
+
'002 REDACTED V C 03:09:00:13 03:09:55:19 01:00:43:12 01:01:38:18',
|
409
411
|
]
|
410
412
|
|
411
413
|
specify "produce an Event" do
|
@@ -603,6 +605,11 @@ context "A complex EDL passed via Parser should" do
|
|
603
605
|
assert_nothing_raised { EDL::Parser.new.parse(File.open(FORTY_FIVER)) }
|
604
606
|
end
|
605
607
|
|
608
|
+
specify "parse the plates EDL with many events" do
|
609
|
+
evts = EDL::Parser.new.parse(File.read(PLATES))
|
610
|
+
assert_equal 3, evts.length
|
611
|
+
end
|
612
|
+
|
606
613
|
# TODO: this does not belong here
|
607
614
|
specify "be properly rewritten from zero" do
|
608
615
|
complex = EDL::Parser.new.parse(File.open(FORTY_FIVER))
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 25
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Julik Tarkhanov
|
@@ -9,50 +15,88 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2010-10-21 00:00:00 +02:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: test-spec
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
23
32
|
version: "0"
|
24
|
-
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
25
35
|
- !ruby/object:Gem::Dependency
|
26
36
|
name: timecode
|
27
|
-
|
28
|
-
|
29
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
30
40
|
requirements:
|
31
41
|
- - ">="
|
32
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 9
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
- 1
|
47
|
+
- 9
|
33
48
|
version: 0.1.9
|
34
|
-
|
49
|
+
type: :runtime
|
50
|
+
version_requirements: *id002
|
35
51
|
- !ruby/object:Gem::Dependency
|
36
52
|
name: flexmock
|
37
|
-
|
38
|
-
|
39
|
-
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
40
56
|
requirements:
|
41
57
|
- - ">="
|
42
58
|
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
43
62
|
version: "0"
|
44
|
-
|
63
|
+
type: :runtime
|
64
|
+
version_requirements: *id003
|
45
65
|
- !ruby/object:Gem::Dependency
|
46
|
-
name:
|
66
|
+
name: rubyforge
|
67
|
+
prerelease: false
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 7
|
74
|
+
segments:
|
75
|
+
- 2
|
76
|
+
- 0
|
77
|
+
- 4
|
78
|
+
version: 2.0.4
|
47
79
|
type: :development
|
48
|
-
|
49
|
-
|
80
|
+
version_requirements: *id004
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: hoe
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
50
86
|
requirements:
|
51
87
|
- - ">="
|
52
88
|
- !ruby/object:Gem::Version
|
53
|
-
|
54
|
-
|
55
|
-
|
89
|
+
hash: 21
|
90
|
+
segments:
|
91
|
+
- 2
|
92
|
+
- 6
|
93
|
+
- 1
|
94
|
+
version: 2.6.1
|
95
|
+
type: :development
|
96
|
+
version_requirements: *id005
|
97
|
+
description: |-
|
98
|
+
Work with EDL files from Ruby
|
99
|
+
http://en.wikipedia.org/wiki/Edit_decision_list
|
56
100
|
email:
|
57
101
|
- me@julik.nl
|
58
102
|
executables: []
|
@@ -89,11 +133,14 @@ files:
|
|
89
133
|
- test/samples/SPEEDUP_REVERSE_AND_FADEOUT.EDL
|
90
134
|
- test/samples/SPLICEME.EDL
|
91
135
|
- test/samples/TIMEWARP.EDL
|
136
|
+
- test/samples/PLATES.EDL
|
92
137
|
- test/samples/TIMEWARP_HALF.EDL
|
93
138
|
- test/samples/TRAILER_EDL.edl
|
94
139
|
- test/test_edl.rb
|
95
140
|
has_rdoc: true
|
96
141
|
homepage:
|
142
|
+
licenses: []
|
143
|
+
|
97
144
|
post_install_message:
|
98
145
|
rdoc_options:
|
99
146
|
- --main
|
@@ -101,23 +148,29 @@ rdoc_options:
|
|
101
148
|
require_paths:
|
102
149
|
- lib
|
103
150
|
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
104
152
|
requirements:
|
105
153
|
- - ">="
|
106
154
|
- !ruby/object:Gem::Version
|
155
|
+
hash: 3
|
156
|
+
segments:
|
157
|
+
- 0
|
107
158
|
version: "0"
|
108
|
-
version:
|
109
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
|
+
none: false
|
110
161
|
requirements:
|
111
162
|
- - ">="
|
112
163
|
- !ruby/object:Gem::Version
|
164
|
+
hash: 3
|
165
|
+
segments:
|
166
|
+
- 0
|
113
167
|
version: "0"
|
114
|
-
version:
|
115
168
|
requirements: []
|
116
169
|
|
117
170
|
rubyforge_project: guerilla-di
|
118
|
-
rubygems_version: 1.3.
|
171
|
+
rubygems_version: 1.3.7
|
119
172
|
signing_key:
|
120
|
-
specification_version:
|
173
|
+
specification_version: 3
|
121
174
|
summary: Work with EDL files from Ruby http://en.wikipedia.org/wiki/Edit_decision_list
|
122
175
|
test_files:
|
123
176
|
- test/test_edl.rb
|