- Notifications
You must be signed in to change notification settings - Fork7
A modern simfile parsing & editing library for Python 3
License
garcia/simfile
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A modern simfile parsing & editing library for Python 3.
Full documentation can be found onRead the Docs.
- Supports both SM and SSC files
- Timing data support
- Beat ↔︎ song time conversion
- Handles BPM changes, stops, delays and warps
- Accepts "split timing" from SSC charts
- Note streams from charts
- Fully typed, documented, and tested API
simfile is available on PyPI:
pip3 install simfile
Load simfiles from disk usingsimfile.open
orsimfile.load
:
>>>importsimfile>>>springtime=simfile.open('testdata/Springtime/Springtime.ssc')>>>springtime<SSCSimfile:Springtime>>>>withopen('testdata/nekonabe/nekonabe.sm','r')asinfile:...nekonabe=simfile.load(infile)...>>>nekonabe<SMSimfile:猫鍋>
Use lowercase attributes to access most common properties:
>>>springtime.artist'Kommisar'>>>springtime.banner'springbn.png'>>>springtime.subtitle='(edited)'>>>springtime<SSCSimfile:Springtime (edited)>
Alternatively, use uppercase strings to access the underlying dictionary:
>>>springtime['ARTIST']'Kommisar'>>>springtime['ARTIST']isspringtime.artistTrue>>>list(springtime.keys())[:7]['VERSION','TITLE','SUBTITLE','ARTIST','TITLETRANSLIT','SUBTITLETRANSLIT','ARTISTTRANSLIT']
Charts are stored in a list under the.charts
attribute and function similarly to simfile objects:
>>>len(springtime.charts)9>>>chart=springtime.charts[0]>>>chart<SSCChart:dance-singleChallenge12>>>>list(chart.keys())[:7]['CHARTNAME','STEPSTYPE','DESCRIPTION','CHARTSTYLE','DIFFICULTY','METER','RADARVALUES']
simfile uses Pipenv for dependency management. Activate the environment:
pipenv shell
To run the unit tests:
py -m unittest
To build the documentation:
docs/make html
About
A modern simfile parsing & editing library for Python 3
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.