On Nov 11, 2010, at 9:26 PM, James Turnbull wrote:
>> On Sat, Oct 30, 2010 at 9:32 PM, Carl Caum <[email protected]>
>> wrote:
>>> What's the best way to add a new mode for the puppet doc output? I
>>> would like to automatically generate our Confluence documentation
>>> from our puppet code. I played with just taking the reStructured
>>> text and converting it to something Confluence would understand,
>>> but that's not exactly the "right" way to do it. Instead, I would
>>> just like to add a mode and format it myself, but I can't figure
>>> out any way to do that. Keep in mind I'm still very new to Ruby.
>>> Thanks in advance.
>
> Carl
>
> I missed this one - are you looking to add an output mode to Puppetdoc?
> What output are looking to add?
Yes, I was looking at adding an output mode. Digging in to the code I see that
reStructured text format is deeply embedded except for the rdoc mode which
Brice points out in a later email. So how I started getting this to work is
make my own tool that adds a to_confluence method in Puppet::Util::Reference
and then I overwrite some methods in Puppet::Util::Docs (scrub, doctable, etc).
That way I can have Confluence style wiki syntax instead of ReST. After I
have that done, I can get the sections I want and call to_confluence. For
example:
section = Puppet::Util::Reference.reference('type')
puppetdoc = section.send('to_confluence', true)
I'm building this against 2.6.0. Brice, you mentioned that 2.6 now uses
markdown instead of ReST. I'm not seeing where this is the case in the code.
Would you suggest implementing something using that instead of the approach I'm
taking? If so, is there any documentation that could help me?
>
> James
>
> --
> Puppet Labs - http://www.puppetlabs.com
> C: 503-734-8571
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.