Tue, 12 May 2009 23:27:17 +0200, Tim Michelsen wrote:

>>> I would like to use autosummary to create a list of script files and
>>> then use the generated stub files to show their top docstrings. But if
>>> my script also contains functions, it will create a stub file like:
>> [clip]
>> 
>> I think some revamping is needed so that it could be done the same way
>> that you override HTML templates in Sphinx. I'll look into this.
> Thanks for your effort!
> 
> I would suggest:
[clip]
> 
>   or alternatively:
> 
> .. autosummary::
>     :toctree: DIRNAME
>     :stubtemplate: ../_static/mytemplate
> 
>     sphinx.environment.BuildEnvironment
>     sphinx.util.relative_uri

I chose this route: the templating system now works so that you can add 
files such as 'autosummary/class.rst' in a subdir of your templates_path 
to override the class stub template globally. Also, you can use 
a :template: option in the directive to select another template.

Please try it out: http://bitbucket.org/pv/sphinx-work/
See docs for details:
http://bitbucket.org/pv/sphinx-work/src/tip/doc/ext/autosummary.rst

If it seems OK, I'll ask if Georg wants to pull it.

-- 
Pauli Virtanen


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to