edl 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +10 -10
- data/edl.gemspec +3 -2
- data/lib/edl.rb +1 -1
- data/lib/edl/linebreak_magician.rb +7 -20
- data/test/samples/edl_mixed_line_endings.edl +12 -0
- data/test/test_edl.rb +8 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8229f60333ce6d40281980eb5dfb8188f5283882
|
4
|
+
data.tar.gz: 24b0c0eb16e8563a228543213142d06104876312
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 895259b1cf0bc020766d6dc6b075a3cb1b5853ab2775f65c385544d0113cb0b3d74a34fe2f2d4082f53d0381e1ab09368d2cb5670bae1479b61a196d72567438
|
7
|
+
data.tar.gz: 7bd9cfccbd517a5a1f2c5ccc9541c5552d7a529409d11cd9dc89377ea6970c9eb352b015839e7f323af8c684101e4a571d3d70ba4451031d2e8b0c765317b0b6
|
data/History.txt
CHANGED
@@ -1,39 +1,39 @@
|
|
1
|
-
=== 0.1.3
|
1
|
+
=== 0.1.3
|
2
2
|
|
3
3
|
* Adds Event#capture_to_and_including_tc which is convenient for frame searches
|
4
4
|
|
5
|
-
=== 0.1.2
|
5
|
+
=== 0.1.2
|
6
6
|
|
7
7
|
* Fix parsing of files with Windows and \r linebreaks properly
|
8
8
|
|
9
|
-
=== 0.1.1
|
9
|
+
=== 0.1.1
|
10
10
|
|
11
11
|
* Fix parsing of files with Windows linebreaks. In an ugly manner.
|
12
12
|
|
13
|
-
=== 0.0.8
|
13
|
+
=== 0.0.8
|
14
14
|
|
15
15
|
* Switch Rubyforge project to guerilla-di
|
16
16
|
|
17
|
-
=== 0.0.7
|
17
|
+
=== 0.0.7
|
18
18
|
|
19
19
|
* Register line_number in the original EDL for parsed events
|
20
20
|
* Preserve the star in comments that have it
|
21
21
|
|
22
|
-
=== 0.0.6
|
22
|
+
=== 0.0.6
|
23
23
|
|
24
24
|
* Fix comments in events appearing twice
|
25
25
|
* Capture extra comments that have no star at the beginning as fallback
|
26
26
|
|
27
|
-
=== 0.0.5
|
27
|
+
=== 0.0.5
|
28
28
|
|
29
29
|
* EDL::Event#starts_with_transition? is an alias
|
30
30
|
* EDL::Event#incoming_transition_duration works as a shortcut for EDL::Transition#duration
|
31
31
|
|
32
|
-
=== 0.0.4
|
32
|
+
=== 0.0.4
|
33
33
|
|
34
34
|
* EDL::Event#speed works as a shortcut for timewarp speed
|
35
35
|
|
36
|
-
=== 0.0.2
|
36
|
+
=== 0.0.2
|
37
37
|
|
38
38
|
* Fix reverse timewarps
|
39
39
|
* Migrate to specs
|
@@ -44,7 +44,7 @@
|
|
44
44
|
* Deprecate EDL::Clip - everything is an EDL::Event now
|
45
45
|
* Parse and save verbatim comments in EDL::Event#comments
|
46
46
|
|
47
|
-
=== 0.0.1
|
47
|
+
=== 0.0.1
|
48
48
|
|
49
49
|
* 1 major enhancement
|
50
50
|
|
data/edl.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "edl"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Julik Tarkhanov"]
|
12
|
-
s.date = "2014-
|
12
|
+
s.date = "2014-03-24"
|
13
13
|
s.email = "me@julik.nl"
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.rdoc"
|
@@ -42,6 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
"test/samples/TIMEWARP.EDL",
|
43
43
|
"test/samples/TIMEWARP_HALF.EDL",
|
44
44
|
"test/samples/TRAILER_EDL.edl",
|
45
|
+
"test/samples/edl_mixed_line_endings.edl",
|
45
46
|
"test/test_edl.rb"
|
46
47
|
]
|
47
48
|
s.homepage = "http://guerilla-di.org/edl"
|
data/lib/edl.rb
CHANGED
@@ -10,7 +10,7 @@ require File.dirname(__FILE__) + '/edl/linebreak_magician'
|
|
10
10
|
|
11
11
|
# A simplistic EDL parser
|
12
12
|
module EDL
|
13
|
-
VERSION = "0.1.
|
13
|
+
VERSION = "0.1.5"
|
14
14
|
DEFAULT_FPS = 25.0
|
15
15
|
|
16
16
|
# Represents an EDL, is returned from the parser. Traditional operation is functional style, i.e.
|
@@ -1,24 +1,11 @@
|
|
1
|
-
require "delegate"
|
2
|
-
|
3
1
|
# EDLs sometimes come with \r line breaks, and this is something that fails
|
4
2
|
# with Ruby standard line separator detection. We need something to help us
|
5
|
-
# with that
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
__setobj__(with_file)
|
3
|
+
# with that. In this case we can just do a bulk replace because EDLs will be relatively
|
4
|
+
# small for even very long features.
|
5
|
+
class EDL::LinebreakMagician < StringIO
|
6
|
+
LOOSE_CR = /#{Regexp.escape("\r")}/
|
7
|
+
def initialize(with_io)
|
8
|
+
blob = with_io.read
|
9
|
+
super(blob.gsub(LOOSE_CR, "\n"))
|
13
10
|
end
|
14
|
-
|
15
|
-
def each(sep_string = $/, &blk)
|
16
|
-
super(@linebreak || sep_string, &blk)
|
17
|
-
end
|
18
|
-
alias_method :each_line, :each
|
19
|
-
|
20
|
-
def gets(sep_string = $/)
|
21
|
-
super(@linebreak || sep_string)
|
22
|
-
end
|
23
|
-
|
24
11
|
end
|
data/test/test_edl.rb
CHANGED
@@ -21,6 +21,7 @@ FCP_REVERSE = File.dirname(__FILE__) + '/samples/FCP_REVERSE.EDL
|
|
21
21
|
PLATES = File.dirname(__FILE__) + '/samples/PLATES.EDL'
|
22
22
|
KEY = File.dirname(__FILE__) + '/samples/KEY_TRANSITION.EDL'
|
23
23
|
CLIP_NAMES = File.dirname(__FILE__) + '/samples/REEL_IS_CLIP.txt'
|
24
|
+
MIXED_LINEBREAKS = File.dirname(__FILE__) + '/samples/edl_mixed_line_endings.edl'
|
24
25
|
|
25
26
|
class String
|
26
27
|
def tc(fps = Timecode::DEFAULT_FPS)
|
@@ -640,6 +641,13 @@ context "EffectMatcher" do
|
|
640
641
|
|
641
642
|
end
|
642
643
|
|
644
|
+
context "An EDL with mixed line breaks" do
|
645
|
+
should 'parse without errors' do
|
646
|
+
list = EDL::Parser.new.parse(File.open(MIXED_LINEBREAKS))
|
647
|
+
assert_equal ["* A", "* B", "* C", "* D", "* E", "* F", "* G"], list[0].comments
|
648
|
+
end
|
649
|
+
end
|
650
|
+
|
643
651
|
context "A complex EDL passed via Parser" do
|
644
652
|
should "parse without errors" do
|
645
653
|
assert_nothing_raised { EDL::Parser.new.parse(File.open(FORTY_FIVER)) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: timecode
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- test/samples/TIMEWARP.EDL
|
129
129
|
- test/samples/TIMEWARP_HALF.EDL
|
130
130
|
- test/samples/TRAILER_EDL.edl
|
131
|
+
- test/samples/edl_mixed_line_endings.edl
|
131
132
|
- test/test_edl.rb
|
132
133
|
homepage: http://guerilla-di.org/edl
|
133
134
|
licenses: []
|