Git Product home page Git Product logo

shift_subtitle's Introduction

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.

shift_subtitle's People

Contributors

thuss avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

teachshits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.