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 (need langconv):

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

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.2.zip (8.5 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.2.win32.exe (241.5 kB view details)

Uploaded Source

File details

Details for the file asstosrt-0.1.2.zip.

File metadata

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

File hashes

Hashes for asstosrt-0.1.2.zip
Algorithm Hash digest
SHA256 a64851dc4ab1c7822d15f4d8151891e5596454b4cff0abc184cf89361e71b618
MD5 e7c19ca5405ee329b8ff38728e7900e1
BLAKE2b-256 4e4471edd78e52b033ae5efadcf62d01d611907c5cc106ac304b16b3402da115

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for asstosrt-0.1.2.win32.exe
Algorithm Hash digest
SHA256 ef9da0ca25f82b99970d3691e51ff966f6fe59d5667f73cc7941dbb24dd94160
MD5 f592ed7eb59460121c64c92232cb3141
BLAKE2b-256 e8c9262f234bf33b9a7585f3d6a6d57b101bc999b2c21af60024b6c6df6186be

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