From 7f19c7e9636e0407eac30ccedafc4f3dcb6f453f Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Mon, 8 Mar 2021 10:45:51 +0100 Subject: [PATCH] WIP --- TODO | 11 +++-------- htmgem.php | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/TODO b/TODO index 59dda3b..9f1a952 100644 --- a/TODO +++ b/TODO @@ -1,25 +1,20 @@ * manage url encoding: The filename fetched on disk may differ from that was asked by URL. * check /etc/passwd not accessible: Perform sanity checks against unauthorized access. * manage 404: Display better errors. -* alt texts on pre and quote? +* HTML: alt texts on pre and quote +* HTML: On links indicate whether it's on Gemini or Www or image. * a way to get the source of a page, using urlrewriting * options to activate the text decoration * HTML caching: Nginx tries the html, if not found use this script to build it -* any error on one read line logs and goes to the next line, resetting modes * configuration: Fetch configuration in current dir, tries parents. * css: file location or in-place or in config? -* Use first h1 as the HTML page title on get in config? -* On links indicate whether it's on Gemini or Www or image. * Command line API for script and testing. -* Manage anchors * Page menu on upper and lower sides: [parent dir] [root dir] [inline images] [raw response] [view cert] -* Check unicode capability +* Check unicode capability, UTF16 input, etc… * Manage different type of carriage return: CR CR/LF LF * Do not output an empty line for the last carriage return of the document * Test on a shared hosting -* Be able to navigate (custom the links) when using htmgen.php?url=… * Text localisation -* Search all cases where a narrow no-break space would apply * Manage logging (cache refresh, debug) * Split the main loop in two: one part to decode the text to internal language, the other to make the HTML * Something to build gmi files and connect it afterwards to generate HTML : Abstract --> gemtext --> HTML. This would allow to make services output on both Gemini and HTML. diff --git a/htmgem.php b/htmgem.php index eb213f6..cd4a612 100644 --- a/htmgem.php +++ b/htmgem.php @@ -90,7 +90,7 @@ foreach ($fileLines as $line) { $mode_textAttributes_temp = false; while (true) { if ($reDoCount>2) { - error_log("Too many loops, mode == '$mode'"); + error_log("HtmGem: Too many loops, mode == '$mode'"); $mode = null; $reDoCount = 0; break;