Use 4 spaces for command/source code - 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 0087d448d1dc80f42453b11736525310a8849827
(DIR) parent fa99caa40eaed7d664a604e51cdbc534386c04ff
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Wed, 19 Sep 2018 17:42:07
Use 4 spaces for command/source code
Diffstat:
README | 52 ++++++++++++++++++++++++++--------------------------
1 files changed, 26 insertions(+), 26 deletions(-)
---
diff -r fa99caa40eae -r 0087d448d1dc README
--- a/README Wed Sep 19 17:39:24 2018 +0200
+++ b/README Wed Sep 19 17:42:07 2018 +0200
@@ -4,32 +4,32 @@
gopher2html can be used to add Gopher protocol support to w3m web browser:
- % mkdir ~/.w3m/
- % cd ~/.w3m/
- # Use gopher2html.cgi for gopher:// URLs
- % cat >> siteconf << EOF
- url /^gopher:\/\//
- substitute_url "file:///cgi-bin/gopher2html.cgi?gopher://"
- EOF
- # Add ~/.w3m/cgi-bin as the default `cgi-bin/' directory
- # (further `:' separated paths are supported)
- % echo "cgi_bin ~/.w3m/cgi-bin" >> config
- % mkdir -p cgi-bin
- % cat >> cgi-bin/gopher2html.cgi << EOF
- #!/bin/sh
-
- case "${QUERY_STRING#gopher://*/}" in
- 0*)
- export GOPHER2HTML_TYPE="file"
- echo Content-type: text/plain
- ;;
- *)
- echo Content-type: text/html
- ;;
- esac
- echo
- curl "$QUERY_STRING" | gopher2html
- EOF
+ % mkdir ~/.w3m/
+ % cd ~/.w3m/
+ # Use gopher2html.cgi for gopher:// URLs
+ % cat >> siteconf << EOF
+ url /^gopher:\/\//
+ substitute_url "file:///cgi-bin/gopher2html.cgi?gopher://"
+ EOF
+ # Add ~/.w3m/cgi-bin as the default `cgi-bin/' directory
+ # (further `:' separated paths are supported)
+ % echo "cgi_bin ~/.w3m/cgi-bin" >> config
+ % mkdir -p cgi-bin
+ % cat >> cgi-bin/gopher2html.cgi << EOF
+ #!/bin/sh
+
+ case "${QUERY_STRING#gopher://*/}" in
+ 0*)
+ export GOPHER2HTML_TYPE="file"
+ echo Content-type: text/plain
+ ;;
+ *)
+ echo Content-type: text/html
+ ;;
+ esac
+ echo
+ curl "$QUERY_STRING" | gopher2html
+ EOF
Then please put gopher2html in a directory honored by PATH environment
variable or adjust ~/.w3m/cgi-bin/gopher2html.cgi accordingly.