2021-03-24 09:53:12 +00:00
|
|
|
<?php if (empty(@$_SERVER['SHELL']) or count($argv)<2) die();
|
|
|
|
|
|
|
|
$fileName = $argv[1];
|
|
|
|
|
2021-04-02 19:00:09 +00:00
|
|
|
require_once dirname(__FILE__)."/../../lib-htmgem.inc.php";
|
2021-04-04 19:16:01 +00:00
|
|
|
require_once dirname(__FILE__)."/../../lib-io.inc.php";
|
2021-03-24 09:53:12 +00:00
|
|
|
|
|
|
|
$text = file_get_contents($fileName);
|
2021-04-04 19:16:01 +00:00
|
|
|
\htmgem\io\convertToUTF8($text);
|
2021-03-25 18:08:57 +00:00
|
|
|
$gt_gemtext = new \htmgem\GemtextTranslate_gemtext($text);
|
2021-03-24 09:53:12 +00:00
|
|
|
echo strval($gt_gemtext);
|