pysami2

Python library and script for converting SAMI file


License
MIT
Install
pip install pysami2==0.0.1

Documentation

Pysami2

Python library for parsing SAMI file. Forked from samitizer (thus license is preserved).

Installation

# virtual environment like `virtualenv` is recommended
virtualenv venv
source venv/bin/activate

# install
pip install pysami2

Usage

from __future__ import print_function
from pysami2 import Smi

smi = Smi('sample.smi')
print(smi.subtitles[0].content['KRCC'])
vtt_text = smi.convert('vtt', lang='KRCC')
plain_text = smi.convert('plain', lang='KRCC')

Test

python -m tests.test