Complete.Org: Mailing Lists: Archives: gopher: August 2003:
[gopher] Re: pygopherd & ASK
Home

[gopher] Re: pygopherd & ASK

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: gopher@xxxxxxxxxxxx
Subject: [gopher] Re: pygopherd & ASK
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: Thu, 28 Aug 2003 14:21:03 -0500
Reply-to: gopher@xxxxxxxxxxxx

On Thu, Aug 28, 2003 at 09:44:43PM +0300, Alexey Vyskubov wrote:
> I'm sorry if I'm asking a stupid questions, but I was not able to find an
> answer myself.

No, they're all good questions.

> 1. I wonder if it is possible to use ASK with pygopherd. If it is possible
> can someone give me an example of creating menu item with ASK and using
> entered information afterwards?

Incidentally, does anyone know of any gopher site currently using ASK
blocks?

While we're at it, Alexey, if you want ASK block support in PyGopherd, I
think I could finish it up without too much trouble.  Be aware, however,
that it will *only* work with Gopher+ clients, of which there are only 1.

That brings up the whole Gopher+ issue, which we have visited occasionally
before on this list.  The standard was never really finalized and has some
gaping holes, but does some useful things like using actual MIME types
instead of single-character identifiers.

I, at one time, proposed Enhanced Gopher, for which the entire
implementation in PyGopherd looks like this:

class EnhancedGopherProtocol(rfc1436.GopherProtocol):
    def renderobjinfo(self, entry):
        return entry.gettype() + \
               entry.getname() + "\t" + \
               entry.getselector() + "\t" + \
               entry.gethost(default = self.server.server_name) + "\t" + \
               str(entry.getport(default = self.server.server_port)) + "\t" + \
               str(entry.getsize()) + "\t" + \
               entry.getmimetype() + "\t" + \
               entry.getencoding() + "\t" + \
               entry.getlanguage()

That is, you take the RFC1436 standard gopher and tack on new fields at the
end for the file size, its MIME type, encoding, and language.  Should be
easy enough to parse and ignore as the case may be.

This is not enabled by default in PyGopherd.  If there is any interest,
perhaps we could look into it some more.

-- John


[Prev in Thread] Current Thread [Next in Thread]