https://github.com/cutereimu/threp
解析东方Project的replay文件的Go语言版本
https://github.com/cutereimu/threp
golang touhou touhou-danmakufu touhou-project touhou-replays
Last synced: 6 months ago
JSON representation
解析东方Project的replay文件的Go语言版本
- Host: GitHub
- URL: https://github.com/cutereimu/threp
- Owner: CuteReimu
- License: other
- Created: 2022-01-04T18:21:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-09-10T06:33:55.000Z (9 months ago)
- Last Synced: 2025-09-10T09:56:15.122Z (9 months ago)
- Topics: golang, touhou, touhou-danmakufu, touhou-project, touhou-replays
- Language: Go
- Homepage:
- Size: 161 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# threp

[](https://github.com/CuteReimu/threp/actions/workflows/go.yml "代码分析")
[](https://github.com/CuteReimu/threp/graphs/contributors "贡献者")
[](https://github.com/CuteReimu/threp/blob/master/LICENSE.LGPLv3 "许可协议")
[](https://github.com/CuteReimu/threp/blob/master/LICENSE "许可协议")
解析东方Project的replay文件的Go语言版本
这个仓库是在score.royalflare.net即将关站前夕,为纪念它而写的。现将该网站上开源的python解析replay文件的代码转化为Go语言版本。
## 安装方法
```bash
go get github.com/CuteReimu/threp
```
## 使用方法
```go
package main
import (
"fmt"
"github.com/CuteReimu/threp"
"os"
)
func main() {
f, _ := os.Open(`th12_ud0001.rpy`)
defer f.Close()
result, _ := threp.DecodeNewReplay(f)
fmt.Println(result.String())
}
```
## 函数说明
- `DecodeTh6Replay`、`DecodeTh7Replay`、`DecodeTh8Replay`分别用来解析th6、th7、th8三作的rpy文件。
- `DecodeNewReplay`用来解析th95及以后各作的rpy文件
- `DecodeReplay`用来解析任意一作的rpy文件,返回`RepInfo`接口
## 进度
- [x] 东方红魔乡
- [x] 东方妖妖梦
- [x] 东方永夜抄
- [x] 东方文花帖
- [x] 东方风神录
- [x] 东方地灵殿
- [x] 东方星莲船
- [x] 东方文花帖DS
- [x] 妖精大战争
- [x] 东方神灵庙
- [x] 东方辉针城
- [x] 东方绀珠传
- [x] 东方天空璋
- [x] 秘封噩梦日记
- [x] 东方鬼形兽
- [x] 东方虹龙洞
- [x] 黄昏酒场