Skip to content

Schippi/py-bsor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BS Open Replay Python parser

Beat Saber Open Replay format parser written in Python

Usage

pip install py-bsor

example - read bsor file and print some info:

from bsor.Bsor import make_bsor
from bsor.Scoring import calc_stats
import os
import io

if __name__ == '__main__':
    filename = 'D:/something/easy.bsor'
    print('File name :    ', os.path.basename(filename))
    with open(filename, 'rb') as f:
        m = make_bsor(f)
        print(f'BSOR Version: {m.file_version}')
        print(f'BSOR notes: {len(m.notes)}')
        print(m.info)
        stats = calc_stats(m)
        print(stats)
        
        
        #change player and write to file
        m.info.playerId = '76561198026425351'
        m.info.playerName = 'Schippi'
        with open('D:/_TMP/easy.testx', 'wb') as fo:
            m.write(fo)

build:

git tag x 
git push origin --tags
py build
py -m twine upload --repository pypi .\dist\*x*

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages