home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / config_server / doc / config-editor.doc next >
Text File  |  1995-02-12  |  17KB  |  406 lines

  1. config-editor provides you with a means to edit the config-server database.
  2.  
  3. See the "legal.doc" file for copyright, disclaimer, and license.
  4.  
  5. I was going to make a GUI version of this, but the only ARexx-usable GUI
  6. systems are in commercial/demo form, buggy, difficult, and/or feature-poor.
  7. None was really suitable.  The closest was EDMI, but Henry Neufeld, the
  8. author of EDMI, moved to MS-WINDOWS I'm told.  EDMI has some slight display
  9. bugs and is also very clumsy and slow.  (I know about these problems
  10. because I use Henry's (or Rick Huebner's?) EDMI scripts for my
  11. Proteus-based BBS.)
  12.  
  13. To install:
  14.  
  15.     Make sure bin/set_con and bin/set_raw are on your command search path.
  16.  
  17.     Put config-editor.rexx somewhere you want (maybe in REXX:, or maybe in
  18.     your command search path).  You may wish to set the Script bit for
  19.     config-editor and/or remove the .rexx filename suffix to make execution
  20.     easier.  (I keep the .rexx suffix in the distribution so that you can
  21.     _see_ that it's an ARexx program, rather than having to peer at its
  22.     insides to determine that fact.)
  23.  
  24.     Make sure you have config-server set up and running.
  25.  
  26. First trial use:
  27.  
  28.     Type:
  29.  
  30.         rx bin/config-editor.rexx
  31.  
  32.     ...you should see a list of applications appear:
  33.  
  34.         ::Applications::
  35.  
  36.          config-server
  37.          Indra's-Net
  38.          IndraSMTPd
  39.          IndraSMTPc
  40.          test
  41.          ::Quit::
  42.  
  43.     ...use the up/down arrow keys to move around.  You can use the <Del>
  44.     (press the key marked `Del') or <D> (press the key marked `D') keys to
  45.     delete any of these "applications" from config-server's database.  Try
  46.     it.  Move down to, say, IndraSMTPd, and type <Del> or <D>.  You should
  47.     see the IndraSMTPd entry disappear, and your "active spot" shouldn't
  48.     move.  Yes?
  49.  
  50.     But, wait!  We didn't want to do that (not yet; you might want to do it
  51.     permamently sometime).  Well, don't worry.  We didn't _save_ the change
  52.     back to disk, we just modified the in-memory copy of the database.
  53.     Type <R> to Reload the database.  After a brief pause, the database
  54.     should be reload, the screen should clear, and the list should be
  55.     redrawn (with the IndraSMTPd restored to it's position).
  56.  
  57.     There are three other commands available at this menu:
  58.         <Q> to Quit (does the same thing as selecting the ::Quit:: entry).
  59.  
  60.         <S> to Save the database.  This saves the config-server database to
  61.         ENV: _and_ to ENVARC:.
  62.  
  63.         <Right arrow> (->) to "move into" the currently selected
  64.         Application.  (<Return> does the same thing as <Right arrow>, by
  65.         the way.)
  66.  
  67.     (Oh, I forgot to mention.  <D>, <Q>, <R>, and <S>, are NOT
  68.      case-sensitive; you can type them as upper or lower-case.
  69.  
  70.  
  71.     Okay, let's move on.  Move the cursor to the "config-server"
  72.     Application entry and then press <Return> or <Right arrow>.  You should
  73.     see this list appear:
  74.  
  75.         ::Tags for config-server::
  76.          COMMENT
  77.          ::Quit::
  78.  
  79.     This is a list of items that are defined for config-server.
  80.     Config-server doesn't have any configuration entries save a (set of)
  81.     COMMENT line(s).  Later, you may explore the other entries for other
  82.     applications, but we'll stick with config-server, for now.
  83.  
  84.     A note about the ::Quit:: entries:
  85.         All menus have ::Quit::.  This is NOT a program-quit, but rather a
  86.         quit-from-this-menu.  (I may make both options available at some
  87.         point, but currently you must back out through the menus.)  All
  88.         ::Quit:: menu items act as if you typed the <Q> key.  It only Quits
  89.         the program when you are at the top-level menu.
  90.  
  91.     A note about the arrow keys:
  92.         I tried to emulate the UNIX `lynx' program's use of the arrow keys
  93.         (and of <Return>).  This means that <Left arrow> means "back out a
  94.         level" at all menus, save the outer-most level (where you can't
  95.         back out any further).
  96.  
  97.         (To be more like `lynx', I may have `Q' always quit the program...)
  98.  
  99.     Last note:
  100.         Delete works at this level, too.  You could delete all COMMENT
  101.         entries for an application at this level by selecting the COMMENT
  102.         entry and typing <Del> or <D>.  DON'T DO IT.  Not yet, at least.
  103.         (^&  We have some other stuff to do first, and if you deleted
  104.         something at this level, you would have to return to the top level
  105.         to Reload.
  106.  
  107.     Commands available:
  108.  
  109.         <Up arrow>/<Down arrow>
  110.             Select a tag-type.
  111.  
  112.         <D>/<Del>
  113.             Delete the current tag-type for this application's config.
  114.  
  115.         <Left arrow>/<Q>
  116.             Move out of this application's config.
  117.  
  118.         <Right arrow>
  119.             Move into the "details" of the current tag-type for this
  120.             application's config.
  121.  
  122.  
  123.  
  124.     Okay, there's not much to do here.  Move the cursor to the COMMENT
  125.     line, and use <Return> or <Right arrow> to go into it.  There may be a
  126.     significant delay, now.  (There is a delay of almost a second, on my
  127.     25mHz 68030.)  The delay is caused because there are quite a few
  128.     COMMENT entries.  When the delay is over, you should see:
  129.  
  130.         ::Tag subs for config-server:COMMENT::
  131.  
  132.          TEXT: Foo, this is a comment: <=- !
  133.          TEXT:
  134.          TEXT: Config-server is a capable program for almost
  135.          TEXT: any application to use.  It provides the app-
  136.          TEXT: application with flexible options in
  137.          TEXT: configuration processing.  Simple applications
  138.          TEXT: can just do this:
  139.          TEXT:
  140.          TEXT:     OPTIONS RESULTS
  141.          TEXT:     ADDRESS 'config-server'
  142.          TEXT:     'getattr val' APP':'TAG_FOR_VAR
  143.          TEXT:     PARSE RESULT 'TEXT:'VAR_TO_USE
  144.          TEXT:
  145.          TEXT: config-server is part of the Indra's Net project
  146.          TEXT: that I'm working on.  However, the name is
  147.          TEXT: deliberately not suggestive of this fact.  The
  148.          TEXT: reason for this is that config-server has
  149.          TEXT: applicability outside of Indra's Net, and so
  150.          TEXT: it is styled more along the lines of a general
  151.          TEXT: Amiga system tool.
  152.  
  153.     ...hm.
  154.  
  155.     The "TEXT:" prefix on each line is the "encoding" for that line.  All
  156.     of these lines shown are encoded as "TEXT" type lines.  There are other
  157.     types available, but for now we won't worry about them.  (See some of
  158.     the other entries for some of the other applications -- and read
  159.     config-server's documentation.)
  160.  
  161.     Okay.  Move the cursor to the second line (the first "blank" line).
  162.     Yes, the one under "Foo, this is a comment: <=- !".
  163.  
  164.     Now, type the <I> key.  You should see:
  165.  
  166.         ::New application:encoding:tag:value::
  167.  
  168.         Data:
  169.             app: config-server
  170.             enc: TEXT
  171.             tag: COMMENT
  172.             num: ---
  173.             val:
  174.  
  175.         App:
  176.  
  177.     ...the cursor should be stopped after the "App: " line at the bottom.
  178.     Hit <Return> and the "app:config-server" line should be printed in
  179.     inverted colors, and the "App: " prompt at the bottom should become
  180.     "Enc: ".  Hit <Return> again for Enc: and Tag:, fields, and you should
  181.     see each converted, above, into inverse video.  Finally, hit <Return>
  182.     on the "Val: " prompt.  There will be another delay, then the screen
  183.     should refresh with all of those "TEXT: ...." comment lines.
  184.  
  185.     (Note: Ignore the `num: ---' line for now.  It will eventually be used,
  186.      but not just yet.  It "can't" be used due to a current limitation of
  187.      config-server.  Fixing it isn't impossible, but it isn't a priority,
  188.      either.)
  189.  
  190.     If you are observant, you will notice a new line at the bottom, though.
  191.     A blank line.  Curious!
  192.  
  193.     Okay, let's try this.  Move the cursor up to the top line (the one that
  194.     starts "Foo, ..." and type <I> again.  You should see:
  195.  
  196.         ::New application:encoding:tag:value::
  197.  
  198.         Data:
  199.             app: config-server
  200.             enc: TEXT
  201.             tag: COMMENT
  202.             num: ---
  203.             val:  Foo, this is a comment: <=- !
  204.  
  205.         App:
  206.  
  207.     Hit <Return> four times, again, and you should see each of the App:,
  208.     Enc:, Tag, and Val: prompts/highlights just as before -- and then
  209.     return to the "menu" for comments.
  210.  
  211.     If you look at the bottom, you will see that the top-most "Foo, ..."
  212.     line has been replicated to the bottom.
  213.  
  214.     (NOTE: At this point, if you are using a bordered Shell window on a
  215.      non-interlaced, non-overscanned, NTSC display, with a standard-height
  216.      font, you may have scrolling problems.  Sorry; I use interlaced all of
  217.      the time, and probably won't address scrolling issues until I get more
  218.      than about 50 entries for a single tag.  (^&  Fortunately, COMMENTS
  219.      are the only fields likely to exceed more than a couple of entries,
  220.      and for reading COMMENTS, you can just as well load the
  221.      config-server.config file into any text editor and read it that way.
  222.      So, don't worry too much.
  223.  
  224.      If you DO have scrolling problems, delete a couple of lines in the
  225.      middle, or something.)
  226.  
  227.     Well, that's all very interesting, huh?  But what if we want to enter a
  228.     new config entry?  Simple.  After pressing <I>, each of those prompts
  229.     (App:, Enc:, Tag:, and Val:) represents a point where you can enter
  230.     your own text!  The meanings of the lines are best explained by the
  231.     config-server documentation...but in brief:
  232.  
  233.         App:
  234.             Application name.  By default, the current application is used.
  235.  
  236.         Enc:
  237.             Encoding type.  By default, the encoding type of the currently
  238.             selected tag-sub is used.  The default is "TEXT", if you are on
  239.             the ::Quit:: when you type the <I> (which is unavoidable if
  240.             you've deleted all of the tag-sub's).
  241.  
  242.         Tag:
  243.             The type of config-entry you are creating.  Default will be the
  244.             same type you are looking at when you type the <I>.
  245.  
  246.         Val:
  247.             The value for the new config-entry.  Default will be the same
  248.             value as the type you are looking at when you type the <I>, or
  249.             a blank if you are on the ::Quit::.
  250.  
  251.     In case you hadn't guessed: The app:, enc:, tag:, num: (ignored for
  252.     now), and val: fields above the input-prompt are initially filled in
  253.     with the current defaults, and as you enter each piece, the piece is
  254.     overwritten on top of the prior entry.
  255.  
  256.     Okay, let's create a new config-server:COMMENT entry:
  257.  
  258.     Type <I>, and you get the familiar "entry form" menu.
  259.  
  260.     App:
  261.         Since we want to make a new config-server entry, and since we are
  262.         making our new entry from a point under the config-server's
  263.         application entry, our default is "config-server".  We can just hit
  264.         <Return>, as before.
  265.  
  266.     Enc:
  267.         We can make it something other than TEXT, but I suggest for now
  268.         (and probably comment's should _always_ be TEXT...).  I'll make
  269.         mine a TEXT entry, which in this case is the default, so I'll hit
  270.         <Return> again.
  271.  
  272.     Tag:
  273.         We said we wanted a config-server:COMMENT entry, so we'll once
  274.         again hit <Return> and accept the default (isn't that neat?
  275.         *grin*).
  276.  
  277.     Val:
  278.         Here you can write anything you want.  Due to lack of deep
  279.         intelligence on config-editor's part, I _suggest_ you keep the new
  280.         line short enough to fit on your screen, with the Encoding prefix.
  281.  
  282.         Mine will be:
  283.  
  284.             This is a new comment.
  285.  
  286.     My new line, when I'm returned to the tag-sub menu, looks like this:
  287.  
  288.         TEXT:This is a new comment.
  289.  
  290.     ...you may notice that it doesn't have that stylish space after the
  291.     "TEXT:" and before the "real text" of the entry.  This is perfectly
  292.     okay.  The COMMENT entries that I prepared for you have the space
  293.     because I put the space in there -- to make the comments more readable.
  294.     However, config-editor and config-server don't need the extra space, so
  295.     if you don't add one, it won't matter.
  296.  
  297.     GENERALLY, I would not advise adding spaces for non-COMMENT fields.
  298.     COMMENT's are ignored by applications, so their content and format
  299.     isn't important to anyone but humans.  On the other hand, non-COMMENT
  300.     fields are read and interpreted by applications.  Because of this,
  301.     spaces may be significant in non-COMMENT fields (whether they are
  302.     depends on the encoding type of the field, as well; TEXT fields have
  303.     their spaces preserved for the application to deal with; FILE type
  304.     encodings with spaces will mean that the file searched for must have
  305.     the same spacing in its filename).
  306.  
  307.  
  308.     Okay, maybe now you want to delete the three COMMENT's we've added to
  309.     the config-server database.  Move down to the first line we inserted
  310.     (the last "blank" line, if you've followed the above instructions
  311.     correctly).  Now, hit the <Del> (or <D>) key 3 times.  Each of the
  312.     three new lines we added should disappear (with pauses as config-editor
  313.     regenerates it's list from the database after each deletion).  Poof, we
  314.     should be back to where we started.  (Alternatively, we could just go
  315.     to the top-level menu and type <R> to Reload.)
  316.  
  317.  
  318.     The commands available at this menu level:
  319.  
  320.         <Up arrow>/<Down arrow>
  321.             Select a tag-sub to work with.
  322.  
  323.         <Right arrow>/<Return>
  324.             Go into an option (doesn't work with anything but the ::Quit::
  325.             option; you can't "go into" a tag-sub).
  326.  
  327.         <Left arrow>/<Q>
  328.             Go back out a menu level.
  329.  
  330.         <Del>/<D>
  331.             Delete the current tag-sub.
  332.  
  333.         <I>
  334.             Insert a new tag-sub (actually _appends_ at the moment;
  335.             insertion will be supported in time).
  336.  
  337.  
  338.     Play around.  Read the other COMMENT fields for the other application
  339.     entries.  Try creating whole new tag-types and/or application entries.
  340.     Delete some of the ones you create.  If you've read all of the COMMENT
  341.     fields, you may wish to delete them, and/or most/all of the other
  342.     application entries. This will speed loading/reloading/saving.
  343.  
  344.         NOTE: Keep at least one tag-sub for at least one tag for at least
  345.         one app.  (See Bugs for related info.)  I.e., don't delete
  346.         EVERYTHING.
  347.  
  348.  
  349. Ideas (feedback appreciated):
  350.     One interesting concept is that of an "umbrella" pseudo-application.
  351.     Not a real application, but one that a suite of related applicatoins
  352.     can turn to to get common configuration info.  E.g., my Indra's Net
  353.     programs will probably all look at an Indra's Net or Indra's-Net type
  354.     of entry for "broad" configuration info, then look to more
  355.     application-specific info to override/supplement the general info.
  356.  
  357.     Another important concept is that there can be multiple occurances
  358.     (tag-subs) of each tag.  In some cases, such as a SIGNATURE tag for a
  359.     message system, you will probably only want ONE entry (the last entry);
  360.     for other cases (e.g., a list of name-servers to consult) you might be
  361.     interested in all of them being used.  In some cases you might care
  362.     whether, say, an "umbrella application" entry is compounded with, or
  363.     overridden by, a more specific application's entry, for a given
  364.     application.  These questions of how to deal with multiplicity are
  365.     probably best answered on an application-by-application, tag-by-tag
  366.     basis.  Users should be aware of this concept, and programmers should
  367.     give it thought.
  368.  
  369.     Perhaps some convention for "continuation" entries should be given, so
  370.     that the _user_ can mark certain tag-subs as being intended for
  371.     compounding with other tag-subs.
  372.  
  373.     Some standard tags, with standard interpretations are probably a good
  374.     idea.  E.g., a LOG field that behaves in generally the same way for all
  375.     aplications.
  376.  
  377.     (These thoughts really belong in the config-server.doc file...(^&)
  378.  
  379.  
  380. Bugs:
  381.  
  382.  ** Insert (adding a field) always inserts at end.  (This is only a problem
  383.     with the config-server, and should eventually be fixed.)
  384.  
  385.  ** Reloading/saving is only supported at the outermost menu-level;
  386.     inserting only at the innermost.
  387.  
  388.     You CAN, however, delete individual 'tag-subs', whole groups of
  389.     like-named tags in a single app, or whole applications from
  390.     config-server. Just use the <Del> or <D> key (your choice) at the
  391.     appropriate level.
  392.  
  393.  ** No on-screen reminders of what keys are valid (or for what actions).
  394.  
  395.  ** Insertion can only be done at the tag-sub level.  If you have no
  396.     applications, with tags, you can't get to the tag-sub level, so you
  397.     can't create new entries if you have carelessly wiped out the old ones.
  398.     (This is fixable by Reloading (if you haven't Saved your deletions),
  399.     reverting to the original env/config-server.config file and inserting
  400.     from there, or by manually writing the config-server.config file with a
  401.     text editor.)
  402.  
  403.  ** Scrolling due to too-many-entries, and wrapping due to
  404.     too-long-entries, is not addressed by config-editor.  It should be.
  405.  
  406.