Thanks for the answer Henrik. That is kind of what it looked to me.

I think if I have to go this way, i'll probably make a gem for this, since 
that would be easier to plug into modulesync than a Puppet module actually.


On Tuesday, March 17, 2015 at 5:09:57 PM UTC+1, henrik lindberg wrote:
>
> On 2015-17-03 12:04, Raphaël Pinson wrote: 
> > Hello! 
> > 
> > 
> > I'd like to generate the README.md of my Puppet modules from modulesync, 
> > by getting the docs from the classes themselves. 
> > 
> > I've considered using puppet-strings, but I don't really see how I could 
> > retrieve markdown from it. 
> > 
> > Is there a way I could get markdown from the inline docs in 
> > classes/defines using Ruby, so I can include them in my README? 
> > 
> > 
> Afaik, there is no feature available that extracts the documentation 
> from source and produces markdown. 
>
> The puppet-strings does this internally to extract the documentation 
> comments from the source. It then feeds this into yard to produce 
> interactive html pages. 
>
> If you want to implement your own tool, you could base it of the 
> extraction that is done by puppet-strings. It is actually not that 
> difficult to write a ruby snippet that parses a .pp file (with the 
> future parser) and extracts documentation. 
>
> I can imagine accepting a PR with a command that extracts text from 
> source. 
>
> Note that puppet-strings requires that the source can be parsed 
> with the future parser. 
>
> Regards 
> - henrik 
>
> > 
> > Thanks, 
> > 
> > Raphaël 
> > 
> > -- 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/b08eed47-17b5-4615-bd34-8ab027249608%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to