Add configuration files and cgi-bin needed by w3m - gopher2html - AWK script that converts a Gopher response to HTML
HTML hg clone https://bitbucket.org/iamleot/gopher2html
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR changeset 33d076516fd56458543a4af4f7dfe0657fa95167
DIR parent b81228b3c914f84c29a0f52bf0f8e972d974938e
HTML Author: Leonardo Taccari <iamleot@gmail.com>
Date: Tue, 16 Jan 2018 08:54:12
Add configuration files and cgi-bin needed by w3m
Add a w3m directory that contains w3m configuration files to ease the
configuration of gopher2html with the w3m web browser.
Add a reference to that in README.
Diffstat:
README | 3 +++
w3m/cgi-bin/gopher2html.cgi | 13 +++++++++++++
w3m/config | 1 +
w3m/siteconf | 2 ++
4 files changed, 19 insertions(+), 0 deletions(-)
---
diff -r b81228b3c914 -r 33d076516fd5 README
--- a/README Mon Jan 15 21:34:35 2018 +0100
+++ b/README Tue Jan 16 08:54:12 2018 +0100
@@ -33,6 +33,9 @@
After that w3m can be used also with gopher:// URLs!:
+You can find part of configuration files and cgi-bin to use
+gopher2html with w3m in the w3m/ directory.
+
% w3m -dump gopher://gopherproject.org
Welcome to Gopherproject.org!
diff -r b81228b3c914 -r 33d076516fd5 w3m/cgi-bin/gopher2html.cgi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/w3m/cgi-bin/gopher2html.cgi Tue Jan 16 08:54:12 2018 +0100
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+case "$QUERY_STRING" in
+*/0/*)
+ export GOPHER2HTML_TYPE="file"
+ echo Content-type: text/plain
+ ;;
+*)
+ echo Content-type: text/html
+ ;;
+esac
+echo
+curl "$QUERY_STRING" | gopher2html
diff -r b81228b3c914 -r 33d076516fd5 w3m/config
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/w3m/config Tue Jan 16 08:54:12 2018 +0100
@@ -0,0 +1,1 @@
+cgi_bin ~/.w3m/cgi-bin
diff -r b81228b3c914 -r 33d076516fd5 w3m/siteconf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/w3m/siteconf Tue Jan 16 08:54:12 2018 +0100
@@ -0,0 +1,2 @@
+url /^gopher:\/\//
+substitute_url "file:///cgi-bin/gopher2html.cgi?gopher://"