Spaces:
Sleeping
Sleeping
DWizard
commited on
Commit
·
8335e0e
1
Parent(s):
1de6702
add starPigeon ass style
Browse filesFormer-commit-id: 28ad3911a0ea41b300dab3fd0c70f11de787fc1f
- srt2ass.py +27 -1
srt2ass.py
CHANGED
|
@@ -78,6 +78,8 @@ def srt2ass(input_file,sub_style, is_split, split_method):
|
|
| 78 |
dlgLines += 'Dialogue: 0,' + line + ',正文_1080P,,0,0,0,,'
|
| 79 |
elif sub_style == 'asukaCN':
|
| 80 |
dlgLines += 'Dialogue: 0,' + line + ',DEFAULT1,,0,0,0,,'
|
|
|
|
|
|
|
| 81 |
else:
|
| 82 |
if lineCount < 2:
|
| 83 |
dlg_string = line
|
|
@@ -128,6 +130,8 @@ def srt2ass(input_file,sub_style, is_split, split_method):
|
|
| 128 |
head_name = 'head_str_taniguchi'
|
| 129 |
elif sub_style == 'asukaCN':
|
| 130 |
head_name = 'head_str_asuka'
|
|
|
|
|
|
|
| 131 |
|
| 132 |
head_str = STYLE_DICT.get(head_name)
|
| 133 |
output_str = utf8bom + head_str + '\n' + subLines
|
|
@@ -288,7 +292,29 @@ Style: 毕业曲MV 日文歌词,思源黑体 CN,58,&H0AFFFFFF,&H000000FF,&H0F000
|
|
| 288 |
|
| 289 |
[Events]
|
| 290 |
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
|
| 291 |
-
Dialogue: 0,0:00:00.00,0:00:05.00,Default,,0,0,0,,'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
# ADD MORE
|
| 293 |
|
| 294 |
}
|
|
|
|
| 78 |
dlgLines += 'Dialogue: 0,' + line + ',正文_1080P,,0,0,0,,'
|
| 79 |
elif sub_style == 'asukaCN':
|
| 80 |
dlgLines += 'Dialogue: 0,' + line + ',DEFAULT1,,0,0,0,,'
|
| 81 |
+
elif sub_style == 'starPigeon':
|
| 82 |
+
dlgLines += 'Dialogue: 0,' + line + ',Starcraft 2 下(一般字幕),,0,0,0,,'
|
| 83 |
else:
|
| 84 |
if lineCount < 2:
|
| 85 |
dlg_string = line
|
|
|
|
| 130 |
head_name = 'head_str_taniguchi'
|
| 131 |
elif sub_style == 'asukaCN':
|
| 132 |
head_name = 'head_str_asuka'
|
| 133 |
+
elif sub_style == 'starPigeon':
|
| 134 |
+
head_name = 'head_str_pigeon'
|
| 135 |
|
| 136 |
head_str = STYLE_DICT.get(head_name)
|
| 137 |
output_str = utf8bom + head_str + '\n' + subLines
|
|
|
|
| 292 |
|
| 293 |
[Events]
|
| 294 |
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
|
| 295 |
+
Dialogue: 0,0:00:00.00,0:00:05.00,Default,,0,0,0,,''',
|
| 296 |
+
'head_str_pigeon':'''[Script Info]
|
| 297 |
+
; The script is generated by project-t owned by starpigeon
|
| 298 |
+
; http://www.aegisub.org/
|
| 299 |
+
Title: Default Aegisub file
|
| 300 |
+
ScriptType: v4.00+
|
| 301 |
+
WrapStyle: 0
|
| 302 |
+
ScaledBorderAndShadow: yes
|
| 303 |
+
YCbCr Matrix: None
|
| 304 |
+
|
| 305 |
+
[Aegisub Project Garbage]
|
| 306 |
+
|
| 307 |
+
[V4+ Styles]
|
| 308 |
+
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
|
| 309 |
+
Style: Default,Arial,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1
|
| 310 |
+
Style: Starcraft 2 下(一般字幕),思源黑体 CN Normal,62,&H00FFFFFF,&H000000FF,&H634C4B45,&H00000000,0,0,0,0,100,100,0,0,3,1,0,2,10,10,30,1
|
| 311 |
+
Style: Starcraft 2 中(录像模式),思源黑体 CN Normal,62,&H00FFFFFF,&H000000FF,&H634C4B45,&H00000000,0,0,0,0,100,100,0,0,3,1,0,2,10,10,260,1
|
| 312 |
+
Style: Starcraft 2 上(实战模式),思源黑体 CN Normal,62,&H00FFFFFF,&H000000FF,&H634C4B45,&H00000000,0,0,0,0,100,100,0,0,3,1,0,2,10,10,225,1
|
| 313 |
+
Style: mianze,思源黑体 CN Normal,48,&H20FFFFFF,&HF0000000,&H20000000,&H000F0F0F,-1,0,0,0,100,100,0,0,1,0.8,0,9,8,24,8,1
|
| 314 |
+
|
| 315 |
+
[Events]
|
| 316 |
+
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
|
| 317 |
+
Dialogue: 0,0:00:00.00,0:00:03.00,mianze,,0,0,0,,{\fad(200,200)\an8}本字幕由星际鸽子字幕组制作'''
|
| 318 |
# ADD MORE
|
| 319 |
|
| 320 |
}
|