Re: [frogs] Here, froggie froggies... python update-texinfo-menus

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


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!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/