Pinto icon indicating copy to clipboard operation
Pinto copied to clipboard

adding rough idea of html generation from POD in pinto

Open agorman opened this issue 12 years ago • 4 comments

Love Pinto and thanks for writing it.

I'm not asking for a merge at this point but wanted to see if this was something you'd consider adding into Pinto. I'd find it really helpful to be able to generate HTML for the modules in my stacks. If it would be useful I'd be happy cleanup the code and write proper tests and POD.

Basically the command works with almost the same options as list but also takes an --output which is the directory where the HTML will be generated.

If this doesn't belong in Pinto maybe I can write something like PintoX::ProjectDocs. I'm just not sure if it's too early in development to start on plugins.

I'm available to chat on IRC. Thanks.

agorman avatar Sep 12 '13 00:09 agorman

Maybe this is a better idea: https://github.com/agorman/PintoX-Action-ProjectDocs

agorman avatar Sep 12 '13 22:09 agorman

This is fantastic! I've always wanted Pinto to have some documentation features. What do you think of this:

Instead of a separate command to generate documentation on demand, what if Pinto automatically created the documentation tree for each stack right inside the repository. To view the docs, you would just point your browser to something like /your-repository/stacks/stack-name/docs. Each time you add or pull a distribution, pinto would automatically extract and publish the documentation accordingly.

Presumably, each stack would have a separate documentation tree, so you would know the documentation is the correct version for that particular stack. The tricky part might be incrementally adding docs for new modules and updating links, etc. I don't know if Pod::ProjectDocs is well suited for that use case. But if not, there are lots of other POD tools to choose from.

Right now, Pinto doesn't have any hooks for adding functionality to existing commands. But just as a proof-of-concept, you could bolt something onto the Pinto::Schema::Result::Distribution::register() method. Once we have a better sense of what we need, then we can add a proper hook (probably using roles like Dist::Zilla does).

Does that sound like something you could do?

thaljef avatar Sep 13 '13 04:09 thaljef

FYI: I blogged about this here:

http://blog.stratopan.com/2013/09/view-documentation-for-modules-in-your-pinto-repository/

thaljef avatar Sep 30 '13 18:09 thaljef

This is awesome, thanks.

agorman avatar Sep 30 '13 23:09 agorman