icemad/ptcgl-decklist-parser
最新稳定版本:1.1.0
Composer 安装命令:
composer require icemad/ptcgl-decklist-parser
包简介
Library to parse decklist from Pokemon TCG Live
README 文档
README
A parser for Pokemon TCG Live decklist
Features
- Decklist Parsing: Convert PTCGL decklist string into structured data for analysis or transformation.
- Decklist Formatting: Convert back structured data to decklist string.
Installation
To include this parser in your project, you can install it via Composer:
composer require icemad/ptcgl-decklist-parser
Usage
Parsing
$parser = new DecklistParser([ new CardLineParser(), new CategoryLineParser(), ]); $result = $parser->parse($deckList) // string containing decklist
The output is an instance of Icemad\PtcglDecklistParser\Model\ParsingResult.
It the parsing is successful, ParsingResult::getParsingFailures should return an empty array.
Formatting
$string = new DecklistFormatter()->format($result->getParsedLines());
统计信息
- 总下载量: 78
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-11