PySubitles is a Python Subtitle Class
PySubitles supports reading and writing subtitle files (currently SRT and SUB), splitting and merging subtitles, as well as performing time shifting, among others. It was originally created by Jan Gerber (~j) at oil21 org and this is its Launchpad home.
Jan is welcome to reclaim the ownership for the project, it has only been created to make it easier to publish patches :-)
>>> from subtitles import Subtitle
>>> s = Subtitle()
>>> s.loadSrtFile(
>>> s.shift(1000) # mseconds
>>> srt = s.toSrt() #unicode string in srt format
>>> s['3']
{'in': '00:00:05,800', out: '00:00:10,120',
text: 'The last 100 years have been\na story of resistance on'}
>>> text = unicode(s) # just the text without time and running number
View full history Series and milestones
trunk series is the current focus of development.