Coder Social home page Coder Social logo

sbv-to-ttaf's Introduction

Installation

You'll need Ruby installed and also Rake, which you can install with gem install rake.

Then just pull this repository down, and install the gem:

git clone [email protected]:alphagov/sbv-to-ttaf.git
cd sbv-to-ttaf
rake install
gem install pkg/sbv-to-ttaf-0.0.1.gem

Usage

We needed a tool to convert Youtube's SBV captions format, which looked like:

0:00:09.510,0:00:15
learn about Agile and how it works. For me
in particular it’s meant going out into

0:00:15.219,0:00:21
departments where they have an idea of a product
they want, rewinding them a couple of steps

And turn it into XML that looks like:

<tt xmlns="http://www.w3.org/2006/10/ttaf1"> <body> <div xml:id="captions">

<p begin="0:00:09" end="0:00:15">learn about Agile and how it works. For me
in particular it’s meant going out into
</p>

<p begin="0:00:15" end="0:00:21">departments where they have an idea of a product
they want, rewinding them a couple of steps
</p>

</div></body></tt>

There wasn't a tool out there that we could find, after some searching, so we made one. It uses a horrible regex that gets the job done.

Use it like this:

sbvttaf yourfile.sbv

And you'll get yourfile.xml created. Pass in a second argument to name the output file:

sbvttaf yourfile.sbv test

Will produce test.xml.

sbv-to-ttaf's People

Contributors

jackfranklin avatar

Stargazers

Nick DeNardis avatar

Watchers

James Stewart avatar Mark Norman Francis avatar  avatar minglis avatar Tom Loosemore avatar David Illsley avatar James Cloos avatar Mark Hurrell avatar  avatar

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.