HtmGem/tests/cli/parse_gemtext.php

10 lines
273 B
PHP
Raw Normal View History

2021-03-24 09:53:12 +00:00
<?php if (empty(@$_SERVER['SHELL']) or count($argv)<2) die();
$fileName = $argv[1];
require_once dirname(__FILE__)."/../lib-htmgem.inc.php";
2021-03-24 09:53:12 +00:00
$text = file_get_contents($fileName);
$parsedGemtext = \htmgem\gemtextParser($text);
print_r(iterator_to_array($parsedGemtext));