- UID
- 2
- 积分
- 8682
- 帖子
- 2905
- 主题
- 199
- 论坛币
- 11741
- 威望
- 16
- EP值
- 2349
- MP值
- 15
- 阅读权限
- 200
- 注册时间
- 2011-8-3
- 在线时间
- 2597 小时
- 最后登录
- 2024-8-28
|
To add the support of multiple ASS style and avoiding the modification of the TCC file, we can use the inherited ASS header, see http://www.tcax.org/forum.php?mod=viewthread&tid=54.
And to ease the access to the values stored in the ASS header string, we need a wrapper class named AssStyles which is a container of AssStyle objects.
Implementation Tips
1. styles = AssStyles(GetVal(val_AssHeader)), the constructor extracts the information in the ASS Header string and store them in the AssStyles class instance.
2. The AssStyles class has a dict to hold the AssStyle objects, style = styles['style_name']
3. we can then access to the style values by style.name, style.fs, etc.
|
|