1
0
mirror of https://tildegit.org/sbgodin/HtmGem.git synced 2023-08-25 13:53:12 +02:00
HtmGem/tests/cli/translate_to_html.php
2021-04-05 11:46:22 +02:00

12 lines
361 B
PHP

<?php if (empty(@$_SERVER['SHELL']) or count($argv)<2) die();
$fileName = $argv[1];
require_once dirname(__FILE__)."/../../lib-htmgem.inc.php";
require_once dirname(__FILE__)."/../../lib-io.inc.php";
$text = file_get_contents($fileName);
\htmgem\io\convertToUTF8($text);
$gt_html = new \htmgem\GemtextTranslate_html($text);
echo $gt_html->translatedGemtext;