Tool/library to add ruby text to subtitles
Project description
Migaku rubysubs
Tool/library to add ruby text to Advanced SubStation Alpha (.ass) subtitles using the same syntax as in Anki or the Migaku Anki plugins.
rubysubs is licensed under LGPLv3. See LICENSE for further detail.
Installation
Run the following to install:
pip install rubysubs
For binary releases refer to the releases page.
Usage as tool
rubysubs <source subtitle> <output subtitle> [<tag parser> [arg0] [arg1] ...]
- Source subtilte: Path to source subtitle file
- Output subtilte: Path to output subtitle file
- Tag parser (optional):
- ruby (default): Ruby square bracket tags, no arguments
- ja: Migaku Japanese tag parser
- arg0: mode (furigana/kanji/kana, default: furigana)
- arg1: pitch highlighting (yes/no, default: yes)
- arg2: pitch shapes (yes/no, default: no)
- arg3: unknown word underlining (yes/no, default: yes)
- arg4: 1T word highlighting (yes/no, default: yes)
Examples:
rubysubs source.ass out.ass
rubysubs source_ja.ass out_ja_furigana_no_markings.ass ja furigana no no no no
rubysubs source_ja.ass out_ja_kana_all_markings.ass ja kana yes yes yes yes
Notes:
- Style info is pulled from the style called
DefaultScaleXandScaleYare reset to 100SpacingandAngleare reset to 0Italic,UnderlineandStrikeoutare reset.Boldis supportedAlignmentis currently fixed to bottom-center withMarginVbeing considered
PlayResXandPlayResYscript info tags should be set to allow screen postion calculations. Defaults to 1920x1080- No ASS tags are supported
Usage as library
import sys
import rubysubs
from PyQt5.QtGui import QGuiApplication
# Required for QFontMetrics
qapp = QGuiApplication(sys.argv)
rubysubs.convert_sub_file('source.ass', 'out.ass', rubysubs.tag_parse_ruby.parse)
rubysubs.convert_sub_file('source_jp.ass', 'out_ja.ass', rubysubs.tag_parse_migaku_ja.parse)
Used libraries
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 Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rubysubs-0.1.4.tar.gz.
File metadata
- Download URL: rubysubs-0.1.4.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24b725ef658ffe9dd600542a9e7384abd500cbe8ba07abea9dd8556a85df972f
|
|
| MD5 |
49de47011b1036804e6800aeb68f5671
|
|
| BLAKE2b-256 |
9c74a134467239fc48927690d3eaeed56b4a6434613f4c754d3cd6d2990301cc
|
File details
Details for the file rubysubs-0.1.4-py3.9.egg.
File metadata
- Download URL: rubysubs-0.1.4-py3.9.egg
- Upload date:
- Size: 49.1 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43334831c88f3798cb42c0077157c9445e00c6bd782a2bb8853f280d06e72f81
|
|
| MD5 |
522939b48bd8ecbbdf07dc09bccb45ed
|
|
| BLAKE2b-256 |
8285ba0990a57571945ac5e40668ae7ed1670e44f2c56daff444e785ea84f364
|
File details
Details for the file rubysubs-0.1.4-py3-none-any.whl.
File metadata
- Download URL: rubysubs-0.1.4-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
618787b451015818c999639c46a3ea5b16cd98a512db9387908a9d23453b3f89
|
|
| MD5 |
ddbca401fa783b6ebad0f70bef54dc15
|
|
| BLAKE2b-256 |
12fcba571798e441c99ff8b5f7984a787c2b61f55070109d13a0018c29a5b966
|