Skip to main content

A tool that convert ASS/SSA subtitle to SRT format

Project description

asstosrt is a tool which can convert Advanced SubStation Alpha (ASS/SSA) subtitle files to SubRip (SRT) files. Many old devices only support SubRip.

Usage

Install asstosrt.

# pip install asstosrt

chardet is suggested, which provide auto charset detection.

# pip install charset

Then cd into the directory of ASS/SSA files. Run asstosrt.

$ asstosrt

Done. All converted SRT files will be wrote to current directory.

Run with --help see more.

$ asstosrt --help

More Examples

Specify input and output encoding, output directory:

$ asstosrt -e utf-8 -s utf-18be -o /to/some/path/

Convert to Simplified Chinese (Using langconv download):

$ asstosrt -t zh-hans -s gb18030 /path/to/some.big5.ass

Convert to Traditional Chinese (Using OpenCC):

# pip install pyopencc
$ asstosrt -c zhs2zht.ini

Only keep first line for each dialogue and delete all effects:

$ asstosrt --only-first-line --no-effact

Used as a Library

You can use asstosrt on your program easily.

import asstosrt

ass_file = open('example.ass')
srt_str = asstosrt.convert(ass_file)

License

MIT License

Bugs and Issues

Please visit GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asstosrt-0.1.3.zip (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asstosrt-0.1.3.win32.exe (242.4 kB view details)

Uploaded Source

File details

Details for the file asstosrt-0.1.3.zip.

File metadata

  • Download URL: asstosrt-0.1.3.zip
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for asstosrt-0.1.3.zip
Algorithm Hash digest
SHA256 d37a4363e443a664717b1c5aacf08947696c9e038b7ac34f1c425f17d1a8eeed
MD5 01cc9aa0934fb3bf73039064de003221
BLAKE2b-256 224dbaa8c32d85c39d5cd18325851417783dc864906c907260a5f5082f95c84e

See more details on using hashes here.

File details

Details for the file asstosrt-0.1.3.win32.exe.

File metadata

  • Download URL: asstosrt-0.1.3.win32.exe
  • Upload date:
  • Size: 242.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for asstosrt-0.1.3.win32.exe
Algorithm Hash digest
SHA256 24d8d090bc2b844ec22165ba37b38e864385f8e43a9b4743548fd3625798f4d4
MD5 61bd3e6a08f86ec6c4e61bada0c1c0a5
BLAKE2b-256 dd05601ee250b9ac835a280c72a16d43add3f9460783a40d1a56374ece499efa

See more details on using hashes here.

Supported by

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