https://github.com/doodzik/carrierwave_audio
a plugin to use ruby-audio_info with carrierwave
https://github.com/doodzik/carrierwave_audio
Last synced: 11 months ago
JSON representation
a plugin to use ruby-audio_info with carrierwave
- Host: GitHub
- URL: https://github.com/doodzik/carrierwave_audio
- Owner: doodzik
- License: mit
- Created: 2014-03-12T09:54:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-04-17T09:04:41.000Z (over 12 years ago)
- Last Synced: 2025-03-29T04:43:19.446Z (over 1 year ago)
- Language: Ruby
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# CarrierwaveAudio
audio plugin for Carrierwave
## Installation
install the ruby-sox https://github.com/TMXCredit/ruby-sox requirements on your system
Add this line to your application's Gemfile:
gem 'carrierwave_audio'
And then execute:
$ bundle
Or install it yourself as:
$ gem install carrierwave_audio
## Usage
```
class ExampleUploader < CarrierWave::Uploader::Base
include CarrierWave::Audio::Info
process :audio_info do |info|
model.duration = info.length
end
end
```
## Roadmap
add audio file type conversion
```
class ExampleUploader < CarrierWave::Uploader::Base
include CarrierWave::Audio::Modifier
# converts the audio file into the given types
# if the uploaded file is present it skips the conversion
# and stores it as it is
process audio_convert: [:mp3, :ogg]
end
```
## Contributing
1. Fork it ( http://github.com/doodzik/carrierwave_audio/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request