Update cgi-bin/gopher2html.cgi in order to pass GOPHER2HTML_TYPE - gopher2html - AWK script that converts a Gopher response to HTML
(HTM) hg clone https://bitbucket.org/iamleot/gopher2html
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) changeset b81228b3c914f84c29a0f52bf0f8e972d974938e
(DIR) parent 7c9f4b178fb0b53d982afd6f0adcf86501fa6c3e
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Mon, 15 Jan 2018 21:34:35
Update cgi-bin/gopher2html.cgi in order to pass GOPHER2HTML_TYPE
Diffstat:
README | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff -r 7c9f4b178fb0 -r b81228b3c914 README
--- a/README Mon Jan 15 21:31:42 2018 +0100
+++ b/README Mon Jan 15 21:34:35 2018 +0100
@@ -18,10 +18,17 @@
% cat >> cgi-bin/gopher2html.cgi << EOF
#!/bin/sh
- echo Content-type: text/html
+ case "$QUERY_STRING" in
+ */0/*)
+ export GOPHER2HTML_TYPE="file"
+ echo Content-type: text/text
+ ;;
+ *)
+ echo Content-type: text/html
+ ;;
+ esac
echo
- curl "$QUERY_STRING" |
- gopher2html
+ curl "$QUERY_STRING" | gopher2html
EOF
After that w3m can be used also with gopher:// URLs!: