Thomas Keller <[email protected]> writes: > Am 23.07.10 10:42, schrieb Stephen Leake:
>> This would be easier if the manpage code was merged into this branch. >> And that may have to be tweaked for this anyway, so we should wait to >> land this until after the manpage branch lands. > > Actually this would not help much, because the code in this branch > specifically outputs man format, not texinfo which we'd actually need. I meant it would be nice to have the man page available while doing this work, because it's easier to search in a man page than in the current output. Moot point now, since I've done it. > If we however have several use cases for structured help output, like > generating a man page dynamically from it, including it in the texinfo > manual and maybe even use it for the zsh / bash completion scripts in > a generic way, then maybe a general "dump command tree" command would > indeed be more suitable. But what format should that use? XML? JSON? > YAML? basicio? All these formats have their pros and cons, XML being > the most versatile esp. when XSLT is used, but neither format is easy > to process in shell scripts. I would not try to pick a "universal" output format. For texinfo fragment output, I'd just write more C++ code, hopefully reusing much of your man page generation code. Using C++ container operations to walk the command/option tree, dispatching to an output function at each node, makes the most sense. Note that the texinfo fragments go in separate files; I doubt other applications will want separate files. But I suppose there will be people that want to write new code in Python instead of C++, and they could use XML output. > I'm open for suggestions. Depending on the amount of work this would > introduce I tend to put this task after 0.99/1.0 though. Definitely. -- -- Stephe _______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
