Re: [frogs] Here, froggie froggies... python update-texinfo-menus |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: frogs@xxxxxxxxxxx
- Subject: Re: [frogs] Here, froggie froggies... python update-texinfo-menus
- From: Graham Percival <graham@xxxxxxxxxxxxxxxxx>
- Date: Mon, 16 Mar 2009 23:21:07 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=XFVHG2jnxPhE6OxfoSFCsaDGPHUhNiw3c9A+l0gCsyY=; b=wIwPM4ojUAs5g5/JsbKRcJnCklilmmlhzhq2WXzpXabcpbISSM/1iH1NKqx6jZWf+M OTzRx74rxAU8TOotgiv2OdELT2a0DhxYj5+Y09a1znThC+X1aBEdHWr8roIsvBwpxpL6 fR7HSS7qyyhAt9UdyBt3CwAMR8WxSCAS7EksY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=khW+du15NfJlOWrbnqUAlSl/CmghBVl0lMTy5nHZjrpkK2afS5QnKlhAtd/yWQL0l+ Ec7dnhzkzsa9J+/xgVyfXrLt0yEnuA3KN4BPhzZAX9vdb9ISM5sRi1rrBc4AvPc4v35j kuYQGCi4tat6qWtKlM1YhX6uJ4c6MrtAzcaDI=
On Fri, Mar 13, 2009 at 02:51:22PM -0600, Carl D. Sorensen wrote:
>
> On 3/12/09 12:35 PM, "Andrew Wilson" <andrew@xxxxxxxxxxxxx> wrote:
>
> > Since I'm not currently familiar with python there will be no
> > associated boasting. There will however be a vim user installing
> > 100 megs of crap to see what the original does.
>
> You can do that, but you might be able to avoid it.
Well, it's not a bad idea to check out the existing system.
> If you look at at a texinfo file (or a .itely file), you'll see that there
> are menus, which correspond to @node{} macros and @section{} or
> @subsection{} macros in the file.
In particular, the
@node FOO
string should be placed inside a
@menu
* FOO::
@end menu
construct. If there's multiple nodes on a section level (which
should always be the case), then obviously there's more than one
thing in the menu
@menu
* FOO::
* BAR::
@end menu
> The emacs texinfo-update-all-menus macro simply goes through the file and
> puts in menus that match the @node{} calls to the sectioning commands.
>
> I don't think you need to exactly duplicate the emacs macro. I think you
> just need to (re-)create the menus.
Well, that's exactly what the emacs macro does. Other then adding
extra whitespace at the end of the "* FOO:: " lines, which
we **do not** want to duplicate. :)
Another way to look at it is this: if you delete all the
* FOO::
lines from a .itely file (but you can **keep** the
@menu
@end menu
stuff), then the python script should produce the same file that
you had before you deleted the "* FOO::" lines.
Cheers,
- Graham
---
----
Join the Frogs!