zanson/sm-parser
最新稳定版本:v1.2
Composer 安装命令:
composer require zanson/sm-parser
包简介
a model and parser for stepmania files (.sm)
README 文档
README
Conveting SM to SSC and back
$sm = new Zanson\SMParser\FileParser\SM();
$sm->parse(dirname(__DIR__).'/test.sm');
$convert = new \Zanson\SMParser\Model\Convert();
$ssc = $convert->SMtoSSC($sm->song);
$ssc = new Zanson\SMParser\FileParser\SSC();
$ssc->parse(dirname(__DIR__).'/test.sm');
$convert = new \Zanson\SMParser\Model\Convert();
$sm = $convert->SSCtoSM($ssc->song);
Exporting
Exports simply take the object in the parser and return a string to be passed to a file or output of your choosing.
If you are not using the file parser class and just have a model, you must instantiate the parser class, and set the song using setsong($object) then run export.
$ssc = new Zanson\SMParser\FileParser\SSC();
$ssc->parse(file_get_contents(dirname(__DIR__) . '/test.ssc'));
file_put_contents($ssc->getFileName(), $ssc->export());
$ssc = new Zanson\SMParser\Model\SSC();
$parse = new Zanson\SMParser\FileParser\SSC();
$parse->setSong($ssc);
file_put_contents($parse->getFileName(), $parse->export());
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-23