schneespur/vendor/sabberworm/php-css-parser/bin/quickdump.php
Michael ee3dbba6cc Initial release v1.0.0
Schneespur — Open-source winter service documentation software (PWA + Admin).
GPS tracking via OwnTracks, weather data, photo evidence, and legally
compliant service records for winter maintenance operators.

License: AGPL-3.0-or-later
2026-05-17 13:33:51 +00:00

29 lines
610 B
PHP
Executable file

#!/usr/bin/env php
<?php
declare(strict_types=1);
use Sabberworm\CSS\Parser;
use function Safe\file_get_contents;
/**
* This script is used for generating the examples in the README.
*/
require_once(__DIR__ . '/../vendor/autoload.php');
$source = file_get_contents('php://stdin');
$parser = new Parser($source);
$document = $parser->parse();
echo "\n" . '#### Input' . "\n\n```css\n";
print $source;
echo "\n```\n\n" . '#### Structure (`var_dump()`)' . "\n\n```php\n";
\var_dump($document);
echo "\n```\n\n" . '#### Output (`render()`)' . "\n\n```css\n";
print $document->render();
echo "\n```\n";