No commit activity in last 3 years
No release in over 3 years
Submission for the Ruby Challenge to create a command line tool to shift SubRib formatted movie subtitles
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
 Project Readme

shift_subtitle¶ ↑

My submission for Ruby Challenge #1: Shift Subtitle

rubylearning.com/blog/2009/09/24/rpcfn-shift-subtitle-1

Features¶ ↑

  • 100% RSpec test coverage of both lib/* and bin/*

  • Works in both Ruby 1.8 and 1.9

  • Bundled as a gemcutter gem (thanks to Jeweler)

  • No external gem dependencies to use the gem

  • Command line related code in shift_subtitle_cli.rb and SubRib/SRT processing code in shift_subtitle.rb

  • shift_subtitle.rb uses IO streams (such as File and StringIO) to support processing large files

  • Time shifting handles boundary cases

    • Lower boundary shifting 00:00:00,001 down by a second shifts to 00:00:00,000

    • Shifting above the 24 hour boundary works fine (25, 26, 27 hours) and doesn’t rollover back to 00 hours

Requirements¶ ↑

You must have Gemcutter registered in your gem sources

Install¶ ↑

sudo gem install thuss-shift_subtitle

Usage¶ ↑

shift_subtitle –operation add –time 2,500 input output

Todo¶ ↑

  • Add a –version flag

  • Perhaps throw a warning if a subtraction shift results in the floor of 00:00:00,000

Copyright © 2009 Todd Huss. See LICENSE for details.