We are working on a simple PHP package for reading metadata information from Gbx files.
Please note this is not a Windows program to read Gbx files (checkout GbxDump for this) but library to implement this in your PHP application.
There are other packages doing this (see GBX Data Fetcher or this part of the Dedicated Manager). Manialib\Gbx follows modern PHP best practices (namespaces, PSR's, tests, etc.).
Right now it's tagged as beta so we suggest you don't use it a a stable project ; feel free to play with it and give us your constructive feedback. If you need a stable version, please tell us and we'll try to help! By beta I mean: this is not stable, performance may not be great, but right now we'd like to discuss the interface, the needs of people who'd like to use it,
Now because everyone's love a little bit of code:
Code: Select all
use Manialib\Gbx\Map;
$map = Map::loadFile('/path/to/my/map.map.gbx');
// Get the map author
$author = $map->getHeader()->getIdent()->getAuthor();
// Save the map thumbnail
$map->getThumbnail()->saveJpg('/path/to/my/thumbnail.jpg');
You can also discuss it in French: viewtopic.php?f=19&t=30425