<br><br><div class="gmail_quote">2009/9/4 Charles Lepple <span dir="ltr">&lt;<a href="mailto:clepple@gmail.com">clepple@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Thu, Sep 3, 2009 at 12:37 PM, Arnaud Quette&lt;<a href="mailto:aquette.dev@gmail.com">aquette.dev@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; 2009/9/2 Charles Lepple &lt;<a href="mailto:clepple@gmail.com">clepple@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; With the AsciiDoc conversion underway, I am wondering if we should<br>
&gt;&gt; keep the AsciiDoc for the driver man pages in a specially-formatted<br>
&gt;&gt; comment in the driver (taking a cue from the comments specifying USB<br>
&gt;&gt; information).<br>
&gt;&gt;<br>
&gt;&gt; I have been doing something similar with the tripplite_usb driver for<br>
&gt;&gt; a while - it contains Perl-style POD (Plain Old Documentation) in a C<br>
&gt;&gt; comment, and the man page can be mechanically generated from that.<br>
&gt;&gt;<br>
&gt;&gt; This way, the documentation is closer to the actual driver source<br>
&gt;&gt; code, and if someone changes a driver, they only need to send a single<br>
&gt;&gt; patch.<br>
&gt;<br>
&gt; well, I have a mixed feeling about that.<br>
&gt; IMO, having the doc and the code is a good thing.<br>
&gt; but in practice, looking at tripplite_usb shows that the header is kinda<br>
&gt; bloated.<br>
<br>
</div>Bear in mind that much of each driver man page is boilerplate text, so<br>
that could be reduced a bit with AsciiDoc macros. I also included<br>
snippets of the protocol left over from the serial tripplite driver,<br>
which contributes to the comment bloat.<br></blockquote><div><br>well, there might also be some consolidation with information from upsdrv_info and the vartable (can be obtained through driver &quot;-help&quot; call).<br>
<br>don&#39;t know if that can be considered though.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
&gt; moreover, it doesn&#39;t guarantee that the one who patch the code will remember<br>
&gt; to modify the inline doc (vs modifying an external one like the manpage).<br>
&gt; finally, having a single patch for 1 or 2 files doesn&#39;t make much<br>
&gt; difference.<br>
&gt;<br>
&gt;&gt; We probably don&#39;t need to do this for the client/server binaries like<br>
&gt;&gt; upsc and upsmon, but it&#39;s a possibility.<br>
&gt;&gt;<br>
&gt;&gt; Thoughts?<br>
&gt;<br>
&gt; while I clearly see the advantage of moving manpages to AsciiDoc (allow to<br>
&gt; generate html... output), I still don&#39;t much see the one of embedding it<br>
&gt; with the code.<br>
&gt;<br>
&gt; perhaps you, as the one who has practiced it, can shed my light.<br>
&gt; I&#39;d also like to hear from Arjen.<br>
<br>
</div>Well, it was just a thought. My primary motivation with the<br>
tripplite_usb man page was to not have to write in NROFF directly, and<br>
the fact that POD has well-defined start and end markers was a happy<br>
coincidence. We would have to reinvent a little of that for the<br>
AsciiDoc stuff.<br></blockquote></div><br>as said above, part of the extraction process, we may want to consolidate info using some calls to the drivers to obtain authors, params, ...<br clear="all"><br>a perl or python scrip in tools can do the job.<br>
can you propose the foundation (how to include the text in the driver so that it can be extracted, consolidation with the existing data, ...) and possibly an example with skel?<br><br>cheers,<br>Arnaud<br>-- <br>Linux / Unix Expert R&amp;D - Eaton - <a href="http://www.eaton.com/mgeops">http://www.eaton.com/mgeops</a><br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/">http://www.networkupstools.org/</a><br>Debian Developer - <a href="http://www.debian.org">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.free.fr/">http://arnaud.quette.free.fr/</a><br>
<br>