json-waveform 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6865a7f5c7f07c8c15f4f58a06b1c6ff840dae4e
4
- data.tar.gz: 3b6d9f92cdc05efc309b0125e7480149620c6aba
3
+ metadata.gz: ae6fa8b7dd587bc93aabb07369419ac3970c2163
4
+ data.tar.gz: 3e758570a3a7f1fdf82d0709d1bdc4052db233e1
5
5
  SHA512:
6
- metadata.gz: 6147921f5a577d809f1fff7ebc1adfb5d29177c030bb1882d7043768ceb5e8705976fbb8a53e632c2a72f1eb3e4cf63591b8094ab44596ed47e69a40aaab11d3
7
- data.tar.gz: aaeea25e81dd1e3a7d68090e8398e191b2c37234a11263f05d625f0b3708407ec741d42b9f113559d91e82e44d3f6c004bc71c75257cb74b65bb324707703b4e
6
+ metadata.gz: 1d8e7ba690cd2d0de0cf0302b198b9435a709db9aacb63dba4d5fd92f85e0f6d4e08ed32d869f3d57c8e7caa535cc01d18c231777dcee2f922562b72b344d1d4
7
+ data.tar.gz: 2215729a95823336761941d162967a961e244a5a5cb983f1ce057af2e42adaee863e6b9e0dca3518d81de9fc895e7e7b14f9a726e87084210e3e30becbac5346
@@ -4,14 +4,14 @@ require "optparse"
4
4
 
5
5
  options = JsonWaveform::DEFAULT_OPTIONS
6
6
  optparse = OptionParser.new do |o|
7
- o.banner = "Usage: waveform [options] source_audio"
8
- o.version = Waveform::VERSION
7
+ o.banner = "Usage: json-waveform [options] source_audio"
8
+ o.version = JsonWaveform::VERSION
9
9
 
10
- o.on("-s", "--samples SAMPLES", "Samples generated from the original file (i.e.: waveform width) -- Default #{Waveform::DefaultOptions[:samples]}.") do |samples|
10
+ o.on("-s", "--samples SAMPLES", "Samples generated from the original file (i.e.: waveform width) -- Default #{JsonWaveform::DefaultOptions[:samples]}.") do |samples|
11
11
  options[:samples] = samples.to_i
12
12
  end
13
13
 
14
- o.on("-A", "--amplitude AMPLITUDE", "Max amplitude of the waveform values-- Default #{Waveform::DefaultOptions[:amplitude]}.") do |amplitude|
14
+ o.on("-A", "--amplitude AMPLITUDE", "Max amplitude of the waveform values-- Default #{JsonWaveform::DefaultOptions[:amplitude]}.") do |amplitude|
15
15
  options[:amplitude] = amplitude.to_i
16
16
  end
17
17
 
@@ -19,7 +19,7 @@ optparse = OptionParser.new do |o|
19
19
  options[:auto_sample] = msec.to_i
20
20
  end
21
21
 
22
- o.on("-m", "--method METHOD", "Wave analyzation method (can be 'peak' or 'rms') -- Default '#{Waveform::DefaultOptions[:method]}'.") do |method|
22
+ o.on("-m", "--method METHOD", "Wave analyzation method (can be 'peak' or 'rms') -- Default '#{JsonWaveform::DefaultOptions[:method]}'.") do |method|
23
23
  options[:method] = method.to_sym
24
24
  end
25
25
 
@@ -32,12 +32,12 @@ end
32
32
  optparse.parse!
33
33
 
34
34
  begin
35
- result = Waveform.generate(ARGV[0], options)
35
+ result = JsonWaveform.generate(ARGV[0], options)
36
36
  puts result
37
- rescue Waveform::ArgumentError => e
37
+ rescue JsonWaveform::ArgumentError => e
38
38
  puts e.message + "\n\n"
39
39
  puts optparse
40
- rescue Waveform::RuntimeError => e
40
+ rescue JsonWaveform::RuntimeError => e
41
41
  puts e.message
42
42
  end
43
43
 
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
5
5
  s.version = JsonWaveform::VERSION
6
6
  s.summary = "Generate waveform JSON files from audio files"
7
7
  s.description = "Generate waveform JSON information from audio files, compatible with http://waveformjs.org/."
8
- s.authors = ["Esteban pastorino"]
8
+ s.authors = ["Esteban Pastorino"]
9
9
  s.email = ["ejpastorino@gmail.com"]
10
10
  s.homepage = "http://github.com/kitop/json-waveform"
11
11
 
@@ -1,3 +1,3 @@
1
1
  class JsonWaveform
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.2".freeze
3
3
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-waveform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - Esteban pastorino
7
+ - Esteban Pastorino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []