承接 satisfactory-tools/docs-parser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

satisfactory-tools/docs-parser

Composer 安装命令:

composer require satisfactory-tools/docs-parser

包简介

Parser for Satisfactory documentation files.

README 文档

README

This package can parse exported files from Satisfactory to generate info about recipes, items, schematics, etc.

Running the parser

You need to either have Docker installed, or PHP 8.5+.

For docker, you can use the prebuilt image from GitHub Container Registry:

docker run --rm -v "$PWD:/data" ghcr.io/satisfactorytools/docs-parser [command]

Or build the container yourself once, and then just run it:

docker build -t docs-parser .
docker run --rm -v "$PWD:/data" docs-parser [command]

Note that the container only sees files under the mounted /data directory, so pass input/output paths through it, e.g.:

docker run --rm -v "$PWD:/data" docs-parser parse /data/Docs.json -o /data -f wiki

If you want to use it locally, install dependencies first (requires Composer installed), then run it through PHP:

composer install
php bin/docsParser [command]

Commands

If you run the app without any arguments, it'll show you a list of commands.

You can use help [command] to get info about supported parameters.

Examples

Parse data, export to wiki format, and omit ficsmas data:

php bin/docsParser parse /path/to/docs.json -o /path/to/output/dir -f wiki --no-ficsmas

Using in PHP

If you want to use the parser in your own PHP project, you can add it via composer

composer require satisfactory-tools/docs-parser

Example usage:

use SFTools\Data\Parser\DocsParser;

$parser = new DocsParser;
$schema = $parser->parse(file_get_contents(__DIR__ . '/docs.json')); // $schema is SFTools\Data\Schema\DocsSchema

// You can also export the schema in any format you like
use SFTools\Data\Export\WikiExporter;

$exporter = new WikiExporter;
$output = $exporter->export($schema);

// $output is an array of [file prefix => file content]; the prefix may be an empty string for single-file formats

Custom parsing

You can implement SFTools\Data\Export\Exporter interface to define your own format to export. You can also implement SFTools\Data\Transformers\Transformer to add more transformers (they can "fix" wrong datapoints or transform data to different values).

To run a transformer, you can do something like this:

$transformer = new MyTransformer;
$schema->transform($transformer);

You can also specify a list of handlers/transformers to use in the DocsParser constructor:

$parser = new DocsParser([new MyHandler], [new MyTransformer]);

This will skip the default handlers and use only the ones you specified. Passing null instead of an array will use the default handlers/transformers.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固