<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="Text File" newcontext="true">
<p>
Received: with ECARTIS (v1.0.0; list gopher);
 Wed, 07 Aug 2002 09:28:10 -0500 (EST)
Return-Path: &lt;jgoerzen@complete.org&gt;
Delivered-To: gopher@complete.org
Received: from christoph.complete.org (unknown [168.215.193.254])
	(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))
	(Client CN &quot;christoph.complete.org&quot;,
 Issuer &quot;John Goerzen -- Root CA&quot; (verified OK))
	by gesundheit.complete.org (Postfix) with ESMTP
	id 90E6261CF0; Wed,  7 Aug 2002 09:28:09 -0500 (EST)
Received: by christoph.complete.org (Postfix, from userid 1000)
	id 85DC4166B4; Wed,  7 Aug 2002 02:09:26 -0500 (EST)
Date: Wed, 7 Aug 2002 02:09:26 -0500
From: John Goerzen &lt;jgoerzen@complete.org&gt;
To: gopher@complete.org
Subject: [gopher] Re: PyGopherd UMN Broken
Message-ID: &lt;20020807070926.GC832@complete.org&gt;
References: &lt;3D50C2BD.4010005@myrealbox.com&gt;
Mime-Version: 1.0
Content-type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: &lt;3D50C2BD.4010005@myrealbox.com&gt;
User-Agent: Mutt/1.4i
Content-Transfer-Encoding: 8bit
X-archive-position: 661
X-ecartis-version: Ecartis v1.0.0
Sender: gopher-bounce@complete.org
Errors-to: gopher-bounce@complete.org
X-original-sender: jgoerzen@complete.org
Precedence: bulk
Reply-to: gopher@complete.org
List-help: &lt;mailto:ecartis@complete.org?Subject=help&gt;
List-unsubscribe: &lt;mailto:gopher-request@complete.org?Subject=unsubscribe&gt;
List-software: Ecartis version 1.0.0
List-ID: Gopher &lt;gopher.complete.org&gt;
X-List-ID: Gopher &lt;gopher.complete.org&gt;
List-subscribe: &lt;mailto:gopher-request@complete.org?Subject=subscribe&gt;
List-owner: &lt;mailto:jgoerzen@complete.org&gt;
List-post: &lt;mailto:gopher@complete.org&gt;
List-archive: &lt;http://www.complete.org/mailinglists/archives/&gt;
X-list: gopher
</p>
<p></p>
<p>On Wed, Aug 07, 2002 at 01:48:29AM -0500, Aaron J. Angel wrote:
&gt;
&gt; I can&#x27;t seem to get .Links working.  From what I read from the handler
&gt; in the comments, it only merges when path begins with ./ or ~/?  Does
&gt; that mean it discards everything else?  If so, why?  UMN doesn&#x27;t do
&gt; this, IIRC; the whole point of .Links is to provide external links,
&gt; otherwise it&#x27;d be fairly useful.
</p>
<p>Can you provide an example of the problem?
</p>
<p>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.
</p>
<p>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.
</p>
<p>When the Path does not begin with ./, it is assumed to be a new menu entry
and is thusly inserted as specified in .Links.
</p>
<p>I do not recall the exact semantics of ~/ at the moment; I will have to
check on that.
</p>
<p>&gt; And, if I&#x27;m reading this correctly, then what I&#x27;m reading is wrong (line
&gt; 210 of UMN.py from v1.0.0:
&gt;
&gt;  &gt; if len(line) &gt;= 7 and (line[5:7] == &#x27;./&#x27; or line[5:7] == &#x27;~/&#x27;):
</p>
<p>&gt; I don&#x27;t know too much about Python per se, but isn&#x27;t [5:7] 3 characters
&gt; long?
</p>
<p>No:
</p>
<p>&quot;asdfaewrqwrqwerwrdfasdfasfaf&quot;[5:7]
&#x27;ew&#x27;
</p>
<p>Python&#x27;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.
</p>
<p>&gt;
&gt; Also, another problem: The UMN gopherd(8) manpage specifies an available
&gt; type, -, to hide the entry from the menu for use in .cap/XX files.
</p>
<p>I had always used type X for that.  I will investigate the type -.
</p>
<p>&gt; PyGopherd doesn&#x27;t seem be able to hide files from the menu using .cap
&gt; files.  Can that functionality be added to PyGopherd&#x27;s link handler?
</p>
<p>Does it work if you use type X in the .cap files?
</p>
<p>--
John Goerzen &lt;jgoerzen@complete.org&gt;    GPG: 0x8A1D9A1F    www.complete.org
</p>
</card>
</wml>
