Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
conf.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 #
3 # groonga documentation build configuration file, created by
4 # sphinx-quickstart on Thu Oct 22 15:42:37 2009.
5 #
6 # This file is execfile()d with the current directory set to its containing dir.
7 #
8 # Note that not all possible configuration values are present in this
9 # autogenerated file.
10 #
11 # All configuration values have a default; values that are commented out
12 # serve to show the default.
13 
14 SPHINX_VERSION_REQUIRED = "1.0.8" # 1.1 is required.
15 RST2PDF_VERSION_REQUIRED = "0.14.2"
16 
17 import re
18 import sphinx
19 import sys, os
20 import gettext
21 from datetime import datetime
22 from pkg_resources import parse_version
23 
24 # If extensions (or modules to document with autodoc) are in another directory,
25 # add these directories to sys.path here. If the directory is relative to the
26 # documentation root, use os.path.abspath to make it absolute, like shown here.
27 #sys.path.append(os.path.abspath('.'))
28 
29 if parse_version(sphinx.__version__) < parse_version(SPHINX_VERSION_REQUIRED):
30  print 'sphinx version is old. %s is requred. exec "easy_install -U sphinx"' % SPHINX_VERSION_REQUIRED
31  sys.exit(1)
32 
33 #if sphinx.__version__ != SPHINX_VERSION_REQUIRED:
34 # print 'sphinx version is different. %s is requred. exec "easy_install -U sphinx"' % SPHINX_VERSION_REQUIRED
35 # sys.exit(1)
36 
37 # -- General configuration -----------------------------------------------------
38 
39 # Add any Sphinx extension module names here, as strings. They can be extensions
40 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
41 extensions = []
42 # extensions.append("source.rdoc")
43 # extensions.append("source.textile")
44 try:
45  import rst2pdf
46  if parse_version(rst2pdf.version) >= parse_version(RST2PDF_VERSION_REQUIRED):
47  extensions.append('sphinx.ext.autodoc')
48  extensions.append('rst2pdf.pdfbuilder')
49 except:
50  pass
51 
52 # Add any paths that contain templates here, relative to this directory.
53 templates_path = ['templates']
54 
55 # The suffix of source filenames.
56 source_suffix = '.txt'
57 
58 # The encoding of source files.
59 #source_encoding = 'utf-8'
60 
61 # The master toctree document.
62 master_doc = 'index'
63 
64 # General information about the project.
65 project = u'Groonga'
66 copyright = u'2009-' + unicode(datetime.today().year) + ', Brazil, Inc'
67 
68 # The version info for the project you're documenting, acts as replacement for
69 # |version| and |release|, also used in various other places throughout the
70 # built documents.
71 #
72 
73 # The short X.Y version.
74 version = os.environ["DOCUMENT_VERSION"]
75 # The full version, including alpha/beta/rc tags.
76 release = os.environ["DOCUMENT_VERSION_FULL"]
77 
78 # The directories that has *.mo files.
79 locale_dirs = ["../locale"]
80 
81 # The language for content autogenerated by Sphinx. Refer to documentation
82 # for a list of supported languages.
83 language = os.environ['LOCALE']
84 
85 locale_dir = os.path.dirname(__file__) + "/../locale"
86 try:
87  catalog = gettext.Catalog("conf", localedir=locale_dir, languages=[language])
88  _ = catalog.gettext
89 except:
90  _ = lambda msgid: msgid
91 
92 # There are two options for replacing |today|: either, you set today to some
93 # non-false value, then it is used:
94 #today = ''
95 # Else, today_fmt is used as the format for a strftime call.
96 #today_fmt = '%B %d, %Y'
97 
98 # List of patterns, relative to source directory, that match files and
99 # directories to ignore when looking for source files.
100 exclude_patterns = ['_build', 'commands_not_implemented']
101 
102 # The reST default role (used for this markup: `text`) to use for all documents.
103 #default_role = None
104 
105 # If true, '()' will be appended to :func: etc. cross-reference text.
106 #add_function_parentheses = True
107 
108 # If true, the current module name will be prepended to all description
109 # unit titles (such as .. function::).
110 #add_module_names = True
111 
112 # If true, sectionauthor and moduleauthor directives will be shown in the
113 # output. They are ignored by default.
114 #show_authors = False
115 
116 # The name of the Pygments (syntax highlighting) style to use.
117 pygments_style = 'sphinx'
118 
119 # A list of ignored prefixes for module index sorting.
120 #modindex_common_prefix = []
121 
122 
123 # -- Options for HTML output ---------------------------------------------------
124 
125 # The theme to use for HTML and HTML Help pages. Major themes that come with
126 # Sphinx are currently 'default' and 'sphinxdoc'.
127 html_theme = 'groonga'
128 
129 # Theme options are theme-specific and customize the look and feel of a theme
130 # further. For a list of options available for each theme, see the
131 # documentation.
132 html_theme_options = {
133  'rightsidebar': 'true',
134  'stickysidebar': 'true',
135 # 'relbarbgcolor': '#ED4517',
136 # 'relbartextcolor': 'white',
137 # 'relbarlinkcolor': '#F8F0FF',
138 # 'footerbgcolor': '#ED4517',
139 # 'footertextcolor': 'white',
140 # 'sidebarbgcolor': '#FFd587',
141 # 'sidebartextcolor': '#ED4517',
142 # 'sidebarlinkcolor': '#666666',
143  'bodyfont': '#666666',
144 }
145 
146 html_context = {"language": language}
147 
148 # Add any paths that contain custom themes here, relative to this directory.
149 html_theme_path = ["../themes"]
150 
151 # The name for this set of Sphinx documents. If None, it defaults to
152 # "<project> v<release> documentation".
153 html_title_format = unicode(_("%(project)s v%(release)s documentation"), "utf-8")
154 html_title = html_title_format % {"project": project,
155  "release": unicode(release, "utf-8")}
156 
157 # A shorter title for the navigation bar. Default is the same as html_title.
158 #html_short_title = None
159 
160 # The name of an image file (relative to this directory) to place at the top
161 # of the sidebar.
162 #html_logo = None
163 
164 # The name of an image file (within the static path) to use as favicon of the
165 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
166 # pixels large.
167 #html_favicon = None
168 
169 # Add any paths that contain custom static files (such as style sheets) here,
170 # relative to this directory. They are copied after the builtin static files,
171 # so a file named "default.css" will overwrite the builtin "default.css".
172 #html_static_path = ['static']
173 
174 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
175 # using the given strftime format.
176 #html_last_updated_fmt = '%b %d, %Y'
177 
178 # If true, SmartyPants will be used to convert quotes and dashes to
179 # typographically correct entities.
180 html_use_smartypants = False
181 
182 # Custom sidebar templates, maps document names to template names.
183 #html_sidebars = {}
184 
185 # Additional templates that should be rendered to pages, maps page names to
186 # template names.
187 #html_additional_pages = {}
188 
189 # If false, no module index is generated.
190 #html_use_modindex = True
191 
192 # If false, no index is generated.
193 #html_use_index = True
194 
195 # If true, the index is split into individual pages for each letter.
196 #html_split_index = False
197 
198 # If true, links to the reST sources are added to the pages.
199 #html_show_sourcelink = True
200 
201 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
202 html_show_sphinx = False
203 
204 # If true, an OpenSearch description file will be output, and all pages will
205 # contain a <link> tag referring to it. The value of this option must be the
206 # base URL from which the finished HTML is served.
207 #html_use_opensearch = ''
208 
209 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
210 #html_file_suffix = ''
211 
212 # Output file base name for HTML help builder.
213 htmlhelp_basename = 'groongadoc'
214 
215 
216 # -- Options for LaTeX output --------------------------------------------------
217 
218 # The paper size ('letter' or 'a4').
219 #latex_paper_size = 'letter'
220 
221 # The font size ('10pt', '11pt' or '12pt').
222 #latex_font_size = '10pt'
223 
224 # Grouping the document tree into LaTeX files. List of tuples
225 # (source start file, target name, title, author, documentclass [howto/manual]).
226 latex_documents = [
227  ('index', 'groonga.tex', unicode(_('Groonga documentation'), "utf-8"),
228  u'Brazil, Inc', 'manual'),
229 ]
230 
231 # The name of an image file (relative to this directory) to place at the top of
232 # the title page.
233 #latex_logo = None
234 
235 # For "manual" documents, if this is true, then toplevel headings are parts,
236 # not chapters.
237 #latex_use_parts = False
238 
239 # Additional stuff for the LaTeX preamble.
240 #latex_preamble = ''
241 
242 # Documents to append as an appendix to all manuals.
243 #latex_appendices = []
244 
245 # If false, no module index is generated.
246 #latex_use_modindex = True
247 
248 # -- Options for rst2pdf output --------------------------------------------------
249 pdf_documents = [
250  ('index',
251  u'Groonga-%s' % (release,),
252  html_title,
253  unicode(_('Groonga Project'), "utf-8"))
254 ]
255 pdf_stylesheets = ['sphinx', 'kerning', 'a4']
256 if 'language' in dir():
257  pdf_language = language
258  pdf_stylesheets += ['styles/pdf/%s' % pdf_language]
259 pdf_font_path = []
260 for root, dirs, files in os.walk('/usr/share/fonts'):
261  pdf_font_path += map(lambda(dir): os.path.join(root, dir), dirs)
262 pdf_fit_mode = "shrink"
263 pdf_inline_footnotes = True
264 pdf_break_level = 2
265 
266 # -- Options for manual page output --------------------------------------------
267 # One entry per manual page. List of tuples
268 # (source start file, name, description, authors, manual section).
269 man_pages = [
270  ('index', 'Groonga', unicode(_('Groonga documentation'), "utf-8"),
271  [u'Groonga Project'], 1)
272 ]