SRT Parser
A nifty tool to get SRT coverage from a video. Still in the works!
Getting started
Add SRT Parser to your Gemfile with:
gem 'srt_parser'Usage
Parse a given SRT file with a specified video duration:
subtitle = SRTParser::Parser.parse(File.new('MY_SRT_FILENAME.srt'), duration)Then, to get the coverage from that file:
coverage = subtitle.coverageYou can also merge multiple subtitles for the same video to get an aggregate coverage:
merged_subtitle = SRTParser::Subtitle.merge(SUBTITLE_1, SUBTITLE_2)
merged_subtitle.coverageContributing
- Fork it!
- Create your feature branch (
git checkout -b my-new-feature). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin my-new-feature). - Create new Pull Request.