README - 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
---
README
---
1 gopher2html is an AWK script that converts a Gopher response to HTML:
2
3 % curl 'gopher://gopherproject.org/' | gopher2html
4
5 gopher2html can be used to add Gopher protocol support to w3m web browser:
6
7 % mkdir ~/.w3m/
8 % cd ~/.w3m/
9 # Use gopher2html.cgi for gopher:// URLs
10 % cat >> siteconf << EOF
11 url /^gopher:\/\//
12 substitute_url "file:///cgi-bin/gopher2html.cgi?gopher://"
13 EOF
14 # Add ~/.w3m/cgi-bin as the default `cgi-bin/' directory
15 # (further `:' separated paths are supported)
16 % echo "cgi_bin ~/.w3m/cgi-bin" >> config
17 % mkdir -p cgi-bin
18 % cat >> cgi-bin/gopher2html.cgi << EOF
19 #!/bin/sh
20
21 case "${QUERY_STRING#gopher://*/}" in
22 0*)
23 export GOPHER2HTML_TYPE="file"
24 echo Content-type: text/plain
25 ;;
26 *)
27 echo Content-type: text/html
28 ;;
29 esac
30 echo
31 curl "$QUERY_STRING" | gopher2html
32 EOF
33
34 Then please put gopher2html in a directory honored by PATH environment
35 variable or adjust ~/.w3m/cgi-bin/gopher2html.cgi accordingly.
36 After that w3m can be used also with gopher:// URLs!:
37
38 You can find part of configuration files and cgi-bin to use
39 gopher2html with w3m in the w3m/ directory.
40
41 % w3m -dump gopher://gopherproject.org
42
43 Welcome to Gopherproject.org!
44
45 You are entering the gopherspace. All visitors are welcome to come here,
46 settle down and become an inhabitant of the gopherspace too.
47
48 Here is a little introduction for you newcomers:
49 Getting started with gopher. (floodgap)
50
51 The fast links to get further in gopherspace:
52 The Gopher Lawn (categorized links)
53 [ ][SUBMIT]
54 Search using contrition (forthworks)
55
56 Common centers of gopher activity:
57 sdf.org
58 floodgap.com
59 quux.org
60 bitreich.org
61
62 Do you want to meet the community?
63 Join #gopherproject on freenode.org.
64 Discuss with us at gopher-project@other.debian.org
65
66 Do you want to settle down in gopherspace?
67 Ask the nice people at sdf.org for a gopherhole.
68 Or setup your own gopher server. Just ask the community for how to.
69
70