asstosrt
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.
Metadata
Release files for asstosrt 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| asstosrt-0.1.6.tar.gz | 5.6 kB | Without provenance | Details for asstosrt-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asstosrt-0.1.6-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for asstosrt-0.1.6-py2.py3-none-any.whl |
Total release size: 14.6 kB
Release files / asstosrt-0.1.6.tar.gz
| Download URL | asstosrt-0.1.6.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8c7bdb4ac54fb74ad95058652229ba60d24ea644bd7ca40aa1f7495ad3b08bd
|
|
BLAKE2b-256 checksum How to use checksums |
b3f61737a9044b117d7b9a2229f3f221b149faea23d293754dbf1918a9340ee1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / asstosrt-0.1.6-py2.py3-none-any.whl
| Download URL | asstosrt-0.1.6-py2.py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f2e553dd0160a36576cbb89df589adc1e57351111bc8076ab4a76857beaa6f2a
|
|
BLAKE2b-256 checksum How to use checksums |
bbdca11d932c230467adc3d1ed833d6f0d923eb16b48a893b8cd89ff5510983f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for asstosrt 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.