I believe that if the docs is maintained as org-mode files, that can be done easily...
Alexandre On Tuesday, March 13, 2012, Craig Earls <[email protected]> wrote: > One of the TODO items in bugzilla is for John to teach me how to do this. He tried once but I am pretty thick. That is a goal though... > > On Tue, Mar 13, 2012 at 17:55, Zack Williams <[email protected]> wrote: >> >> On Tue, Mar 13, 2012 at 3:05 PM, Craig Earls <[email protected]> wrote: >> > I can't emphasize enough how much help I need with the documentation. If >> > there is a feature you use which is NOT in the latest version of the docsy >> > (or poorly explained) I need to know. Many of you use features of ledger I >> > have not explored. A real description would be wonderful, but a simple note >> > that "XXX isn't in there" or "XXX is wrong" would be very helpful. Use the >> > list, bugzilla, or email me directly. I would love to get the documentation >> > ready in the next month. >> >> Could the example code in the docs be testable against ledger? This >> would be a bit of trouble to get going, but could pay dividends in the >> long run - if a test were to fail it would either be a bug in ledger, >> or a functionality change that would require a change in the docs. >> >> This could be done as follows: >> >> 1. Tests would be added inline to the @smallexample sections in the >> .texi file, in the format of the other tests (which includes example >> code and the expected results, as far as I can tell) >> >> 2. A preprocessing step would pass over the docs, pulling individual >> code examples into files named with their start-end line numbers, then >> running the test process over them. (iterate over the entire file, >> pull the contents of all @smallexample blocks into individual files if >> they contain at least one line that starts with "test") >> >> 3. A different preprocessing step would pull the test specific code >> out of the docs before conversion to the other formats, so it wouldn't >> be seen in the docs. (get rid of all lines in @smallexample between >> lines that start with "test" and "end test") >> >> - Zack > > > > -- > Craig, Corona De Tucson, AZ > enderw88.wordpress.com > -- Alexandre Rademaker Professor at FGV/EMAp Tel.: +55 21 3799-5551 http://arademaker.github.com/
