A SUS (Sliding Universal Score) parser and generator.
- Parse sus into tick-based objects.
- Allow json output.
import sus
print(sus.loads("#00002: 4\n#BPM01: 120\n#00008: 01"))
import sus
with open("score.sus", "r") as f:
score = sus.load(f)
print(score)
import sus
from sus import Score
with open("score.sus", "r") as fi, open("score.json", "w") as fo:
score = sus.load(fi)
json = score.to_json(indent=4)
fo.write(json)
print(Score.from_json(json))
import sus
with open("score.sus", 'r') as fi, open(sus_file.with_suffix('.dumped.sus'), 'w') as fd:
score = sus.load(fi)
print(sus.dumps(score))
sus.dump(score, fd, comment='Custom comment.', space=False)
- Acknowledgement
- Add example I/O
- Contribution Guide
- High Speed
- etc.
MIT © 2021 mkpoli