Add `<< EOF' to the various cat to make them a bit more readable - 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 de173f5d913b0f22ed83b59b9c93bf6941c2cf83
DIR parent 28ca53c92618c6faf543b3e4d9af8cd0d7c7d8cd
HTML Author: Leonardo Taccari <iamleot@gmail.com>
Date: Mon, 15 Jan 2018 09:11:02
Add `<< EOF' to the various cat to make them a bit more readable
Diffstat:
README | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff -r 28ca53c92618 -r de173f5d913b README
--- a/README Sun Jan 14 23:08:53 2018 +0100
+++ b/README Mon Jan 15 09:11:02 2018 +0100
@@ -7,20 +7,22 @@
% mkdir ~/.w3m/
% cd ~/.w3m/
# Use gopher2html.cgi for gopher:// URLs
- % cat >> siteconf
+ % 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
+ % cat >> cgi-bin/gopher2html.cgi << EOF
#!/bin/sh
echo Content-type: text/html
echo
curl "$QUERY_STRING" |
gopher2html
+ EOF
After that w3m can be used also with gopher:// URLs!: