Skip to main content

Access to subtitles from various file formats

Project description

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)

The text encoding of input files is detected automatically.

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-1.0.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file subsy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: subsy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for subsy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9b6b22573b16ee5b0defd908bdc2c18958a6a3a529a95304961ae5c3157eb2e
MD5 4124e1b1e6e7b0430f52c3b07c488f46
BLAKE2b-256 e21f0e70fa98086b2226024b928882526890f30dd8826706a751b8a5eb31d839

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page