sequencer 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +5 -0
- data/.travis.yml +10 -0
- data/Gemfile +1 -4
- data/{README.rdoc → README.md} +29 -22
- data/Rakefile +2 -21
- data/lib/sequencer.rb +1 -1
- data/lib/sequencer/version.rb +3 -0
- data/sequencer.gemspec +7 -37
- data/test/test_sequencer.rb +13 -12
- metadata +15 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 43ed73241fa2c8bfa2c506ce810564fbc9d7e36bb92d392fc6d98ba258aa87e5
|
4
|
+
data.tar.gz: a4840f086e14366f2492fb7476fdd3c99d3dc44a30cdcf2890672b821aa5d498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96c3148a178ac25bdedd2423f7ea250755d5e81b656fd71970f3d07b7df3ab233b19b6d99f0abe5a7ecfc8d7d6afd608cbc788e6e615f9cee5cfe7202351c8b0
|
7
|
+
data.tar.gz: 24f152d869d68a72f9d9e1ea95fdaeb57b48bb52ed1b1ea9afffcc03dc090f92a625fb1d3b8227326472e4f6600f8c79ec6350a9bf0f898d12c7337553393f5a
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/{README.rdoc → README.md}
RENAMED
@@ -1,32 +1,28 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/guerilla-di/sequencer.svg?branch=master)](https://travis-ci.org/guerilla-di/sequencer)
|
2
|
+
|
1
3
|
Sequencer is the swiss army knife of image sequence management for Ruby. It helps with things like
|
2
4
|
|
3
5
|
* Collapsing multibillion-files directory listings to sequence lists with sane names and sane string representations
|
4
6
|
* Detecting gaps in image sequences
|
5
7
|
* Renaming sequences for filename uniformity, number uniformity and so on
|
6
8
|
* Managing image sequences as whole units for media management
|
7
|
-
* ..and getting laid (sometimes)
|
8
9
|
|
9
|
-
|
10
|
+
## Usage
|
10
11
|
|
11
|
-
|
12
|
-
* Detect sequence from single file
|
12
|
+
From the terminal - go to a directory, and then:
|
13
13
|
|
14
|
-
|
14
|
+
$rseqls
|
15
|
+
|
16
|
+
Fussball_Shot[1..1, 3..3].sni
|
17
|
+
FinalLichtUitValSec_Shot1.[1..128].jpg
|
18
|
+
Fussball_Shot3_v02.sni
|
19
|
+
FinalLichtUitValSec_Shot1.0001.ifl
|
20
|
+
FinalLichtUitValSec.0001.ifl
|
21
|
+
FinalLichtUitValSec.[1..185].jpg
|
15
22
|
|
16
|
-
|
23
|
+
You also have `rseqpad` and `rseqrename` :-)
|
17
24
|
|
18
|
-
|
19
|
-
|
20
|
-
Fussball_Shot[1..1, 3..3].sni
|
21
|
-
FinalLichtUitValSec_Shot1.[1..128].jpg
|
22
|
-
Fussball_Shot3_v02.sni
|
23
|
-
FinalLichtUitValSec_Shot1.0001.ifl
|
24
|
-
FinalLichtUitValSec.0001.ifl
|
25
|
-
FinalLichtUitValSec.[1..185].jpg
|
26
|
-
|
27
|
-
You also have <tt>rseqpad</tt> and <tt>rseqrename</tt> :-)
|
28
|
-
|
29
|
-
From code:
|
25
|
+
From Ruby code, when dealing with a single file
|
30
26
|
|
31
27
|
require "sequencer"
|
32
28
|
s = Sequencer.from_single_file("/RAID/Film/CONFORM.092183.dpx")
|
@@ -35,15 +31,26 @@ From code:
|
|
35
31
|
s.missing_frames #=> 15, somebody was careless
|
36
32
|
s.pattern #=> "CONFORM.%06d.dpx", usable with printf right away
|
37
33
|
|
38
|
-
|
34
|
+
and when dealing with an `Enumerable` of filenames (not necessarily from a file system):
|
35
|
+
|
36
|
+
require "sequencer"
|
37
|
+
seqs = Sequencer.from_enumerable(["/RAID/Film/CONFORM.092184.dpx", "/RAID/Film/CONFORM.092183.dpx"])
|
38
|
+
seqs.inspect #=> [Sequence], it is an array of sequences since the passed Enumerable might have contained multiple
|
39
|
+
s = seqs.first
|
40
|
+
s.file_count #=> 2
|
41
|
+
s.gaps? #=> false
|
42
|
+
s.missing_frames #=> 0
|
43
|
+
s.pattern #=> "/RAID/Film/CONFORM.%06d.dpx", usable with printf right away
|
44
|
+
|
45
|
+
## Installation:
|
39
46
|
|
40
|
-
|
47
|
+
$ gem install sequencer
|
41
48
|
|
42
|
-
|
49
|
+
## License
|
43
50
|
|
44
51
|
(The MIT License)
|
45
52
|
|
46
|
-
Copyright (c) 2010 Julik Tarkhanov (me@julik.nl)
|
53
|
+
Copyright (c) 2010-2016 Julik Tarkhanov (me@julik.nl)
|
47
54
|
|
48
55
|
Permission is hereby granted, free of charge, to any person obtaining
|
49
56
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -1,25 +1,6 @@
|
|
1
|
-
|
2
|
-
require 'rubygems'
|
3
|
-
require 'jeweler'
|
4
|
-
require File.dirname(__FILE__) + "/lib/sequencer"
|
5
|
-
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.version = Sequencer::VERSION
|
8
|
-
gem.name = "sequencer"
|
9
|
-
gem.summary = "Image sequence sorting, scanning and manipulation"
|
10
|
-
gem.email = "me@julik.nl"
|
11
|
-
gem.homepage = "http://guerilla-di.org/sequencer"
|
12
|
-
gem.authors = ["Julik Tarkhanov"]
|
13
|
-
gem.license = 'MIT'
|
14
|
-
gem.executables = %w( rseqls rseqpad rseqrename )
|
15
|
-
|
16
|
-
# Do not package invisibles
|
17
|
-
gem.files.exclude ".*"
|
18
|
-
end
|
19
|
-
|
20
|
-
Jeweler::RubygemsDotOrgTasks.new
|
21
|
-
|
1
|
+
require 'bundler/gem_tasks'
|
22
2
|
require 'rake/testtask'
|
3
|
+
|
23
4
|
desc "Run all tests"
|
24
5
|
Rake::TestTask.new("test") do |t|
|
25
6
|
t.libs << "test"
|
data/lib/sequencer.rb
CHANGED
data/sequencer.gemspec
CHANGED
@@ -1,52 +1,22 @@
|
|
1
|
-
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
1
|
+
require File.dirname(__FILE__) + '/lib/sequencer/version'
|
5
2
|
|
6
3
|
Gem::Specification.new do |s|
|
7
4
|
s.name = "sequencer"
|
8
|
-
s.version =
|
5
|
+
s.version = Sequencer::VERSION
|
9
6
|
|
10
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
8
|
s.authors = ["Julik Tarkhanov"]
|
12
9
|
s.date = "2014-02-18"
|
13
10
|
s.email = "me@julik.nl"
|
14
11
|
s.executables = ["rseqls", "rseqpad", "rseqrename"]
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
|
17
|
-
]
|
18
|
-
s.files = [
|
19
|
-
"Gemfile",
|
20
|
-
"History.txt",
|
21
|
-
"README.rdoc",
|
22
|
-
"Rakefile",
|
23
|
-
"bin/rseqls",
|
24
|
-
"bin/rseqpad",
|
25
|
-
"bin/rseqrename",
|
26
|
-
"lib/sequencer.rb",
|
27
|
-
"lib/sequencer/padder.rb",
|
28
|
-
"sequencer.gemspec",
|
29
|
-
"test/test_sequencer.rb"
|
30
|
-
]
|
12
|
+
s.extra_rdoc_files = ["README.md"]
|
13
|
+
s.files = `git ls-files -z`.split("\x0")
|
31
14
|
s.homepage = "http://guerilla-di.org/sequencer"
|
32
15
|
s.licenses = ["MIT"]
|
33
16
|
s.require_paths = ["lib"]
|
34
17
|
s.rubygems_version = "2.0.3"
|
35
18
|
s.summary = "Image sequence sorting, scanning and manipulation"
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
41
|
-
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
42
|
-
s.add_development_dependency(%q<rake>, [">= 0"])
|
43
|
-
else
|
44
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
45
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
46
|
-
end
|
47
|
-
else
|
48
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
49
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
50
|
-
end
|
19
|
+
s.specification_version = 4
|
20
|
+
s.add_development_dependency("rake", [">= 0"])
|
21
|
+
s.add_development_dependency("minitest", [">= 0"])
|
51
22
|
end
|
52
|
-
|
data/test/test_sequencer.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'minitest/autorun'
|
2
2
|
require 'set'
|
3
3
|
require 'fileutils'
|
4
4
|
require File.dirname(__FILE__) + '/../lib/sequencer'
|
@@ -58,7 +58,7 @@ def teardown_test_dirs
|
|
58
58
|
FileUtils.rm_rf(TEST_DIR)
|
59
59
|
end
|
60
60
|
|
61
|
-
class Test_glob_and_padding_for < Test
|
61
|
+
class Test_glob_and_padding_for < Minitest::Test
|
62
62
|
|
63
63
|
def test_returns_proper_glob_pattern_padding_for_a_path_with_extension
|
64
64
|
glob, pad = Sequencer.glob_and_padding_for("file.00001.gif")
|
@@ -78,7 +78,7 @@ class Test_glob_and_padding_for < Test::Unit::TestCase
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
-
class Sequencer_entries_should < Test
|
81
|
+
class Sequencer_entries_should < Minitest::Test
|
82
82
|
def setup; emit_test_dirs; end
|
83
83
|
def teardown; teardown_test_dirs; end
|
84
84
|
|
@@ -89,7 +89,7 @@ class Sequencer_entries_should < Test::Unit::TestCase
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
-
class Sequencer_from_enum_should < Test
|
92
|
+
class Sequencer_from_enum_should < Minitest::Test
|
93
93
|
def setup; emit_test_dirs; end
|
94
94
|
def teardown; teardown_test_dirs; end
|
95
95
|
|
@@ -97,17 +97,18 @@ class Sequencer_from_enum_should < Test::Unit::TestCase
|
|
97
97
|
items = Dir.entries(TEST_DIR + '/many_seqs')
|
98
98
|
entries = Sequencer.from_enumerable(items)
|
99
99
|
names = entries.map{|e| e.to_s }
|
100
|
-
assert_equal ["anotherS [228..312].tif", "seq1.[458..512].tif", "single.tif", "subdir"],
|
100
|
+
assert_equal Set.new(["anotherS [228..312].tif", "seq1.[458..512].tif", "single.tif", "subdir"]),
|
101
|
+
Set.new(names)
|
101
102
|
end
|
102
103
|
end
|
103
104
|
|
104
|
-
class A_Sequence_created_from_unpadded_files_should < Test
|
105
|
+
class A_Sequence_created_from_unpadded_files_should < Minitest::Test
|
105
106
|
def setup; emit_test_dirs; end
|
106
107
|
def teardown; teardown_test_dirs; end
|
107
108
|
|
108
109
|
def test_properly_created
|
109
110
|
s = Sequencer.from_single_file(TEST_DIR + "/natural_numbering/somefiles 5545168.png")
|
110
|
-
|
111
|
+
assert s
|
111
112
|
assert_equal 30, s.expected_frames
|
112
113
|
assert_equal 30, s.file_count
|
113
114
|
assert_equal "somefiles %07d.png", s.pattern
|
@@ -125,7 +126,7 @@ class A_Sequence_created_from_a_file_that_has_no_numbering_slot_should
|
|
125
126
|
end
|
126
127
|
end
|
127
128
|
|
128
|
-
class Sequencer_bulk_rename_should < Test
|
129
|
+
class Sequencer_bulk_rename_should < Minitest::Test
|
129
130
|
def setup
|
130
131
|
emit_test_dirs
|
131
132
|
@with_gaps = Sequencer.from_single_file(TEST_DIR + "/sequence_and_sole_file/broken_seq.000245.tif")
|
@@ -146,7 +147,7 @@ class Sequencer_bulk_rename_should < Test::Unit::TestCase
|
|
146
147
|
end
|
147
148
|
end
|
148
149
|
|
149
|
-
class A_Sequence_created_from_pad_numbered_files_should < Test
|
150
|
+
class A_Sequence_created_from_pad_numbered_files_should < Minitest::Test
|
150
151
|
def setup
|
151
152
|
emit_test_dirs
|
152
153
|
@gapless = Sequencer.from_single_file(TEST_DIR + "/sequence_and_sole_file/seq1.000245.tif")
|
@@ -159,7 +160,7 @@ class A_Sequence_created_from_pad_numbered_files_should < Test::Unit::TestCase
|
|
159
160
|
end
|
160
161
|
|
161
162
|
def test_initialize_itself_from_one_path_to_a_file_in_the_sequence_without_gaps
|
162
|
-
|
163
|
+
assert @gapless
|
163
164
|
assert_kind_of Sequencer::Sequence, @gapless
|
164
165
|
assert_respond_to @gapless, :gaps?
|
165
166
|
assert !@gapless.single_file?
|
@@ -180,7 +181,7 @@ class A_Sequence_created_from_pad_numbered_files_should < Test::Unit::TestCase
|
|
180
181
|
end
|
181
182
|
|
182
183
|
def test_initialize_itself_from_one_path_to_a_file_in_the_sequence_with_gaps
|
183
|
-
|
184
|
+
assert @with_gaps
|
184
185
|
assert_kind_of Sequencer::Sequence, @with_gaps
|
185
186
|
assert !@with_gaps.single_file?
|
186
187
|
|
@@ -194,7 +195,7 @@ class A_Sequence_created_from_pad_numbered_files_should < Test::Unit::TestCase
|
|
194
195
|
end
|
195
196
|
|
196
197
|
def test_equals_another
|
197
|
-
|
198
|
+
assert @with_gaps
|
198
199
|
another = Sequencer.from_single_file(TEST_DIR + "/sequence_and_sole_file/broken_seq.000245.tif")
|
199
200
|
assert_equal @with_gaps, another
|
200
201
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequencer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
@@ -11,31 +11,31 @@ cert_chain: []
|
|
11
11
|
date: 2014-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description:
|
@@ -46,17 +46,20 @@ executables:
|
|
46
46
|
- rseqrename
|
47
47
|
extensions: []
|
48
48
|
extra_rdoc_files:
|
49
|
-
- README.
|
49
|
+
- README.md
|
50
50
|
files:
|
51
|
+
- ".gitignore"
|
52
|
+
- ".travis.yml"
|
51
53
|
- Gemfile
|
52
54
|
- History.txt
|
53
|
-
- README.
|
55
|
+
- README.md
|
54
56
|
- Rakefile
|
55
57
|
- bin/rseqls
|
56
58
|
- bin/rseqpad
|
57
59
|
- bin/rseqrename
|
58
60
|
- lib/sequencer.rb
|
59
61
|
- lib/sequencer/padder.rb
|
62
|
+
- lib/sequencer/version.rb
|
60
63
|
- sequencer.gemspec
|
61
64
|
- test/test_sequencer.rb
|
62
65
|
homepage: http://guerilla-di.org/sequencer
|
@@ -69,17 +72,17 @@ require_paths:
|
|
69
72
|
- lib
|
70
73
|
required_ruby_version: !ruby/object:Gem::Requirement
|
71
74
|
requirements:
|
72
|
-
- -
|
75
|
+
- - ">="
|
73
76
|
- !ruby/object:Gem::Version
|
74
77
|
version: '0'
|
75
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
79
|
requirements:
|
77
|
-
- -
|
80
|
+
- - ">="
|
78
81
|
- !ruby/object:Gem::Version
|
79
82
|
version: '0'
|
80
83
|
requirements: []
|
81
84
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.7.6
|
83
86
|
signing_key:
|
84
87
|
specification_version: 4
|
85
88
|
summary: Image sequence sorting, scanning and manipulation
|