views:

182

answers:

2

Hi everyone,

I am trying to document my small project through sphinx which im recently trying to get familiar with. I read some tutorials and sphinx documentation but couldn't make it. Setup and configurations are ok! just have problems in using sphinx in a technical way.

My table of content should look like this

--- Overview

    .....Contents

----Configuration

       ....Contents

---- System Requirements

      .....Contents

 ---- How to use 

      .....Contents

 ---- Modules 

      ..... Index

      ......Display


 ----Help

      ......Content

Moreover my focus is on Modules with docstrings. Details of Modules are

Directory:- c:/wamp/www/project/

            ----- Index.py

                      >> Class HtmlTemplate:

                               .... def header():

                               .... def body():

                               .... def form():

                               .... def header():

                               .... __init_main: ##inline function

           ----- display.py

                      >> Class MainDisplay:

                               .... def execute():

                               .... def display():

                               .... def tree():

                               .... __init_main: ##inline function

My Documentation Directory:- c:/users/abc/Desktop/Documentation/doc/

                           --- _build

                           --- _static

                           --- _templates

                           --- conf.py

                           --- index.rst

I have added Modules directory to the system environment and edited index.rst with following codes just to test Table of content. But i couldn't extract docstring directly

Index.rst>>>>>>>


T-Alignment Documentation
************************* 

.. _overview:

Overview
--------

.. _System Requirement:

System Requirement
------------------

1. System

2. Applications

3. Server

.. _Configuration::

Configuration
-------------

Basic steps in configuration involves in following categories

1. Environment variables

2. Apache setting

.. _Modules::

Modules
-------

How can i continue from here...

Moreover, i am just a beginner to sphinx documentation tool

I need your suggestions to brings my modules docstring to my documentation page

Thanks

+2  A: 

To use your module's docstrings you have to use the autodoc extension. Use the "extension" variable in your conf.py to enable it.

Florian Diesch
+1  A: 

Florian is exactly right; the "autodoc extension", whose link he provides, is what you are looking for. If you need more of an introduction to Sphinx, you might find the tutorial I gave at PyCon 2010 helpful — though you will doubtless also find it very long. :-)

http://pycon.blip.tv/file/3359587/

Brandon Craig Rhodes