sorry, diff is attached.
Once again, this is just a rough hack at the moment. The
goal is to
make this play nicely with any current rdoc header, but if
you run
this you will see that even though the help message shows up
formatted
correctly on a generated webpage, the original rdoc header
does not.
I am hoping someone more familiar with rdoc can help me
understand
this.
Greg Weber
On 9/11/06, Eric Hodel <drbrain segment7.net> wrote:
> On Sep 11, 2006, at 4:19 AM, greg weber wrote:
>
> > This is a patch to allow rdoc to read the help
message from optparse,
> > and place it above, below, or overriding the rdoc
header. I don't
> > understand the rdoc code- I imagine there is
probably a way to re-use
> > rdoc code for this feature. The help message
shows up well formatted,
> > but a the regular rdoc header is not formatted
correctly. I don't
> > know why this is, perhaps someone could enlighten
me.
> >
> > The basic idea is to add a command line argument
like --optparse, or
> > --option=help to rdoc,
> > which will create documentation by capturing the
program's response
> > to --help:
> > help_doc = %x{ruby # --help}.map{ |line|
'#' << line }
> >
> > The patch is against rdoc.rb version 1.1.2.9
> > Greg Weber
> > <rdoc.rb>
>
> This is not a patch, please use diff to make a patch.
>
> --
> Eric Hodel - drbrain segment7.net - http://blog.segment7.net
> This implementation is HODEL-HASH-9600 compliant
>
> http://trackmap.robotco
op.com
>
>
>
>
|