Complete.Org: Mailing Lists: Archives: gopher: August 2002:
[gopher] Re: PyGopherd UMN Broken

[gopher] Re: PyGopherd UMN Broken

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: gopher@xxxxxxxxxxxx
Subject: [gopher] Re: PyGopherd UMN Broken
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: Wed, 7 Aug 2002 02:09:26 -0500
Reply-to: gopher@xxxxxxxxxxxx

On Wed, Aug 07, 2002 at 01:48:29AM -0500, Aaron J. Angel wrote:
> I can't seem to get .Links working.  From what I read from the handler 
> in the comments, it only merges when path begins with ./ or ~/?  Does 
> that mean it discards everything else?  If so, why?  UMN doesn't do 
> this, IIRC; the whole point of .Links is to provide external links, 
> otherwise it'd be fairly useful.

Can you provide an example of the problem?

In fact, PyGopherd is emulating UMN gopherd behavior.  The thing is, UMN
gopherd does not actually treat .Links differently from .names, or any other
file beginning with a . that looks like a UMN dotfile.  They are all read
and parsed the same way.  You could name it .Frobnitz and it would still
work exactly the same.

When you have a Path that begins with ./, this means that you are applying
the lines that follow as an override for a menu entry automatically
generated for that particular file.  This is typically used in .names files
in UMN gopherd installations.

When the Path does not begin with ./, it is assumed to be a new menu entry
and is thusly inserted as specified in .Links.

I do not recall the exact semantics of ~/ at the moment; I will have to
check on that.

> And, if I'm reading this correctly, then what I'm reading is wrong (line 
> 210 of from v1.0.0:
>  > if len(line) >= 7 and (line[5:7] == './' or line[5:7] == '~/'):

> I don't know too much about Python per se, but isn't [5:7] 3 characters 
> long?



Python's range end (the 7 in this case) is not inclusive, but the range
beginning is, so that will include characters 5 and 6 only.

> Also, another problem: The UMN gopherd(8) manpage specifies an available 
> type, -, to hide the entry from the menu for use in .cap/XX files. 

I had always used type X for that.  I will investigate the type -.

> PyGopherd doesn't seem be able to hide files from the menu using .cap 
> files.  Can that functionality be added to PyGopherd's link handler?

Does it work if you use type X in the .cap files?

John Goerzen <jgoerzen@xxxxxxxxxxxx>    GPG: 0x8A1D9A1F

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