[gopher] Re: pygopherd & ASK
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
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:
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" + \
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.