Module: Girdle::Podcast::Action
- Defined in:
- lib/girdle/podcast/action.rb
Instance Method Summary collapse
- #add_chapter(options = {}) ⇒ Object
- #add_tracks(options = {}) ⇒ Object
- #annotate(options = {}) ⇒ Object
- #chapterize(options = {}) ⇒ Object
- #delete_tracks(options = {}) ⇒ Object
- #encode(options = {}) ⇒ Object
- #extract_tracks(options = {}) ⇒ Object
- #flatten(options = {}) ⇒ Object
- #get_poster_image(options = {}) ⇒ Object
- #join(options = {}) ⇒ Object
- #qt_import(options = {}) ⇒ Object
- #qt_info(options = {}) ⇒ Object
Instance Method Details
#add_chapter(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/girdle/podcast/action.rb', line 5 def add_chapter(={}) name = "add_chapter-#{uuid}.mov" arguments = [ 'addchapter', '--basedir', [:base_dir] || '.', '--input', [:input], '--output', name, '--time', [:time], '--title', [:title] ] new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#add_tracks(options = {}) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/girdle/podcast/action.rb', line 23 def add_tracks(={}) name = "add_tracks-#{uuid}.mov" arguments = [ 'addtracks', '--basedir', [:base_dir] || '.', '--tracks', [:tracks], '--input', [:input], '--output', name ] arguments += ['--offset', [:offset]] if [:offset] new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#annotate(options = {}) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/girdle/podcast/action.rb', line 41 def annotate(={}) arguments = [ 'annotate', '--basedir', [:base_dir] || '.', '--input', [:input] ] arguments += ['--title', [:title]] if [:title] arguments += ['--comment', [:comment]] if [:comment] arguments += ['--description', [:description]] if [:description] arguments += ['--author', [:author]] if [:author] arguments += ['--keywords', [:keywords]] if [:keywords] arguments += ['--copyright', [:copyright]] if [:copyright] new( name: "annotate-#{uuid}.mov", command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#chapterize(options = {}) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/girdle/podcast/action.rb', line 62 def chapterize(={}) name = "chapterize-#{uuid}.mov" arguments = [ 'chapterize', '--basedir', [:base_dir] || '.', '--input', [:input], '--output', name ] new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#delete_tracks(options = {}) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/girdle/podcast/action.rb', line 78 def delete_tracks(={}) name = "delete_tracks-#{uuid}.mov" arguments = [ 'deletetracks', '--basedir', [:base_dir] || '.', '--input', [:input], '--output', name, '--type', [:type] ] new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#encode(options = {}) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/girdle/podcast/action.rb', line 95 def encode(={}) name = "encode-#{uuid}.mov" arguments = [ 'encode', '--basedir', [:base_dir] || '.', '--input', [:input], '--output', name, '--encoder', [:encoder] ] new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#extract_tracks(options = {}) ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/girdle/podcast/action.rb', line 112 def extract_tracks(={}) name = "extract_tracks-#{uuid}.mov" arguments = [ 'extracttracks', '--basedir', [:base_dir] || '.', '--input', [:input], '--output', name, '--type', [:type] ] new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#flatten(options = {}) ⇒ Object
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/girdle/podcast/action.rb', line 129 def flatten(={}) name = "flatten-#{uuid}.mov" arguments = [ 'flatten', '--basedir', [:base_dir] || '.', '--input', [:input], '--output', name, ] new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#get_poster_image(options = {}) ⇒ Object
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/girdle/podcast/action.rb', line 145 def get_poster_image(={}) name = "get_poster_image-#{uuid}.png" arguments = [ 'getposterimage', '--basedir', [:base_dir] || '.', '--input', [:input], '--output', name, "--time=#{options[:time]}" ] new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#join(options = {}) ⇒ Object
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/girdle/podcast/action.rb', line 162 def join(={}) name = "join-#{uuid}.mov" arguments = [ 'join', '--basedir', [:base_dir] || '.', '--input1', [:input_1], '--input2', [:input_2], '--output', name ] new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input_1], [:input_2] ] + ([:depends_on] || [])) ) end |
#qt_import(options = {}) ⇒ Object
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/girdle/podcast/action.rb', line 179 def qt_import(={}) name = "qt_import-#{uuid}.mov" arguments = [ 'qtimport', '--basedir', [:base_dir] || '.', '--input', [:input], '--output', name ] if [:enable_auto_chaptering] == true arguments << '--enable_auto_chaptering' end new( name: name, command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |
#qt_info(options = {}) ⇒ Object
198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/girdle/podcast/action.rb', line 198 def qt_info(={}) arguments = [ 'qtinfo', '--basedir', [:base_dir] || '.', '--input', [:input], ] arguments += ['--key', [:key] ] if [:key] new( name: "qt_info-#{uuid}", command: '/usr/bin/pcastaction', arguments: arguments, depends_on: select_tasks([ [:input] ] + ([:depends_on] || [])) ) end |