Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2013-02-14 16:35:40 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2013-02-14 16:47:17 (GMT)
commit0f99bc50748894c65e6684f2e9ca10bc9fa0bd71 (patch)
treea99879204fdb840f206c7b969157445f770b7d00 /doc
parente7591340d4cdc25ecb7657fb9b1b4c4d5bacf076 (diff)
Improve documentation
Diffstat (limited to 'doc')
l---------doc/AUTHORS.rst1
-rw-r--r--doc/COPYING.rst4
l---------doc/HACKING.rst1
-rw-r--r--doc/__main__.py38
-rw-r--r--doc/api.rst12
-rw-r--r--doc/conf.py167
-rw-r--r--doc/db.rst5
l---------doc/index.rst1
-rw-r--r--doc/requirements.rst11
9 files changed, 240 insertions, 0 deletions
diff --git a/doc/AUTHORS.rst b/doc/AUTHORS.rst
new file mode 120000
index 0000000..9eadf71
--- /dev/null
+++ b/doc/AUTHORS.rst
@@ -0,0 +1 @@
+../AUTHORS \ No newline at end of file
diff --git a/doc/COPYING.rst b/doc/COPYING.rst
new file mode 100644
index 0000000..4f7360c
--- /dev/null
+++ b/doc/COPYING.rst
@@ -0,0 +1,4 @@
+License
+=======
+
+.. literalinclude:: ../COPYING
diff --git a/doc/HACKING.rst b/doc/HACKING.rst
new file mode 120000
index 0000000..cc8063b
--- /dev/null
+++ b/doc/HACKING.rst
@@ -0,0 +1 @@
+../HACKING \ No newline at end of file
diff --git a/doc/__main__.py b/doc/__main__.py
new file mode 100644
index 0000000..de071b0
--- /dev/null
+++ b/doc/__main__.py
@@ -0,0 +1,38 @@
+# Copyright (C) 2013 Aleksey Lim
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import os
+import sys
+from os.path import dirname
+
+
+HELP = """\
+Usage: python . [COMMAND]
+
+Commands:
+ make build Sphinx documentation
+ upload upload files to api.sugarlabs.org
+"""
+
+os.chdir(dirname(__file__))
+
+if len(sys.argv) == 1:
+ print HELP
+elif sys.argv[1] == 'make':
+ os.system('sphinx-build -b html . build/html')
+elif sys.argv[1] == 'upload':
+ os.system('rsync -rv build/html/ '
+ 'sunjammer.sugarlabs.org:/srv/www-sugarlabs/apimaster/docs/'
+ 'sugar-network')
diff --git a/doc/api.rst b/doc/api.rst
new file mode 100644
index 0000000..8ce80d7
--- /dev/null
+++ b/doc/api.rst
@@ -0,0 +1,12 @@
+Library API
+===========
+
+Tha major access point is executable applications, though, it is also possible
+to reuse public Python modules to make interactions with the Sugar Network
+more useful.
+
+.. toctree::
+ :maxdepth: 1
+ :numbered:
+
+ db
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644
index 0000000..ccb4f47
--- /dev/null
+++ b/doc/conf.py
@@ -0,0 +1,167 @@
+# sugar-lint: disable
+
+import os
+import sys
+from datetime import datetime
+from os.path import abspath, dirname, join
+from ConfigParser import ConfigParser
+
+sys.path.insert(0, abspath('..'))
+
+SPEC_FILE = join(dirname(__file__), '..', 'sweets.recipe')
+
+spec = ConfigParser()
+spec.read(SPEC_FILE)
+version = spec.get('Package', 'version')
+version_date = datetime.utcfromtimestamp(os.stat(SPEC_FILE).st_mtime)
+
+# -- General configuration -----------------------------------------------------
+
+autodoc_member_order = "bysource"
+autoclass_content = "both"
+
+# 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.intersphinx', 'sphinx.ext.ifconfig']
+
+# 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 = 'Sugar Network'
+copyright = '%s Aleksey Lim' % version_date.year
+
+# 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.1'
+# The full version, including alpha/beta/rc tags.
+release = version
+
+# 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 = '%Y-%m-%d'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['build']
+
+# 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. 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 = 'sugar-network'
diff --git a/doc/db.rst b/doc/db.rst
new file mode 100644
index 0000000..ebee2b5
--- /dev/null
+++ b/doc/db.rst
@@ -0,0 +1,5 @@
+sugar_network.db
+----------------
+
+.. automodule:: sugar_network.db
+ :members:
diff --git a/doc/index.rst b/doc/index.rst
new file mode 120000
index 0000000..59a23c4
--- /dev/null
+++ b/doc/index.rst
@@ -0,0 +1 @@
+../README \ No newline at end of file
diff --git a/doc/requirements.rst b/doc/requirements.rst
new file mode 100644
index 0000000..a07b4ad
--- /dev/null
+++ b/doc/requirements.rst
@@ -0,0 +1,11 @@
+Requirements
+============
+
+Sugar Network requires the following packages (in Pip notation) to work properly:
+
+.. literalinclude:: ../requirements.txt
+
+To let Sugar Network nodes generate new accounts, make sure that
+`OpenSSH`_ client utilities are installed as well.
+
+.. _OpenSSH: http://www.openssh.org/