Commits

German Larrain committed 8437ecc

doc: added basic (demo) files for Sphinx documentation

Comments (0)

Files changed (9)

docs/sphinx/Makefile

+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ARS.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ARS.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/ARS"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ARS"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."

docs/sphinx/create apidoc rst files.txt

+ars/docs/sphinx$ sphinx-apidoc -o source/apidoc ../../ars
+
+to overwrite existing files, add --force option

docs/sphinx/quickstart setup.txt

+german@german-T400:~/Prog/WS/PyCharm/MSc/ars$ sphinx-quickstart 
+Welcome to the Sphinx 1.1.3 quickstart utility.
+
+Please enter values for the following settings (just press Enter to
+accept a default value, if one is given in brackets).
+
+Enter the root path for documentation.
+> Root path for the documentation [.]^C     sp
+[Interrupted.]
+german@german-T400:~/Prog/WS/PyCharm/MSc/ars$ sphinx-quickstart 
+Welcome to the Sphinx 1.1.3 quickstart utility.
+
+Please enter values for the following settings (just press Enter to
+accept a default value, if one is given in brackets).
+
+Enter the root path for documentation.
+> Root path for the documentation [.]: docs/sphinx
+
+You have two options for placing the build directory for Sphinx output.
+Either, you use a directory "_build" within the root path, or you separate
+"source" and "build" directories within the root path.
+> Separate source and build directories (y/N) [n]: y
+
+Inside the root directory, two more directories will be created; "_templates"
+for custom HTML templates and "_static" for custom stylesheets and other static
+files. You can enter another prefix (such as ".") to replace the underscore.
+> Name prefix for templates and static dir [_]: _
+
+The project name will occur in several places in the built documentation.
+> Project name: ARS
+> Author name(s): Germán Larraín
+
+Sphinx has the notion of a "version" and a "release" for the
+software. Each version can have multiple releases. For example, for
+Python the version is something like 2.5 or 3.0, while the release is
+something like 2.5.1 or 3.0a1.  If you don't need this dual structure,
+just set both to the same value.
+> Project version: 0.3
+> Project release [0.3]: 0.3dev
+
+The file name suffix for source files. Commonly, this is either ".txt"
+or ".rst".  Only files with this suffix are considered documents.
+> Source file suffix [.rst]: .rst
+
+One document is special in that it is considered the top node of the
+"contents tree", that is, it is the root of the hierarchical structure
+of the documents. Normally, this is "index", but if your "index"
+document is a custom template, you can also set this to another filename.
+> Name of your master document (without suffix) [index]: index
+
+Sphinx can also add configuration for epub output:
+> Do you want to use the epub builder (y/N) [n]: y
+
+Please indicate if you want to use one of the following Sphinx extensions:
+> autodoc: automatically insert docstrings from modules (y/N) [n]: y
+> doctest: automatically test code snippets in doctest blocks (y/N) [n]: n
+> intersphinx: link between Sphinx documentation of different projects (y/N) [n]: n
+> todo: write "todo" entries that can be shown or hidden on build (y/N) [n]: y
+> coverage: checks for documentation coverage (y/N) [n]: y
+> pngmath: include math, rendered as PNG images (y/N) [n]: y
+> mathjax: include math, rendered in the browser by MathJax (y/N) [n]: n
+> ifconfig: conditional inclusion of content based on config values (y/N) [n]: n
+> viewcode: include links to the source code of documented Python objects (y/N) [n]: y
+
+A Makefile and a Windows command file can be generated for you so that you
+only have to run e.g. `make html' instead of invoking sphinx-build
+directly.
+> Create Makefile? (Y/n) [y]: y
+> Create Windows command file? (Y/n) [y]: n
+
+Creating file docs/sphinx/source/conf.py.
+Creating file docs/sphinx/source/index.rst.
+Creating file docs/sphinx/Makefile.
+
+Finished: An initial directory structure has been created.
+
+You should now populate your master file docs/sphinx/source/index.rst and create other documentation
+source files. Use the Makefile to build the docs, like so:
+   make builder
+where "builder" is one of the supported builders, e.g. html, latex or linkcheck.
+
+german@german-T400:~/Prog/WS/PyCharm/MSc/ars$ 
+

docs/sphinx/source/_static/basic_screenshot.png

Added
New image

docs/sphinx/source/ars_links.rst

+========================================
+Project's external hyperlinks
+========================================
+
+
+-	ARS is registered at PyPI_ (Python Package Index).
+-	Its code is managed in a Mercurial repository hosted at Bitbucket_.
+-	The documentation is hosted at ReadTheDocs_ and it is generated
+	dynamically after each commit to the repository.
+-	The organization under which this project was conceived and also
+	obtained funds for it, is RAL_ (Robotics Automation Laboratory) at
+	`Pontificia Universidad Católica de Chile's <http://www.uc.cl/>`_
+	`Engineering School <http://www.ing.puc.cl/>`_.
+-	A page in Ohloh_ tracks code commits and makes some analyses and
+	estimations of the project.
+
+====================		======================
+item						URL
+====================		======================
+Code repository				Bitbucket_
+Source code					https://bitbucket.org/glarrain/ars/src
+Downloads 1					https://bitbucket.org/glarrain/ars/downloads
+Downloads 2					http://sourceforge.net/projects/arsproject/files/
+Downloads 3					PyPI_
+Issue tracker				IssueTracker_
+Mailing list				GoogleGroup_
+PyPI						PyPI_
+SourceForge					SourceForge_
+Current wiki
+====================		======================
+
+.. _PyPI: http://pypi.python.org/pypi/ARS/
+.. _Bitbucket: https://bitbucket.org/glarrain/ars
+.. _ReadTheDocs: http://readthedocs.org/projects/autonomous-robot-simulator/
+.. _RAL: http://ral.ing.puc.cl/
+.. _Ohloh: http://www.ohloh.net/p/autonomous-robot-simulator
+
+.. _Download: https://bitbucket.org/glarrain/ars/downloads
+.. _IssueTracker: https://bitbucket.org/glarrain/ars/issues
+.. _GoogleGroup: http://groups.google.com/group/ars-robot-simulator
+.. _SourceForge: http://sourceforge.net/projects/arsproject/
+.. _CurrentWiki: http://sourceforge.net/apps/mediawiki/arsproject/index.php?title=Main_Page
+
+
+.. `yahoo <http://yahoo.com>`_
+
+

docs/sphinx/source/cheatsheet.rst

+.. _cheat-sheet:
+
+******************
+Sphinx cheat sheet
+******************
+
+Here is a quick and dirty cheat sheet for some common stuff you want
+to do in sphinx and ReST.  You can see the literal source for this
+file at :ref:`cheatsheet
+-literal`.
+   
+
+.. _formatting-text:
+
+Formatting text
+===============
+
+You use inline markup to make text *italics*, **bold**, or ``monotype``.
+
+You can represent code blocks fairly easily::
+
+   import numpy as np
+   x = np.random.rand(12)
+
+Or literally include code:
+
+.. literalinclude:: pyplots/ellipses.py
+
+.. _making-a-list:
+
+Making a list
+=============
+
+It is easy to make lists in rest
+
+Bullet points
+-------------
+
+This is a subsection making bullet points
+
+* point A
+
+* point B
+
+* point C
+
+
+Enumerated points
+------------------
+
+This is a subsection making numbered points
+
+#. point A
+
+#. point B
+
+#. point C
+
+
+.. _making-a-table:
+
+Making a table
+==============
+
+This shows you how to make a table -- if you only want to make a list see :ref:`making-a-list`.
+
+==================   ============
+Name                 Age
+==================   ============
+John D Hunter        40
+Cast of Thousands    41
+And Still More       42
+==================   ============
+
+.. _making-links:
+
+Making links
+============
+
+It is easy to make a link to `yahoo <http://yahoo.com>`_ or to some
+section inside this document (see :ref:`making-a-table`) or another
+document.
+
+You can also reference classes, modules, functions, etc that are
+documented using the sphinx `autodoc
+<http://sphinx.pocoo.org/ext/autodoc.html>`_ facilites.  For example,
+see the module :mod:`matplotlib.backend_bases` documentation, or the
+class :class:`~matplotlib.backend_bases.LocationEvent`, or the method
+:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`.
+
+
+
+.. _cheatsheet-literal:
+
+This file
+=========
+
+.. literalinclude:: cheatsheet.rst

docs/sphinx/source/conf.py

+# -*- coding: utf-8 -*-
+#
+# ARS documentation build configuration file, created by
+# sphinx-quickstart on Fri Jul  6 21:21:20 2012.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.curdir)))))
+#	to test the main package is accessible, copy the following statement below: import ars
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.viewcode']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'ARS'
+copyright = u'2012, Germán Larraín'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.3'
+# The full version, including alpha/beta/rc tags.
+release = '0.3dev'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+add_module_names = False
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'ARSdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'ARS.tex', u'ARS Documentation',
+   u'Germán Larraín', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'ars', u'ARS Documentation',
+     [u'Germán Larraín'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('index', 'ARS', u'ARS Documentation',
+   u'Germán Larraín', 'ARS', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+
+# -- Options for Epub output ---------------------------------------------------
+
+# Bibliographic Dublin Core info.
+epub_title = u'ARS'
+epub_author = u'Germán Larraín'
+epub_publisher = u'Germán Larraín'
+epub_copyright = u'2012, Germán Larraín'
+
+# The language of the text. It defaults to the language option
+# or en if the language is not set.
+#epub_language = ''
+
+# The scheme of the identifier. Typical schemes are ISBN or URL.
+#epub_scheme = ''
+
+# The unique identifier of the text. This can be a ISBN number
+# or the project homepage.
+#epub_identifier = ''
+
+# A unique identification for the text.
+#epub_uid = ''
+
+# A tuple containing the cover image and cover page html template filenames.
+#epub_cover = ()
+
+# HTML files that should be inserted before the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_pre_files = []
+
+# HTML files shat should be inserted after the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_post_files = []
+
+# A list of files that should not be packed into the epub file.
+#epub_exclude_files = []
+
+# The depth of the table of contents in toc.ncx.
+#epub_tocdepth = 3
+
+# Allow duplicate toc entries.
+#epub_tocdup = True

docs/sphinx/source/getting_started.rst

+.. _getting_started:
+
+
+***************
+Getting started
+***************
+
+.. _installing-docdir:
+
+Installing your doc directory
+=============================
+
+You may already have sphinx `sphinx <http://sphinx.pocoo.org/>`_
+installed -- you can check by doing::
+
+  python -c 'import sphinx'
+
+If that fails grab the latest version of and install it with::
+
+  > sudo easy_install -U Sphinx
+
+Now you are ready to build a template for your docs, using
+sphinx-quickstart::
+
+  > sphinx-quickstart
+
+accepting most of the defaults.  I choose "sampledoc" as the name of my
+project.  cd into your new directory and check the contents::
+
+  home:~/tmp/sampledoc> ls
+  Makefile	_static		conf.py
+  _build		_templates	index.rst
+
+The index.rst is the master ReST for your project, but before adding
+anything, let's see if we can build some html::
+
+  make html
+
+If you now point your browser to :file:`_build/html/index.html`, you
+should see a basic sphinx site.
+
+.. image:: _static/basic_screenshot.png
+
+.. _fetching-the-data:
+
+Fetching the data
+-----------------
+
+Now we will start to customize out docs.  Grab a couple of files from
+the `web site
+<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sampledoc_tut/>`_
+or svn.  You will need :file:`getting_started.rst` and
+:file:`_static/basic_screenshot.png`.  All of the files live in the
+"completed" version of this tutorial, but since this is a tutorial,
+we'll just grab them one at a time, so you can learn what needs to be
+changed where.  Since we have more files to come, I'm going to grab
+the whole svn directory and just copy the files I need over for now.
+First, I'll cd up back into the directory containing my project, check
+out the "finished" product from svn, and then copy in just the files I
+need into my :file:`sampledoc` directory::
+
+  home:~/tmp/sampledoc> pwd
+  /Users/jdhunter/tmp/sampledoc
+  home:~/tmp/sampledoc> cd ..
+  home:~/tmp> svn co https://matplotlib.svn.sourceforge.net/svnroot/\
+  matplotlib/trunk/sampledoc_tut
+  A    sampledoc_tut/cheatsheet.rst
+  A    sampledoc_tut/_static
+  A    sampledoc_tut/_static/basic_screenshot.png
+  A    sampledoc_tut/conf.py
+  A    sampledoc_tut/Makefile
+  A    sampledoc_tut/_templates
+  A    sampledoc_tut/_build
+  A    sampledoc_tut/getting_started.rst
+  A    sampledoc_tut/index.rst
+  Checked out revision 7449.
+  home:~/tmp> cp sampledoc_tut/getting_started.rst sampledoc/
+  home:~/tmp> cp sampledoc_tut/_static/basic_screenshot.png \
+  sampledoc/_static/
+
+The last step is to modify :file:`index.rst` to include the
+:file:`getting_started.rst` file (be careful with the indentation, the
+"g" in "getting_started" should line up with the ':' in ``:maxdepth``::
+
+  Contents:
+
+  .. toctree::
+     :maxdepth: 2
+
+     getting_started.rst
+
+and then rebuild the docs::
+
+  cd sampledoc
+  make html
+
+
+When you reload the page by refreshing your browser pointing to
+:file:`_build/html/index.html`, you should see a link to the
+"Getting Started" docs, and in there this page with the screenshot.
+`Voila!`
+
+Note we used the image directive to include to the screenshot above
+with::
+
+  .. image:: _static/basic_screenshot.png
+
+
+Next we'll customize the look and feel of our site to give it a logo,
+some custom css, and update the navigation panels to look more like
+the `sphinx <http://sphinx.pocoo.org/>`_ site itself -- see
+:ref:`custom_look`.
+

docs/sphinx/source/index.rst

+.. ARS documentation master file, created by
+   sphinx-quickstart on Fri Jul  6 21:21:20 2012.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to ARS's documentation!
+===============================
+
+This is a tutorial introduction to quickly get you up and running with
+your own sphinx documentation system.  We'll cover installing sphinx,
+customizing the look and feel, using custom extensions for embedding
+plots, inheritance diagrams, syntax highlighted ipython sessions and
+more.  If you follow along the tutorial, you'll start with nothing and
+end up with this site -- it's the bootstrapping documentation tutorial
+that writes itself!
+
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+   getting_started.rst
+   cheatsheet.rst
+   
+   ars_links.rst
+   apidoc/modules.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+