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
Built Distribution
File details
Details for the file asstosrt-0.1.6.tar.gz
.
File metadata
- Download URL: asstosrt-0.1.6.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8c7bdb4ac54fb74ad95058652229ba60d24ea644bd7ca40aa1f7495ad3b08bd |
|
MD5 | ed778f7748e83ec6642b2cff3d3e1358 |
|
BLAKE2b-256 | b3f61737a9044b117d7b9a2229f3f221b149faea23d293754dbf1918a9340ee1 |
File details
Details for the file asstosrt-0.1.6-py2.py3-none-any.whl
.
File metadata
- Download URL: asstosrt-0.1.6-py2.py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2e553dd0160a36576cbb89df589adc1e57351111bc8076ab4a76857beaa6f2a |
|
MD5 | 3c25c88a7db1fa7c4a7ab61e3aee07cf |
|
BLAKE2b-256 | bbdca11d932c230467adc3d1ed833d6f0d923eb16b48a893b8cd89ff5510983f |