Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.
/ vtt2an Public archive

Convert WebVTT files to Akoma Ntoso transcript format

License

Notifications You must be signed in to change notification settings

Floppy/vtt2an

Repository files navigation

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

About

Convert WebVTT files to Akoma Ntoso transcript format

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages