Skip to content

Commit

Permalink
🌿 Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
oovm committed May 12, 2019
1 parent 89e79c1 commit 998b52f
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 64 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ ASS/SSA/SRT/LRC support
- ASS align

## BUGs
- SRT HTML does not be identified
- SRT HTML not identified
- ASS Dialogue abnormal
- ASS Script not identified

## Supports

### ASS Format
### ASS/SSA Format

![ASS](https://user-images.githubusercontent.com/17541209/57573261-9ad2e500-7457-11e9-9ec2-0aab3d4729cd.png)
![ASS](https://user-images.githubusercontent.com/17541209/57577856-1f068600-74b3-11e9-9dec-d88acafcfe0a.png)

### LRC Format
![LRC](https://user-images.githubusercontent.com/17541209/57577857-1f9f1c80-74b3-11e9-96e1-68061f7a7420.png)

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@
{
"id": "ass",
"aliases": [
"SSA",
"ASS"
],
"extensions": [
".ass"
".ass",
".ssa"
],
"filenames": [],
"mimetypes": [],
Expand Down
75 changes: 24 additions & 51 deletions syntax/ass.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "ass",
"version": "v0.3.0",
"version": "v0.3.1",
"scopeName": "source.ass",
"uuid": "90101069-65f0-4834-a2fa-faad3b9d1400",
"information_for_contributors": [
Expand Down Expand Up @@ -81,8 +81,20 @@
"name": "punctuation.separator.ass"
},
{
"match": "\\b([a-zA-Z]\\w*)",
"name": "storage.type.ass"
"match": "\\b\\d*:[0-5][0-9]:[0-5][0-9]\\.\\d{2}",
"name": "support.function.time.ass"
},
{
"match": "\\&H[0-9A-F]+",
"name": "support.function.color.ass"
},
{
"match": "\\b-?\\d+(\\.\\d*)?",
"name": "constant.numeric.ass"
},
{
"match": "\\b[^,\\r\\n]*",
"name": "string.literal.ass"
}
]
},
Expand All @@ -99,7 +111,7 @@
"end": "\\r?\\n",
"patterns": [
{
"match": "(?<!\\w)(\\d*(\\.\\d*)?)(?!\\w)",
"match": "(?<!\\w)(-?\\d+(\\.\\d*)?)(?!\\w)",
"name": "constant.numeric.ass"
},
{
Expand All @@ -117,63 +129,24 @@
]
},
{
"captures": {
"1": {
"name": "keyword.other.definition.ass"
},
"2": {
"name": "punctuation.separator.key-value.ass"
}
},
"match": "\\b([a-zA-Z0-9_.-]+)\\b\\s*(=)"
},
{
"name": "entity.name.section.group-title.ass",
"match": "^(\\[)(.*?)(\\])",
"captures": {
"1": {
"name": "punctuation.definition.entity.ass"
},
"3": {
"name": "punctuation.definition.entity.ass"
}
},
"match": "^(\\[)(.*?)(\\])",
"name": "entity.name.section.group-title.ass"
},
{
"begin": "'",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.ass"
}
},
"end": "'",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.ass"
}
},
"name": "string.quoted.single.ass",
"patterns": [
{
"match": "\\\\.",
"name": "constant.character.escape.ass"
}
]
}
},
{
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.ass"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.ass"
"match": "(.*)",
"captures": {
"1": {
"name": "invalid.illegal.lyric"
}
},
"name": "string.quoted.double.ass"
}
}
]
}
4 changes: 2 additions & 2 deletions syntax/lrc.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"id": "lrc",
"version": "v0.3.0",
"version": "v0.3.1",
"scopeName": "source.lyric",
"uuid": "90101069-65f0-4834-a2fa-faad3b9d14da",
"information_for_contributors": [
"aster: galaster@foxmail.com"
],
"patterns": [
{
"begin": "\\[([0-9][0-9]:[0-6][0-9]\\.[0-9][0-9])\\]",
"begin": "\\[([0-5][0-9]:[0-5][0-9]\\.[0-9][0-9])\\]",
"beginCaptures": {
"1": {
"name": "constant.other.time.lyric"
Expand Down
4 changes: 2 additions & 2 deletions syntax/srt.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "srt",
"version": "v0.3.0",
"version": "v0.3.1",
"scopeName": "source.subrip",
"uuid": "90101069-65f0-4834-a2fa-faad3b9d14db",
"information_for_contributors": [
Expand All @@ -12,7 +12,7 @@
"name": "variable.other.readwrite.subrip"
},
{
"match": "^(\\d{2}:[0-6][0-9]:[0-6][0-9],\\d{3}) (-->) (\\d{2}:[0-6][0-9]:[0-6][0-9],\\d{3})$",
"match": "^(\\d{2}:[0-5][0-9]:[0-5][0-9],\\d{3}) (-->) (\\d{2}:[0-5][0-9]:[0-5][0-9],\\d{3})$",
"captures": {
"1": {
"name": "constant.other.time.subrip"
Expand Down
10 changes: 5 additions & 5 deletions test/极乐净土.srt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

4
00:00:42,370 --> 00:00:45,620
画纹理 缄默感 伸手引他出
呼唤你 缄默感 伸手引他出

5
00:00:45,620 --> 00:00:49,810
Expand All @@ -28,7 +28,7 @@

8
00:00:57,540 --> 00:01:00,540
我已经迈上薄空 那故旧净土
我已经迈上薄空 那古旧沃土

9
00:01:00,540 --> 00:01:04,160
Expand All @@ -44,7 +44,7 @@

12
00:01:11,740 --> 00:01:16,170
困扰你的梦里 啊 苦恼你自己
空犹豫的梦呓 啊 苦恼你自己

13
00:01:30,980 --> 00:01:34,110
Expand All @@ -64,7 +64,7 @@

17
00:01:44,260 --> 00:01:48,570
娇艳倒映瞳眸 隐透馨郁香
娇艳倒映瞳眸 隐透馨闻香

18
00:01:48,840 --> 00:01:51,680
Expand All @@ -76,7 +76,7 @@

20
00:01:56,120 --> 00:01:59,260
勇气梦想哦 不哭啦 苦酒乐土
勇气梦想哦 不哭啦 苦酒乐土

21
00:01:59,260 --> 00:02:02,850
Expand Down

0 comments on commit 998b52f

Please sign in to comment.