simfile.sm
Simfile & chart classes for SM files.
Module Contents
Classes
SM implementation of |
|
SM implementation of |
|
SM implementation of |
- class simfile.sm.SMChart
Bases:
simfile.base.BaseChartSM implementation of
BaseChart.Unlike
SSCChart, SM chart metadata is stored as a fixed list of 6 properties, so this class prohibits adding or deleting keys from its backing OrderedDict.- extradata: List[str] | None
If the chart data contains more than 6 components, the extra components will be stored in this attribute.
- classmethod blank() SMChart
Generate a blank, valid chart populated with standard keys.
This should approximately match blank charts produced by the StepMania editor.
- classmethod from_str(string: str) SMChart
Parse the serialized MSD value components of a NOTES property.
The string should contain six colon-separated components, corresponding to each of the base known properties documented in
BaseChart. Any additional components will be stored inextradata.Raises
ValueErrorif the string contains fewer than six components.Deprecated since version 2.1: This is now a less efficient version of
from_msd(), which interoperates better withmsdparserversion 2.0.
- classmethod from_msd(values: Sequence[str]) SMChart
Parse the MSD value components of a NOTES property.
The list should contain six strings, corresponding to each of the base known properties documented in
BaseChart. Any additional components will be stored inextradata.Raises
ValueErrorif the list contains fewer than six components.
- serialize(file)
Write the object to provided text file object as MSD.
- abstract update(*args, **kwargs) None
Raises NotImplementedError.
- abstract pop(property, default=None)
Raises NotImplementedError.
- abstract popitem(last=True)
Raises NotImplementedError.
- class simfile.sm.SMCharts(data=None)
Bases:
simfile.base.BaseCharts[SMChart]SM implementation of
BaseCharts.List elements are
SMChartinstances.
- class simfile.sm.SMSimfile(*, file: TextIO | Iterator[str] | None = None, string: str | None = None, strict: bool = True)
Bases:
simfile.base.BaseSimfileSM implementation of
BaseSimfile.- stops
Specialized property for STOPS that supports FREEZES as an alias.