initial commit

This commit is contained in:
Massimo Di Pierro
2011-11-22 23:30:42 -06:00
commit d421c1321b
580 changed files with 115527 additions and 0 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

+22
View File
@@ -0,0 +1,22 @@
.. note:: There is an `ongoing discussion
<http://thread.gmane.org/gmane.comp.python.web2py/8538/focus=8633>`_,
on whether this part of the *web2py* documents should be
included in the developer documentation.
This discussion involves:
* the `AlterEgo (FAQ) <http://www.web2py.com/AlterEgo>`_
* the `User Wiki <https://mdp.cti.depaul.edu/wiki>`_
Until this is resolved, the parts under question will be excluded.
Nevertheless, these party are still available and can be included in
the Sphinx build by the following steps:
#. back up the directory ``web2py/doc``
#. unzip the archive ``external_input.zip`` delivered with the
documentation in the directory
``web2py/doc``.
Existing files should be overwritten.
#. re-build the documentation
+251
View File
@@ -0,0 +1,251 @@
# -*- coding: utf-8 -*-
#
# Web2Py documentation build configuration file, created by
# sphinx-quickstart on Thu Apr 30 17:10:06 2009.
#
# 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.append(os.path.abspath('.'))
#--- sys.path for web2py_modules
web2py_modules = os.path.join('.', '..', '..')
sys.path.append(os.path.abspath(web2py_modules))
#print sys.path
#from gluon import *
##--- sys.path for helper packages
sys.path.extend([
#
# local extension
os.path.join(os.path.dirname(__file__), '..', 'sphinxext', 'local'),
# numpy standard doc extensions
os.path.join(os.path.dirname(__file__), '..', 'sphinxext', 'numpydoc'),
#
# # _static files
os.path.join(os.path.dirname(__file__), '_static')
])
#
#
#import sphinx_tools as st
##--- autogenerate API docs
### Auxilary
#script_path = os.path.abspath(
# os.path.join(
# '..', 'sphinxext', 'local', 'generate_modules_modif.py'))
#dest_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'contents', 'lib', 'gluon'))
#print 'dest', dest_dir
#package_dir = os.path.abspath(os.path.join(web2py_modules, 'gluon'))
#print 'package_dir', package_dir
#doc_header = (os.path.split(dest_dir)[-1]).capitalize()
#p = st.autogenerate_package_doc(script_path, dest_dir,
# package_dir,
# doc_header,
# suffix='rst',
# overwrite=True)
# -- General configuration -----------------------------------------------------
# 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.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'numpydoc']
# 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'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Web2Py'
copyright = u'2009, The web2py developers'
# 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.
#--- get version
version_file = open(os.path.join('..', '..', 'VERSION'), 'r')
version_content = version_file.read()
version_str = version_content.split('(')[0].strip()
version_str = version_str.split(' ')
# The short X.Y version.
version = version_str[1]
# The full version, including alpha/beta/rc tags.
release = version_str[1]
if len(version_str) > 2:
release += + ' ' + version_str[2]
# 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 documents that shouldn't be included in the build.
#unused_docs = []
# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = []
# 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
# 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. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
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 = '_static/pics/logo_colored_small.png'
# 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_use_modindex = 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, 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 = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'Web2Pydoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'Web2Py.tex', u'Web2Py Documentation',
u'The web2py developers', '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
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_use_modindex = True
# Example configuration for intersphinx: refer to the Python standard library.
#--- Intersphinx
intersphinx_mapping = {'http://docs.python.org/dev': None,
}
#--- CUSTOM
keep_warnings = True
todo_include_todos = True
+100
View File
@@ -0,0 +1,100 @@
**********************************
Introduction for documenting
**********************************
.. rubric:: Some hints on writing documentation with Sphinx for web2py
Writing documentation
========================
official documentation
----------------------------------
* `Sphinx <http://sphinx.pocoo.org/contents.html>`_
Docstrings
------------------------
* official python standard
* `Docstring Conventions <http://www.python.org/dev/peps/pep-0257>`_
* `Documenting Python <http://docs.python.org/dev/documenting/index.html>`_
* numpy standard
* `documentation standard <http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines#docstring-standard>`_
* `Example file <http://projects.scipy.org/numpy/browser/trunk/doc/example.py>`_
* `Docstring Template <http://projects.scipy.org/numpy/browser/trunk/doc/EXAMPLE_DOCSTRING.txt>`_
If you use `Eclipse / Pydev <http://pydev.sourceforge.net/>`_ you can define this piece as template.
Helpers
------------------------
Editors
________________________
* `Emacs: see docutils page <http://docutils.sourceforge.net/docs/user/emacs.html>`_
* `Gedit (Linux) <http://textmethod.com/wiki/ReStructuredTextToolsForGedit>`_
* `Ulipad (Win) <http://code.google.com/p/ulipad>`_
Others
________________________
* creating tables in ReST can be painful. Here is a module that can help::
easy_install prettytable
import prettytable as pt
mytable =pt.PrettyTable(["id", "category", "recipie"])
print mytable # copy & paste this into your ReST document!
mytable_string = mytable.get_string() # or insert this string when
generating automatic documents
Building documentation
========================
Follow these steps:
#. easy_install -U sphinx
#. built with custom make files for web2py => **Note: we could create a
cross-platform python script for this!**
#. unix-like: ``sh doc/make-doc_html.sh``
#. windows: ``doc\make-doc_html.bat``
Due to the special manner of the *web2py* import mechanism it requires that
the doc is built from the *web2py* root directory.
#. the result will written to: ``web2py/applications/examples/static/sphinx``
(the target directory will be automatically created)
#. inspect any error
#. on the :term:`CLI`: see the errors and warnings floating on
``stderr``/``stdout``
#. using the above mentioned make files a log file will be written to
``web2py/doc/sphinx-build.log``
Contributing
========================
.. warning:: Please ask on the
`Mailinglist <http://groups.google.com/group/web2py>`_ before
commiting or pushing to the repositories.
So far, it has not been agreed on a proper setup to mutually
edit the documentation and especially how to correct the
docstrings without getting to many :term:`DVCS` conflicts.
#. branch the web2py Sphinx code::
bzr branch lp:~web2py/web2py/web2py-sphinx
cd web2py-sphinx
#. pull the latest code from web2py Sphinx branch::
bzr pull
#. pull latest web2py development version::
bzr pull http://bazaar.launchpad.net/~mdipierro/web2py/devel/
#. change and edit the documents or docstrings with your edior
#. push the changes to the web2py Sphinx branch::
bzr push lp:~web2py/web2py/web2py-sphinx
This requires that you are a member of the `web2py team at Launchpad <https://launchpad.net/~web2py>`_ and registered at Launchpad `with your SSA keys <https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair>`_. You can find more info on the `Launchpad help page <https://help.launchpad.net/Code/UploadingABranch>`_
+9
View File
@@ -0,0 +1,9 @@
Frequently Asked Questions (FAQ)
==================================
.. rubric:: The pages from the `AlterEgo <http://www.web2py.com/AlterEgo>`_
.. note:: These pages are extracted as plain and not yet converted into
:term:`ReSt` formated documents.
.. include:: _static/rst/external_hint.txt
+15
View File
@@ -0,0 +1,15 @@
***************************
Glossary
***************************
.. glossary::
:sorted:
ReSt
ReStructured Text ASCII markup format
CLI
Command Line Interface
DVCS
Distributed Version Control System
+13
View File
@@ -0,0 +1,13 @@
Compat Documentation
====================
This page contains the Compat Package documentation.
The :mod:`uuid` Module
----------------------
.. automodule:: gluon.compat.uuid
:members:
:undoc-members:
:show-inheritance:
+13
View File
@@ -0,0 +1,13 @@
Gateways Documentation
======================
This page contains the Gateways Package documentation.
The :mod:`fcgi` Module
----------------------
.. automodule:: gluon.contrib.gateways.fcgi
:members:
:undoc-members:
:show-inheritance:
+21
View File
@@ -0,0 +1,21 @@
Markdown Documentation
======================
This page contains the Markdown Package documentation.
The :mod:`markdown` Package
---------------------------
.. automodule:: gluon.contrib.markdown
:members:
:undoc-members:
:show-inheritance:
The :mod:`markdown2` Module
---------------------------
.. automodule:: gluon.contrib.markdown.markdown2
:members:
:undoc-members:
:show-inheritance:
+21
View File
@@ -0,0 +1,21 @@
Memcache Documentation
======================
This page contains the Memcache Package documentation.
The :mod:`memcache` Module
--------------------------
.. automodule:: gluon.contrib.memcache.memcache
:members:
:undoc-members:
:show-inheritance:
The :mod:`memcache` Package
---------------------------
.. automodule:: gluon.contrib.memcache
:members:
:undoc-members:
:show-inheritance:
+53
View File
@@ -0,0 +1,53 @@
Pyrtf Documentation
===================
This page contains the Pyrtf Package documentation.
The :mod:`Elements` Module
--------------------------
.. automodule:: gluon.contrib.pyrtf.Elements
:members:
:undoc-members:
:show-inheritance:
The :mod:`Renderer` Module
--------------------------
.. automodule:: gluon.contrib.pyrtf.Renderer
:members:
:undoc-members:
:show-inheritance:
The :mod:`PropertySets` Module
------------------------------
.. automodule:: gluon.contrib.pyrtf.PropertySets
:members:
:undoc-members:
:show-inheritance:
The :mod:`pyrtf` Package
------------------------
.. automodule:: gluon.contrib.pyrtf
:members:
:undoc-members:
:show-inheritance:
The :mod:`Constants` Module
---------------------------
.. automodule:: gluon.contrib.pyrtf.Constants
:members:
:undoc-members:
:show-inheritance:
The :mod:`Styles` Module
------------------------
.. automodule:: gluon.contrib.pyrtf.Styles
:members:
:undoc-members:
:show-inheritance:
+80
View File
@@ -0,0 +1,80 @@
Contrib Documentation
=====================
This page contains the Contrib Package documentation.
Subpackages
-----------
.. toctree::
gluon.contrib.pyrtf
gluon.contrib.gateways
gluon.contrib.markdown
gluon.contrib.memcache
gluon.contrib.simplejson
The :mod:`feedparser` Module
----------------------------
.. automodule:: gluon.contrib.feedparser
:members:
:undoc-members:
:show-inheritance:
The :mod:`memdb` Module
-----------------------
.. automodule:: gluon.contrib.memdb
:members:
:undoc-members:
:show-inheritance:
The :mod:`rss2` Module
----------------------
.. automodule:: gluon.contrib.rss2
:members:
:undoc-members:
:show-inheritance:
The :mod:`wsgihooks` Module
---------------------------
.. automodule:: gluon.contrib.wsgihooks
:members:
:undoc-members:
:show-inheritance:
The :mod:`taskbar_widget` Module
--------------------------------
.. automodule:: gluon.contrib.taskbar_widget
:members:
:undoc-members:
:show-inheritance:
The :mod:`cron` Module
----------------------
.. automodule:: gluon.contrib.cron
:members:
:undoc-members:
:show-inheritance:
The :mod:`gae_memcache` Module
------------------------------
.. automodule:: gluon.contrib.gae_memcache
:members:
:undoc-members:
:show-inheritance:
The :mod:`gql` Module
---------------------
.. automodule:: gluon.contrib.gql
:members:
:undoc-members:
:show-inheritance:
+37
View File
@@ -0,0 +1,37 @@
Simplejson Documentation
========================
This page contains the Simplejson Package documentation.
The :mod:`encoder` Module
-------------------------
.. automodule:: gluon.contrib.simplejson.encoder
:members:
:undoc-members:
:show-inheritance:
The :mod:`simplejson` Package
-----------------------------
.. automodule:: gluon.contrib.simplejson
:members:
:undoc-members:
:show-inheritance:
The :mod:`scanner` Module
-------------------------
.. automodule:: gluon.contrib.simplejson.scanner
:members:
:undoc-members:
:show-inheritance:
The :mod:`decoder` Module
-------------------------
.. automodule:: gluon.contrib.simplejson.decoder
:members:
:undoc-members:
:show-inheritance:
+220
View File
@@ -0,0 +1,220 @@
Gluon Package
===================
This page contains the Gluon Package documentation.
Subpackages
-----------
.. toctree::
gluon.compat
gluon.contrib
The :mod:`validators` Module
----------------------------
.. automodule:: gluon.validators
:members:
:undoc-members:
:show-inheritance:
The :mod:`sql` Module
---------------------
.. automodule:: gluon.sql
:members:
:undoc-members:
:show-inheritance:
The :mod:`xmlrpc` Module
------------------------
.. automodule:: gluon.xmlrpc
:members:
:undoc-members:
:show-inheritance:
The :mod:`shell` Module
-----------------------
.. automodule:: gluon.shell
:members:
:undoc-members:
:show-inheritance:
The :mod:`utils` Module
-----------------------
.. automodule:: gluon.utils
:members:
:undoc-members:
:show-inheritance:
The :mod:`globals` Module
-------------------------
.. automodule:: gluon.globals
:members:
:undoc-members:
:show-inheritance:
The :mod:`compileapp` Module
----------------------------
.. automodule:: gluon.compileapp
:members:
:undoc-members:
:show-inheritance:
The :mod:`wsgiserver` Module
----------------------------
.. automodule:: gluon.wsgiserver
:members:
:undoc-members:
:show-inheritance:
The :mod:`winservice` Module
----------------------------
.. automodule:: gluon.winservice
:members:
:undoc-members:
:show-inheritance:
The :mod:`template` Module
--------------------------
.. automodule:: gluon.template
:members:
:undoc-members:
:show-inheritance:
The :mod:`fileutils` Module
---------------------------
.. automodule:: gluon.fileutils
:members:
:undoc-members:
:show-inheritance:
The :mod:`sqlhtml` Module
-------------------------
.. automodule:: gluon.sqlhtml
:members:
:undoc-members:
:show-inheritance:
The :mod:`tools` Module
-----------------------
.. automodule:: gluon.tools
:members:
:undoc-members:
:show-inheritance:
The :mod:`languages` Module
---------------------------
.. automodule:: gluon.languages
:members:
:undoc-members:
:show-inheritance:
The :mod:`streamer` Module
--------------------------
.. automodule:: gluon.streamer
:members:
:undoc-members:
:show-inheritance:
The :mod:`restricted` Module
----------------------------
.. automodule:: gluon.restricted
:members:
:undoc-members:
:show-inheritance:
The :mod:`http` Module
----------------------
.. automodule:: gluon.http
:members:
:undoc-members:
:show-inheritance:
The :mod:`storage` Module
-------------------------
.. automodule:: gluon.storage
:members:
:undoc-members:
:show-inheritance:
The :mod:`highlight` Module
---------------------------
.. automodule:: gluon.highlight
:members:
:undoc-members:
:show-inheritance:
The :mod:`cache` Module
-----------------------
.. automodule:: gluon.cache
:members:
:undoc-members:
:show-inheritance:
The :mod:`sanitizer` Module
---------------------------
.. automodule:: gluon.sanitizer
:members:
:undoc-members:
:show-inheritance:
The :mod:`main` Module
----------------------
.. automodule:: gluon.main
:members:
:undoc-members:
:show-inheritance:
The :mod:`widget` Module
------------------------
.. automodule:: gluon.widget
:members:
:undoc-members:
:show-inheritance:
The :mod:`rewrite` Module
-------------------------
.. automodule:: gluon.rewrite
:members:
:undoc-members:
:show-inheritance:
The :mod:`html` Module
----------------------
.. automodule:: gluon.html
:members:
:undoc-members:
:show-inheritance:
The :mod:`contenttype` Module
-----------------------------
.. automodule:: gluon.contenttype
:members:
:undoc-members:
:show-inheritance:
+91
View File
@@ -0,0 +1,91 @@
.. Web2Py documentation master file, created by
sphinx-quickstart on Thu Apr 30 17:10:06 2009.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Web2Py's documentation!
==================================
.. warning:: This is a BETA version of the Sphinx based documentation for
*web2py*. **It is subject to change!**
.. note:: The documentation at the current stage is intended for develpers
and contributors. They shall have the possibility to test their
docstrings and markup.
.. note:: Please read :doc:`docs_contrib` for instructions to Sphinx
documentation writing for *web2py*!
Contents
===================
General Documents
-------------------
.. toctree::
:maxdepth: 2
docs_contrib
docs_overview
web2py_todo
glossary
Contributed Documents
------------------------
.. toctree::
:maxdepth: 1
user_wiki
faq
.. User Wiki
-------------------
.. rubric:: The pages from the `User Wiki <https://mdp.cti.depaul.edu/wiki>`_
.. note:: According to an `ongoing discussion <http://thread.gmane.org/gmane.comp.python.web2py/8304/focus=8512>`_,
the page order and structure may be
changed in the future.
.. on error do::
rename 's/\.txt/\.rst/' *.txt
.. toctree::
:maxdepth: 2
:glob:
user_wiki/*
.. Frequently Asked Questions (FAQ)
----------------------------------
.. rubric:: The pages from the `AlterEgo <http://www.web2py.com/AlterEgo>`_
.. note:: These pages are extracted as plain and not yet converted into
:term:`ReSt` formated documents.
.. toctree::
:maxdepth: 2
:glob:
faq/*
Modules
-------------------
.. toctree::
:maxdepth: 2
modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
+10
View File
@@ -0,0 +1,10 @@
Web2Py Modules
====================
.. rubric:: This page contains the Web2Py Modules documentation.
.. toctree::
:maxdepth: 5
gluon/gluon
+6
View File
@@ -0,0 +1,6 @@
User Wiki
===================
.. rubric:: The pages from the `User Wiki <https://mdp.cti.depaul.edu/wiki>`_
.. include:: _static/rst/external_hint.txt
+28
View File
@@ -0,0 +1,28 @@
***************************
Todo & Feature Proposals
***************************
Documentation
========================
#. update or create a .bzrignore
#. correct docstrings
#. add more hand written documentation.
#. customise sphinx theme
#. colors
#. fix long lines
#. decide finally what to do with FAQ and wiki
#. FAQ
#. document API doc and add the script (``generate_modules.py``) to
tools
#. fix FAQ docs
#. User Wiki
#. document wiki markdown to :term`ReSt` conversion and add the script
(``convert_faq.py``)to tools
#. fix ``user_wiki`` docs
Proposed new features
========================
#. new feature x
#. new feature z