1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-18 13:32:19 -05:00
Simba/Doc/sphinx/docdoc.rst

97 lines
3.0 KiB
ReStructuredText
Raw Normal View History

2011-07-19 07:47:24 -04:00
.. _docdoc:
Documentation Documentation
===========================
2011-07-19 07:47:24 -04:00
This page is the documentation for the documentation.
It is very important to know this by heart when you are writing documentation
for Simba.
Documentation system
--------------------
The documentation system we use is sphinx. The link to sphinx can
2010-06-13 07:11:24 -04:00
be found at the bottom of the page.
.. note::
It is important to note that there is also a database SQL fulltext engine
called Sphinx, but this is not the project we use. We use the Sphinx
2010-06-13 07:11:24 -04:00
"documentation system" ( http://sphinx.pocoo.org/ )
Building the documentation
--------------------------
2011-07-19 07:47:24 -04:00
2010-06-13 07:11:24 -04:00
In the future, the online documentation will be refreshed every hour. However,
if you want to build the documentation yourself, you should install
2011-07-19 07:47:24 -04:00
``python-sphinx``.
2011-07-19 07:47:24 -04:00
Move to the ``Simba/doc/sphinx`` directory and run ``make all``.
This will place an HTML version of the documentation in ``_build/html``.
.. note::
The build instructions are for Linux only. If you want to build the doc on
2010-06-12 19:50:51 -04:00
Windows, you are on your own. The sphinx resource site is probably a good
place to start.
Writing documentation
---------------------
Sphinx uses the reStructuredText markup language. It is not a hard language, but
looking through the quickstart is a good idea:
http://docutils.sourceforge.net/docs/user/rst/quickstart.html
As stated above, the markup language is not the hard part about writing
documentation; the hard part is simply coming up with good content suited for
the documentation. Be sure to check :ref:`todo`
Directory structure
~~~~~~~~~~~~~~~~~~~
So you have written a new piece of documentation? Great!
Now we just need to know where to place it. If you have simply extended a file,
then there should be no worries as to where to place your new text. However if
you are writing a new chapter, then placing the file in the correct directory is
something we'd like you to consider.
2010-06-13 07:11:24 -04:00
If you write a chapter for the ``Simba Reference`` or ``Scripting Reference``
2010-06-12 19:50:51 -04:00
or ``Features``
part of the documentation, place it in the ``simbaref``, ``scriptref`` or
``features`` folder repectively.
2010-06-12 16:11:31 -04:00
Any other files can be put directly in the root of the sphinx folder.
(The same place as ``index.rst``)
2010-06-13 09:34:39 -04:00
Capitalisation
~~~~~~~~~~~~~~
2010-06-13 16:46:07 -04:00
The titles of all major sections have all words capitalized. (The ones with
2010-06-13 09:34:39 -04:00
===)
2010-06-13 16:46:07 -04:00
The minor sections and subsections (---) and (~~~) have only the first word and
2010-06-13 09:34:39 -04:00
Simba specific words (like Simba itself) capitalized.
Try to stick to the Python documentation standards.
2010-06-13 09:34:39 -04:00
( http://docs.python.org/using/index.html )
2010-06-13 18:27:10 -04:00
References
----------
Sphinx has references, most of the .rst files contain labels and references.
A label looks something like this:
.. code-block:: python
.. _<X>-<Y>:
Where X is either the name of file or folder; and Y is the name of the
file/function if X is a folder. For referring to specific functions for example,
use:
.. code-block:: python
.. _scriptref-movemouse:
To define a label for the MoveMouse function. Labels are always placed right
above section/chapter declarations.