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 puppet-dev+unsubscr...@googlegroups.com
<mailto:puppet-dev+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/26e8c57e-f6c5-49ea-ad8c-7ece042b8ffd%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-dev/26e8c57e-f6c5-49ea-ad8c-7ece042b8ffd%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
--
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 puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/me9jjv%24ruc%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.