Asstosrt
Convert ASS subtitle to SRT format.
Install / Use
/learn @sorz/AsstosrtREADME
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.py <https://github.com/skydark/nstools/blob/master/zhtools/langconv.py>__ &
zh_wiki.py <https://github.com/skydark/nstools/blob/master/zhtools/zh_wiki.py>__):
::
$ 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 <https://github.com/sorz/asstosrt>__.
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
