Project

vtt2an

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Convert WebVTT subtitles to Akoma Ntoso transcripts
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.12
~> 0.8
~> 11.0
~> 3.5

Runtime

 Project Readme

vtt2an

Build Status Dependency Status Coverage Status Code Climate Gem Version License

Convert WebVTT subtitles files into Akoma Ntoso transcripts.

Installation

Ruby 2.3.1 recommended, then:

gem install vtt2an

or add to your Gemfile:

gem "vtt2an"

and then

bundle

Usage

Ruby

Load a WebVTT file using webvtt-ruby, then convert it using Vtt2An::Converter to a REXML::Document in Akoma Ntoso format:

webvtt = WebVTT.read "in.wtt"
converter = Vtt2An::Converter.new webvtt
output = converter.convert
File.open("out.an", "w") do |f|
  output.write f
end

Command line

If you just want to convert files, you can use the handy command-line tool:

bundle exec exe/vtt2an.rb /path/to/file.vtt /path/to/output.an