On Dec 22, 2011, at 01:19 PM, Tom Browder <[email protected]> wrote:

1. How will the registration be done? Where will the master command
lists be maintained? Right now I know the mged list is in
src/mged/setup.c as was pointed out in recent e-mail. And is there
any more info on plan for the change? I don't see much in TODO. I
will fill in the bb help in the existing system but would like to
follow up the same for the new system.

Initial evolution is to make each command self-contained, then have a libged init function where there will be a list of all commands.  
This is a similar approach to how primitives are defined in src/librt/primitives/table.c or how framebuffers are defined in src/libfb/fb_generic.c (but not as messy).  The next step may be to auto-register a minimal core set of "built-in" commands and then dynamically load the rest on demand but one step at a time. 

Later: I have filled in info for bb and will check it in, but I see
the need for expanded help somewhere (I remember this complaint from
years ago), i.e., an '-h' or '--help' option for all commands. What
is the plan for NOT duplicating help info? I remember some discussion
about it versus man versus docbook but is it time for a working model
on the trunk?

The 'zoom' command in src/libged/zoom/zoom.c is where I've started an example for a new command layout  It's a work in progress and with a crucial piece missing for how command options get described.  That's what I'm working on now with the recent libbu efforts.  Expecting another month of libbu changes along with rtedge rework before I'll be back on that aspect of libged though.

The basic idea is a simple command argument API that describes short/long options and has option parsing going through an API call.  From that same option structure, the "usage" string can be autogenerated consistently in whatever format desired (including help displayed during run-time or into docbook during compilation).  From that docbook snippet and any supplementary docbook documentation, we can generate the various outputs we need (pdf/html for web, man for *nix, etc). 

Later: I now see that 'make_bb' is essentially the same as 'bb' but
using only one common argument. Are they candidates for aliasing,
say, make_bb to bb?

It's a candidate for future removal.  The doc/deprecation.txt file says make_bb command was deprecated in 7.16 so it can be removed in 7.22 or later. 

2. Another question ref a TODO project: There is a list of missing
man pages. Would generating an almost blank template for each be
helpful? I mean so there would at least be a place holder to be
expanded by a volunteer. The result would be something like:
 
I don't think it'd be particularly useful unless someone at least filled in a basic description.  There is already a Docbook template for adding new commands so it'd be trivial to stub one in for all missing commands, but without the description, it's wouldn't be much of a time saver or use to users.

Best regards, and Merry Christmas,
 
Likewise!
Sean

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to