## bilibili 直播弹幕机
-golang go version go1.15.5 linux/amd64
+golang go version go1.15 linux/amd64
---
### 目录释义
```
编译命令
cd demo
-go build -v -tags `gtk gtk_3_24` -o demo.exe -i main.go
+go build -v -tags `gtk` -o demo.exe -i main.go
```
### demo
前往[releases](https://github.com/qydysky/bili_danmu/releases)页下载对应系统版本。解压后进入`demo`目录(文件夹),运行`demo.run`(`demo.exe`)。
//Msg类型数据处理方法map
var Msg_map = map[string]func(replyF, string) {
+ `HOT_RANK_SETTLEMENT`:nil,
+ `HOT_RANK_CHANGED`:nil,
`CARD_MSG`:nil,//提示关注
`LIVE_INTERACTIVE_GAME`:nil,
`WIDGET_BANNER`:nil,//每日任务
//由于额外功能有些需要显示,为了统一管理,使用此方法进行处理
func Msg_showdanmu(auth interface{}, m ...string) {
msg := m[0]
+ msglog := msglog.Log_show_control(false)
{//附加功能 更少弹幕
if Lessdanmuf(msg, 20) > 0.7 {//与前20条弹幕重复的字数占比度>0.7的屏蔽
if auth != nil {msglog.L(`I: `, auth, ":", msg)}
github.com/miekg/dns v1.1.35 // indirect
github.com/mitchellh/mapstructure v1.4.0 // indirect
github.com/qydysky/bili_danmu v0.5.7
- github.com/qydysky/part v0.3.5-0.20210105160037-508c706d691b // indirect
+ github.com/qydysky/part v0.3.5-0.20210106133414-a27e61b5ba4b // indirect
github.com/shirou/gopsutil v3.20.12+incompatible // indirect
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect
github.com/qydysky/part v0.3.5-0.20201228170623-c701da7df342/go.mod h1:SxxNav0Z7DbsDLoG5uxo0wW5EKU/JBu2CAkZzZeLnX0=
github.com/qydysky/part v0.3.5-0.20210105160037-508c706d691b h1:rKR4PD/8CzT28Whf4ILQ4WZZW1S8MxJFSluYtrzu5+c=
github.com/qydysky/part v0.3.5-0.20210105160037-508c706d691b/go.mod h1:SxxNav0Z7DbsDLoG5uxo0wW5EKU/JBu2CAkZzZeLnX0=
+github.com/qydysky/part v0.3.5-0.20210106133414-a27e61b5ba4b h1:6udRQFyusCP7uMlfcUcFhg2zX2/QABOg005ayEaekhA=
+github.com/qydysky/part v0.3.5-0.20210106133414-a27e61b5ba4b/go.mod h1:SxxNav0Z7DbsDLoG5uxo0wW5EKU/JBu2CAkZzZeLnX0=
github.com/qydysky/part/msgq v0.0.0-20201213031129-ca3253dc72ad h1:Jtzf509lQrkUMGTV0Sc6IDCAiR1VrBcHrIban7hpye4=
github.com/qydysky/part/msgq v0.0.0-20201213031129-ca3253dc72ad/go.mod h1:w32TkJNVtTJd4LOS09cq+4uYG6itcN2vsqw+slp44Rg=
github.com/qydysky/part/msgq v0.0.0-20201213120821-f36e49c32bba h1:1ew9dRpc0Rux0WkWeT/4AE15ynYWmL2D7onJEJIFOB8=
package main
import (
- // "os"
- // "runtime/pprof"
+ // "net/http"
+ // _ "net/http/pprof"
q "github.com/qydysky/bili_danmu"
)
func main() {
- // f, _ := os.OpenFile("cpu.pprof", os.O_RDWR|os.O_CREATE, 0644)
- // pprof.StartCPUProfile(f)
-
+ // go func() {
+ // http.ListenAndServe("0.0.0.0:8899", nil)
+ // }()
q.Demo()
-
- // pprof.StopCPUProfile()
- // f.Close()
}
\ No newline at end of file