Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Songkeys committed Feb 2, 2019
1 parent 9783d27 commit 0b29e67
Show file tree
Hide file tree
Showing 256 changed files with 318,462 additions and 7 deletions.
4 changes: 2 additions & 2 deletions asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"main.css": "static/css/main.1ad4f52f.css",
"main.css.map": "static/css/main.1ad4f52f.css.map",
"main.js": "static/js/main.f7aea465.js",
"main.js.map": "static/js/main.f7aea465.js.map"
"main.js": "static/js/main.af305a54.js",
"main.js.map": "static/js/main.af305a54.js.map"
}
1 change: 1 addition & 0 deletions data/danmu/json/第10回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第11回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第12回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第13回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第14回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第15回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第16回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第17回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第18回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第19回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第1回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第20回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第21回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第22回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第23回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第24回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第25回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第26回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第27回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第28回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第29回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第2回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第30回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第31回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第32回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第33回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第34回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第35回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第36回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第37回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第38回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第39回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第3回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第40回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第41回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第42回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第43回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第44回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第45回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第46回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第47回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第48回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第49回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第4回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第50回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第51回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第52回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第53回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第54回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第55回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第56回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第57回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第58回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第59回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第5回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第60回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第61回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第62回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第63回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第64回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第65回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第66回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第67回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第68回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第69回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第6回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第70回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第71回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第72回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第73回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第74回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第75回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第76回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第77回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第78回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第79回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第7回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第80回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第8回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/第9回.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/附赠DVD-81集.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/danmu/json/附赠DVD-拍摄花絮.json

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions data/danmu/parser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const fs = require("fs")
const path = require("path")

const source = path.join(__dirname + '/xml/')
const target = path.join(__dirname + '/json/')

const main = (dir, newDir) => {
const files = fs.readdirSync(dir);
files.forEach(file => {
if (path.extname(file) === '.xml') {
const danmuku = {
code: 0,
data: [],
}
fs.readFile(dir + file, 'utf8', (err, content) => {
const lines = content.split('\r\n')
for (let line of lines) {
line = line.replace('<d p="', '').replace('</d>', '')
const text = line.split('>')[1]
const time = line.split(',')[0]
const bilibiliType = line.split(',')[1]
const type = bilibiliType === '4' ? 2 : bilibiliType === '5' ? 1 : 0
const fontSize = line.split(',')[2]
const color = line.split(',')[3]
// const colorRGB = '#' + parseInt(color).toString(16).padStart(6, '0')
const timestamp = line.split(',')[4]
const pool = line.split(',')[5]
const author = line.split(',')[6]
const rowID = line.split(',')[7]
const oneDanmu = [
parseInt(time, 10) || 0,
parseInt(type) || 0,
parseInt(color) || 16777215, // colorRGB || '#' + (16777215).toString(16),
'bilibili' + author || 'DPlayer',
text || '',
]
danmuku.data.push(oneDanmu)
}
// write file
const newFileName = newDir + file.replace('.xml', '') + '.json'
const newFileContent = JSON.stringify(danmuku)
fs.writeFile(newFileName, newFileContent, err => {
if (err) {
console.log(file + 'fail!')
} else {
console.log('✅ ' + file + ' done!')
}
})
})

}
})
}

main(source, target);
11 changes: 11 additions & 0 deletions data/danmu/xml/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
`<d p="0,1,25,16777215,1312863760,0,eff85771,42759017">前排占位置</d>`


第一个参数是弹幕出现的时间 以秒数为单位。
第二个参数是弹幕的模式1..3 滚动弹幕 4底端弹幕 5顶端弹幕 6.逆向弹幕 7精准定位 8高级弹幕
第三个参数是字号, 12非常小,16特小,18小,25中,36大,45很大,64特别大
第四个参数是字体的颜色 以HTML颜色的十位数为准
第五个参数是Unix格式的时间戳。基准时间为 1970-1-1 08:00:00
第六个参数是弹幕池 0普通池 1字幕池 2特殊池 【目前特殊池为高级弹幕专用】
第七个参数是发送者的ID,用于“屏蔽此弹幕的发送者”功能
第八个参数是弹幕在弹幕数据库中rowID 用于“历史弹幕”功能。
14 changes: 14 additions & 0 deletions data/danmu/xml/第10回.acplay
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<AcPlayConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PlayerName>bilibili</PlayerName>
<PlayerUrl>http://static.hdslb.com/play.swf</PlayerUrl>
<WebUrl>http://www.bilibili.tv/video/av208751/index_10.html</WebUrl>
<HttpServerPort>7776</HttpServerPort>
<ProxyServerPort>7777</ProxyServerPort>
<Videos />
<Subtitles>
<string>第10回.xml</string>
</Subtitles>
<SpeedLimit>0</SpeedLimit>
<ExtraConfig />
</AcPlayConfiguration>
4,936 changes: 4,936 additions & 0 deletions data/danmu/xml/第10回.xml

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions data/danmu/xml/第11回.acplay
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<AcPlayConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PlayerName>bilibili</PlayerName>
<PlayerUrl>http://static.hdslb.com/play.swf</PlayerUrl>
<WebUrl>http://www.bilibili.tv/video/av208751/index_11.html</WebUrl>
<HttpServerPort>7776</HttpServerPort>
<ProxyServerPort>7777</ProxyServerPort>
<Videos />
<Subtitles>
<string>第11回.xml</string>
</Subtitles>
<SpeedLimit>0</SpeedLimit>
<ExtraConfig />
</AcPlayConfiguration>
5,587 changes: 5,587 additions & 0 deletions data/danmu/xml/第11回.xml

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions data/danmu/xml/第12回.acplay
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<AcPlayConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PlayerName>bilibili</PlayerName>
<PlayerUrl>http://static.hdslb.com/play.swf</PlayerUrl>
<WebUrl>http://www.bilibili.tv/video/av208751/index_12.html</WebUrl>
<HttpServerPort>7776</HttpServerPort>
<ProxyServerPort>7777</ProxyServerPort>
<Videos />
<Subtitles>
<string>第12回.xml</string>
</Subtitles>
<SpeedLimit>0</SpeedLimit>
<ExtraConfig />
</AcPlayConfiguration>
Loading

0 comments on commit 0b29e67

Please sign in to comment.