                          remake-menus v1.6 (6 Feb 1998)
          Dan Potter  -- bard@mail.utexas.edu -- http://bard.home.ml.org

Copyright 1997-98 Dan Potter. No restrictions are placed on this code,
as long as the copyright notice is preserved, and you have fun using it ;)

Remember, however, that this code is released "as-is" and there is no
warranty of any kind implied. So if it breaks something.. don't blame me =).
However, you should feel free to send questions/comments/etc.

This program is a Python script which will take a directory tree kind of like
Windoze's s*art menu and create a menu file for WindowMaker. More 
specifications on how this works are included below..

Yes, this is also a hacked up version of the KanjiHack README. Saves time and
now I can say that it has a consistent interface =)


LATEST VERSION
~~~~~~~~~~~~~~
You should look to my homepage for the newest version. You'll find it under
the 'programming projects' section. Please don't add my email address to
any marketing lists.. ;)

Please, please feel free to email and tell me if you like this. Also, if
you have installation problems, email. Please be sure to check all the 
documentation first, though, and don't overlook a silly error =).

I have also written KanjiHack, which is a small patch to WindowMaker (or
for that matter, almost any X program, if you install it right) that lets
it display EUC Kanji/Kana without any extra support in the program. That
can be found on my web page too, or on ftp.windowmaker.org.


INSTALLATION
~~~~~~~~~~~~
Some of this info is also in the source file, but there is more here that 
happens before you actually get to editing any source. You should follow these
steps to install it:

1. Figure out where your WindowMaker 'menu' file is. This is generally 
   ~/GNUstep/Library/WindowMaker. Copy the two files, remake-menus and 
   extdefs.py, into that directory. If this is not the right path on your
   system, you'll need to edit 'remake-menus' and change the 'root path'
   setting at the bottom.

2. Create a menu-tree hierchy for your menus. I guess it would be nice of
   me to make an "unpacking" routine as well, that will extract your current
   menu file into a tree. Well, unfortunately I haven't done it yet.. so right
   now you're on your own. You can find more docs on the menu-tree format
   below.

3. Now running remake-menus will send your new menu file to stdout. So do
   with that as you will (if you're feeling frisky, maybe you can make it
   go to an OPEN_MENU command or something =).


I would recommend making a menu option that remakes them for you. So, you
just say 'Remake Menus' on your current ones and within a few seconds you've
already got a new root menu (thanks to the cool dynamic menus in WM!).


MENU TREE FORMAT
~~~~~~~~~~~~~~~~
Basically, instead of putting a line in your menu file with a direcive before
it, you put whatever would be on the line in a file called <option>.<directive>.
So, if you wanted this:

"My Favorite App" EXEC ~/CoolProgram &

You would make a file called "My Favorite App.EXEC" in your menu-tree 
somewhere, and put this in it:

~/CoolProgram &

As a holdover from the AfterStep/FVWM days (not sure if this is really
neccessary any more), most of mine say:

exec ~/CoolProgram &

This applies to all the different commands you can use, except for MENU. 
To use submenus, you simple create a directory called 'Blagh.MENU', and
put more stuff in it. If you don't put anything in it, you'll get a blank
menu (as would be expected). 

Extension associations are done using the extdefs.py file. Currently, you
can use two tokens in extension definitions that will get replaced using
the regsub module in Python. These are: 

 {choice} -- represents the name of the menu option
 {file}   -- represents the filename of the actual file (not the symbolic link!)

Extension associations are currently limited to being used with EXEC, though
I can't see a reason why you couldn't use them with other things since it's
just a string getting dumped into the output from the extdefs.py file. You
could, for example, make a 'sub-menu' extension in theory. But I haven't
played with it enough to know =).

I'm sorry the documentation is kind of sketchy. I'll include a sample menu
tree. This is actually part of the menu tree I use, trimmed to remove all
the EUC text =), and trimmed some more for security's sake..


THANKS
~~~~~~
- Thanks to all the people who are working so hard on cool X software. That
  includes the WindowMaker guys.
- Guido van Rossum and gang for writing Python.
- Lao Tzu for, well.. you know.. =)


Good luck!
