Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPDOC import #7

Open
romaninsh opened this issue Mar 31, 2017 · 6 comments
Open

PHPDOC import #7

romaninsh opened this issue Mar 31, 2017 · 6 comments

Comments

@romaninsh
Copy link
Contributor

romaninsh commented Mar 31, 2017

This is a feature request that would automatically import PHPDOC from library sources to avoid duplication between .rst and .php files.

  • specify where source files are located.
  • sources parsed during build
  • comments are automatically imported.

Example source:

/**
 * Collection of cool methods
 */
class CoolClass {
}

rst:

.. php:class:CoolClass::

Use CoolClass 3 times a day

Result:

class CoolClass

Collection of cool methods

Use CoolClass 3 times a day

@markstory
Copy link
Owner

Sounds cool. I don't really have time to build something like that right now so any help is appreciated.

@romaninsh
Copy link
Contributor Author

romaninsh commented Mar 31, 2017

I would do it, but my python skills would leave me strangled. 🐍

I found this library extremely useful: https://github.com/avalanche123/doxphp. Is it possible to execute that from sphinx or at least consume JSON output provided?

@romaninsh
Copy link
Contributor Author

@markstory do you think this enhancement is viable at all? I can try looking for some help.

@markstory
Copy link
Owner

The python documentation tools, have autodoc. This sounds like it would be similar to that, so it is viable, but also a non-trivial amount of work.

@ericholscher
Copy link

We have done some prior art here: https://github.com/rtfd/sphinx-autoapi/ -- that is basically a standard framework for building language-specific doc tool importers for Sphinx/RST. It is definitely beta status, but might be a good place to steal ideas from.

Another bit of prior art is here: https://github.com/erikrose/sphinx-js/

There's also a good article on PHP here: https://www.sitepoint.com/using-sphinx-for-php-project-documentation/ -- but I don't believe it covers the source -> rst transform.

@linawolf
Copy link

We are also currently developing this feature within our TYPO3 screenshot and code documentation tool.

TYPO3-Documentation/t3docs-screenshots#234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants