[gopher] Re: Bucktooth questions
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On 6/30/07, brian@xxxxxxxxxxxxx <brian@xxxxxxxxxxxxx> wrote:
> While we're on the topic: Does anyone know of a html->gopher
> converter? Something that basically converts HTML tags that can be
> converted to RFC 1436-compliant syntax (i.e., prepending the correct
> itemtype for links, files, images, etc.), and strips out the rest.
I recently set up a Gopher server of my own, and this is one of the
things I've thought of adding to it. A WWW proxy for Gopher seems to
have been discussed as far back as GopherCon '92
<http://iubio.bio.indiana.edu/soft/util/gopher/gophercon1.txt>, but I
don't think anyone's ever implemented it.
That said, it shouldn't be too hard to pull off. First, snag a copy of
Lynx <http://lynx.isc.org/> if you don't already have it. Now you can
use Lynx with the -dump flag to give you a plain text rendering of a
page, plus a list of hyperlinks. Also, you can get the MIME type of a
resource by using -head along with -dump. From here, you can deduce
the proper item type for a link.
Here's a couple examples of Lynx's dump mode:
$ lynx -dump -width=3D67 http://example.net/
You have reached this web page by typing "example.com",
"example.net", or "example.org" into your web browser.
These domain names are reserved for use in documentation
and are not available for registration. See [1]RFC 2606,
Section 3.
References
1. http://www.rfc-editor.org/rfc/rfc2606.txt
$ lynx -dump -head http://www.rfc-editor.org/rfc/rfc2606.txt
HTTP/1.1 200 OK
Server: Netscape-Enterprise/3.6 SP3
Date: Sat, 30 Jun 2007 16:11:32 GMT
Content-type: text/plain
Last-modified: Mon, 07 Jun 1999 22:24:19 GMT
Content-length: 8008
Accept-ranges: bytes
Connection: close
Hope this helps,
Jonathan
--=20
"Do not meddle in the affairs of dragons, for you are crunchy and
taste good with ketchup." =97 Unknown
- [gopher] Bucktooth questions, brian, 2007/06/30
- [gopher] Re: Bucktooth questions, Cameron Kaiser, 2007/06/30
- [gopher] Re: Bucktooth questions, brian, 2007/06/30
- [gopher] Re: Bucktooth questions, Cameron Kaiser, 2007/06/30
- [gopher] Re: Bucktooth questions, brian, 2007/06/30
- [gopher] Re: Bucktooth questions, Cameron Kaiser, 2007/06/30
- [gopher] Re: Bucktooth questions, brian, 2007/06/30
- [gopher] Re: Bucktooth questions, Cameron Kaiser, 2007/06/30
[gopher] Re: Bucktooth questions, brian, 2007/06/30
|
|