@Timmie > Here are my improvement suggestions:
> * specify any input path => currently works only with > generate_modules.py . Oups! I didn't test other scenarios. I should fix this. > * specify a different output path for the generated files Good idea. Like I said in my post, I think this script really need an optparse addition to easily add all this kind of configuration flags. @Roman > Correct me if I wrong, but this is "one time" script - I can run it > only once. If I modify the generated files, the script will not > preserve the changes. Right now, before creating each ReST file, the script check if the ReST file already exist and in such case doesn't recreate it. This way, if you modify some of the generated files, you can keep them untoutch when you re-run the script. If you want to regenerate some files you need to delete them before running the script again (I was thinking of adding a --force flag to force the regenerating of all files without deleting them before.). I choose this way because it was really simple to implement and to use. I know it's not powerful enough for all the scenarios but it's better then nothing. > May be the better solution is to add :autopackage: directive, which > has the following properrties/attributes: > * "understand" __init__.py file role > * :maxdepth: > * support merge of hand-written documentation and the one extracted > from code ( > http://sphinx.pocoo.org/ext/autodoc.html?highlight=autodoc#module-sph), > * include/exclude glob patterns > May be Sphinx should introduce :pkg: directive, which allows to refer > to the whole package. > What do you think? When I wrote this script I thought of this kind of solution. Finally I chose the other one because, for me, it was more inline with the spirit of Sphinx where good documentation should be at least partially hand written and not all autogenerated. I have to said that it was also easier to do! Also, if my comprehension of directive is right, it will not be easy to add file creation in the execution of a directive and, especially, add the parsing of theses autocreated files by Sphinx/ docutils, but I can be wrong. I didn't put too much time in this solution. But I can probably add some of your suggestions to my script. - Maxdepth it's a good idea. And we can think of different ways to deal with sublevels. - Support merge of hand-written documentation and the one extracted, that will be the killer feature! - Include/exclude glob patterns: already done because it's a script and the shell already deal with this. Unfortunately, I will not have time to work on this in the following months. I'm at the end of the first phase of the main project, so in a rush, and I will have twins pretty soon! So anyone who want to work on it is welcome. Etienne --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" 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/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
