nodedir=/directory/containing/NodeDotPmYou change the directory after the equal sign to whatever directory contains the Node.pm file.
./umenu.pl aIf there is an existing a menu, move a*.mnu away from the UMENU's menu directory. The purpose of doing this is to verify that the a menu is created by EMDL, and not simply left over from an earlier time.
emdlinit.sh ./pumpprimer_a.shVerify that you now have an a menu, and it corresponds to the structure of the a.emdl that ships with the EMDL package. If so, the basics are working.
emdlinit.sh ./emdlrunmenu.sh aThen press C for Configuration, and U for Umenu. Then press M for "Maintain a.emdl file" and a.emdl is brought up in the gvim editor. Once you've made the necessary changes, you can go back to UMENU and press C for "Compile a.emdl file" and look for errors or warnings. If there are none, press T for "Transfer a*.mnu files", and UMENU is updated. The next time you select a choice or go back to a previous menu or go to the top level (by pressing the equal sign), UMENU reflects those updates.
emdlinit.sh mmm aOr I could modify mmm like this:
#!/bin/sh |
cat ./a.emdl | ./emdlparser.plIf the preceding runs, tells you there are no errors and no warnings, and produces a bunch of a*.mnu files in the current directory, you've proven the following:
[slitt@mydesk emdl]$ cat ./a.emdl | ./emdlparser.pl |
[slitt@mydesk emdl]$ cat ./a.emdl | ./emdlparser.pl |
[slitt@mydesk slitt]$ emdlinit.sh | env | grep EMDL |
[slitt@mydesk slitt]$ emdlinit.sh | env | grep UMENU |
[slitt@mydesk slitt]$ emdlinit.sh | env | grep NODE |
emdlinit.sh ./emdlcompile.sh ./a.emdlIf the preceding succeeds, the resulting screen looks like this:
[slitt@mydesk slitt]$ emdlinit.sh ./emdlcompile.sh ./a.emdl |
emdlinit.sh ./emdltransfer.sh aThe preceding tells it to transfer all .mnu files beginning with the letter a out of $EMDL_TEMP and into $UMENU_MENUDIR.
[slitt@mydesk emdl]$ emdlinit.sh ./emdltransfer.sh a |
[slitt@mydesk emdl]$ emdlinit.sh ./emdltransfer.sh z |
emdlinit.sh ./emdlrunmenu.sh aThe preceding runs UMENU with awareness of all the EMDL environment variables, meaning that those variables can be in the EMDL file and will be respected. This enables the menu system to be self-compiling and self editing.
emdlinit.sh ./pumpprimer_a.shThen try the emdlrunmenu.sh command again. If it still doesn't work, run UMENU manually. Switch to the UMENU program directory and run the following command:
./umenu.pl aIf the preceding works, exploit the differences between it and the emdlrunmenu.sh command. If the preceding does not work, troubleshoot UMENU.
menu choice text ::: menu title textThe menu choice text is the text that appears on the original menu. The menu title text appears as the title of the submenu.
Line type |
How
defined |
Syntax |
Allowable
parents |
Allowable
children |
Function |
Menu choice line |
A triple colon |
menu choice text ::: menu title
text |
Only other menu choice lines or no parent at all |
|
Describes a submenu to be run
upon selection of this choice. |
Parameter head |
The word "param" or "params"
alone on the line (can have leading and trailing whitespace) |
^\s*params?\s*$ |
Only command choice lines |
Only parameters |
To group all parameters |
Parameter |
A line whose parent is a
parameter head |
^\s*(.).\s*(.*) A single character followed by an irrelevant single character followed by optional space followed by the value of the parameter |
Only parameter heads |
None. Parameters cannot have
children. |
To describe a property of the
command choice line that is its grandfather. |
Command choice line |
A line that isn't a menu choice
line, a parameter head or a parameter |
No specific syntax, although a
leading carat (^) indicates "exit this menu level". |
Only menu choice lines or no
parent at all |
Only a single parameter head |
Describes a command to be run
upon selection of this choice. |
/^\s*params?\s*/iThe sole purpose of a parameter head line is to act as the parent of parameters. The reason parameters are not directly below a command choice line is because there may come a time when other types of properties might be needed to fully describe a command choice line. Also, in the future, it is possible that menu choice items might have parameters, in which case the parameter head would be needed to differentiate between parameters and subordinate choices. But that's all in the future.
my $line = /^\s*(.).\s*(.*)/;Traditionally the second character is a colon, because that's very human readable, but that's just a tradition. Here is a list of traditional keys. These keys are used in UMENU:
my $key = $1;
my $value = $2;
Key |
Meaning |
Comments |
||
L |
Keystroke that will invoke this
choice |
Programs like UMENU do not
require an L parameter, because they deduce the menu letter from the
choice text. |
||
C |
Command that will be executed
upon selection of this choice. |
If there are multiple such
command parameters, they are concatinated
with spaces in between. This facilitates things like pipes. It also
allows the EMDL file to substitute for simple scripts. So if they
should truly be separate commands, they each should end in semicolons. |
||
D |
Directory to change to before
executing this command. |
Once again, this enables
behavior which would otherwise require a simple script. |
||
P |
Directories to add to the FRONT
of the path before running the command. |
This allows easy execution of commands without adding a fully qualified filename, and also without tampering with the environment shared by all programs. | ||
E |
An environment variable to be
set before running the command. Syntax is: E: VAR=VALUE |
There can be many E lines for a
single command choice line. Once again, this the user to run complex
commands directly from the menu program, without resorting to simple
scripts to set up environment variables. |
||
S |
Stop the menu program from
repainting after completion of the command. |
This allows the user to view any messages to stdout. The user must press a key in order to repaint the menu. Without the S parameter, the menu repaints immediately upon completion of the command. | ||
B |
Run the program in the
background. |
The way this is actually accomplished is menu program specific. | ||
I |
Icon to represent this choice on
the menu. |
This is not used in UMENU, but is provided so that EMDL can be used with graphical menus. |
Program |
Syntax |
emdlparser.pl | cat emdlfile | ./emdlparser.pl |
emdlviewer.pl | cat emdlfile | ./emdlviewer.pl |
findmults.pl | cat emdlfile | ./findmults.pl |
umenu2emdl.pl |
./umenu2emdl.pl menuletter |
emdlinit.sh |
emdlinit.sh
program_to_run
arguments_for_that_program |
emdlcompile.sh | emdlinit.sh
./emdlcompile.sh emdlfile |
emdltransfer.sh | emdlinit.sh
./emdltransfer.sh menuletter (transferred .mnu files will all begin with menuletter) |
pumpprimer_a.sh | emdlinit.sh
./pumpprimer_a.sh |
emdl_pumpprimer_general.sh | emdlinit.sh
./emdl_pumpprimer_general.sh
emdlfile menuletter |
emdlrunmenu.sh | emdlinit.sh
./emdlrunmenu.sh menuletter |
emdl_umenu2emdl.sh |
emdlinit.sh
./emdl_umenu2emdl.sh menuletter |
emdlparser_test.sh | emdlinit.sh
./emdlparser_test.sh emdlfile |
nodedir=/data/tools/NodeThe preceding tells emdlparser.pl where to find Node.pm.