Access to subtitles from various file formats
Project description
Subsy
Access to subtitles from various file formats
This library is not fundamentally different from established ones, but offers some helpful abstractions that those others don't. First and foremost, subtitles loaded from a file are represented as a linked list. This makes it possible to implement search patterns and sanitization strategies that take the preceding or following subtitle into account, for example to recognize a running sentence.
>>> import subsy
>>> subtitles = subsy.load('subtitles.srt')
>>> first = subtitles[0]
>>> first.text
'How are you?'
>>> second = first.next
>>> second.text
'great, thanks.'
>>> second.text = 'Great, thanks.'
>>> subtitles.save()
Subtitles can be loaded from and saved to these file formats:
- Subrip (
.srt
) - Advanced Substation Alpha (
.ass
) - Substation Alpha (
.ssa
) - WebVTT (
.vtt
) - SubViewer (
.sub
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
subsy-0.9.0-py3-none-any.whl
(9.6 kB
view hashes)