|
1 #!/var/local/env/pycharm/bin/python3.5 |
|
2 # -*- coding: utf-8 -*- |
|
3 # |
|
4 # PyAMS User Guide documentation build configuration file, created by |
|
5 # sphinx-quickstart on Fri Dec 15 17:15:54 2017. |
|
6 # |
|
7 # This file is execfile()d with the current directory set to its |
|
8 # containing dir. |
|
9 # |
|
10 # Note that not all possible configuration values are present in this |
|
11 # autogenerated file. |
|
12 # |
|
13 # All configuration values have a default; values that are commented out |
|
14 # serve to show the default. |
|
15 |
|
16 # If extensions (or modules to document with autodoc) are in another directory, |
|
17 # add these directories to sys.path here. If the directory is relative to the |
|
18 # documentation root, use os.path.abspath to make it absolute, like shown here. |
|
19 # |
|
20 import sys |
|
21 #sys.path.insert(0, '/var/local/env/pycharm/lib/python3.5/site-packages') |
|
22 |
|
23 import os |
|
24 |
|
25 prefix_path = os.path.abspath('../../../') + os.path.sep |
|
26 sys.path[0:0] = list(map(lambda x: prefix_path + x, |
|
27 [ |
|
28 'pyams_alchemy/src', |
|
29 'pyams_cache/src', |
|
30 'pyams_catalog/src', |
|
31 'pyams_content/src', |
|
32 'pyams_content_es/src', |
|
33 'pyams_default_theme/src', |
|
34 'pyams_file/src', |
|
35 'pyams_form/src', |
|
36 'pyams_gis/src', |
|
37 'pyams_i18n/src', |
|
38 'pyams_ldap/src', |
|
39 'pyams_mail/src', |
|
40 'pyams_media/src', |
|
41 'pyams_notify/src', |
|
42 'pyams_notify_ws/src', |
|
43 'pyams_pagelet/src', |
|
44 'pyams_portal/src', |
|
45 'pyams_scheduler/src', |
|
46 'pyams_security/src', |
|
47 'pyams_sequence/src', |
|
48 'pyams_skin/src', |
|
49 'pyams_template/src', |
|
50 'pyams_thesaurus/src', |
|
51 'pyams_utils/src', |
|
52 'pyams_viewlet/src', |
|
53 'pyams_workflow/src', |
|
54 'pyams_zmi/src', |
|
55 'pyams_zmq/src', |
|
56 'pyams_zodbbrowser/src', |
|
57 ]) |
|
58 ) |
|
59 |
|
60 # -- General configuration ------------------------------------------------ |
|
61 |
|
62 # If your documentation needs a minimal Sphinx version, state it here. |
|
63 # |
|
64 # needs_sphinx = '1.0' |
|
65 |
|
66 # Add any Sphinx extension module names here, as strings. They can be |
|
67 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
|
68 # ones. |
|
69 extensions = [ |
|
70 'sphinx.ext.autodoc', |
|
71 'sphinx.ext.todo', |
|
72 #'sphinx.ext.coverage', |
|
73 'sphinx.ext.viewcode', |
|
74 'repoze.sphinx.autointerface', |
|
75 ] |
|
76 |
|
77 autoclass_content = 'both' |
|
78 |
|
79 # Add any paths that contain templates here, relative to this directory. |
|
80 templates_path = ['_templates'] |
|
81 |
|
82 # The suffix(es) of source filenames. |
|
83 # You can specify multiple suffix as a list of string: |
|
84 # |
|
85 # source_suffix = ['.rst', '.md'] |
|
86 source_suffix = '.rst' |
|
87 |
|
88 # The master toctree document. |
|
89 master_doc = 'index' |
|
90 |
|
91 # General information about the project. |
|
92 project = 'PyAMS Documentation' |
|
93 copyright = '2018, Thierry Florac' |
|
94 author = 'Thierry Florac' |
|
95 |
|
96 # The version info for the project you're documenting, acts as replacement for |
|
97 # |version| and |release|, also used in various other places throughout the |
|
98 # built documents. |
|
99 # |
|
100 # The short X.Y version. |
|
101 version = '0.1' |
|
102 # The full version, including alpha/beta/rc tags. |
|
103 release = '0.1.0' |
|
104 |
|
105 # The language for content autogenerated by Sphinx. Refer to documentation |
|
106 # for a list of supported languages. |
|
107 # |
|
108 # This is also used if you do content translation via gettext catalogs. |
|
109 # Usually you set "language" from the command line for these cases. |
|
110 language = 'en' |
|
111 |
|
112 # List of patterns, relative to source directory, that match files and |
|
113 # directories to ignore when looking for source files. |
|
114 # This patterns also effect to html_static_path and html_extra_path |
|
115 exclude_patterns = [] |
|
116 |
|
117 # The name of the Pygments (syntax highlighting) style to use. |
|
118 pygments_style = 'default' |
|
119 |
|
120 # If true, `todo` and `todoList` produce output, else they produce nothing. |
|
121 todo_include_todos = False |
|
122 |
|
123 # -- Options for HTML output ---------------------------------------------- |
|
124 |
|
125 # The theme to use for HTML and HTML Help pages. See the documentation for |
|
126 # a list of builtin themes. |
|
127 # |
|
128 html_theme = "sphinx_rtd_theme" |
|
129 |
|
130 # Theme options are theme-specific and customize the look and feel of a theme |
|
131 # further. For a list of options available for each theme, see the |
|
132 # documentation. |
|
133 # |
|
134 # html_theme_options = {} |
|
135 |
|
136 # Add any paths that contain custom static files (such as style sheets) here, |
|
137 # relative to this directory. They are copied after the builtin static files, |
|
138 # so a file named "default.css" will overwrite the builtin "default.css". |
|
139 html_static_path = ['_static'] |
|
140 |
|
141 # Custom sidebar templates, must be a dictionary that maps document names |
|
142 # to template names. |
|
143 # |
|
144 # html_domain_indices = True |
|
145 |
|
146 |
|
147 # -- Options for HTMLHelp output ------------------------------------------ |
|
148 |
|
149 # Output file base name for HTML help builder. |
|
150 htmlhelp_basename = 'PyAMSDocumentation' |
|
151 |
|
152 |
|
153 # -- Options for LaTeX output --------------------------------------------- |
|
154 |
|
155 latex_elements = { |
|
156 # The paper size ('letterpaper' or 'a4paper'). |
|
157 # |
|
158 # 'papersize': 'letterpaper', |
|
159 |
|
160 # The font size ('10pt', '11pt' or '12pt'). |
|
161 # |
|
162 # 'pointsize': '10pt', |
|
163 |
|
164 # Additional stuff for the LaTeX preamble. |
|
165 # |
|
166 # 'preamble': '', |
|
167 |
|
168 # Latex figure (float) alignment |
|
169 # |
|
170 # 'figure_align': 'htbp', |
|
171 } |
|
172 |
|
173 # Grouping the document tree into LaTeX files. List of tuples |
|
174 # (source start file, target name, title, |
|
175 # author, documentclass [howto, manual, or own class]). |
|
176 latex_documents = [ |
|
177 (master_doc, 'PyAMSDocumentation.tex', 'PyAMS Documentation', |
|
178 'Thierry Florac', 'manual'), |
|
179 ] |
|
180 |
|
181 |
|
182 # -- Options for manual page output --------------------------------------- |
|
183 |
|
184 # One entry per manual page. List of tuples |
|
185 # (source start file, name, description, authors, manual section). |
|
186 man_pages = [ |
|
187 (master_doc, 'PyAMSDocumentation', 'PyAMS Documentation', |
|
188 [author], 1) |
|
189 ] |
|
190 |
|
191 |
|
192 # -- Options for Texinfo output ------------------------------------------- |
|
193 |
|
194 # Grouping the document tree into Texinfo files. List of tuples |
|
195 # (source start file, target name, title, author, |
|
196 # dir menu entry, description, category) |
|
197 texinfo_documents = [ |
|
198 (master_doc, 'PyAMSDocumentation', 'PyAMS Documentation', |
|
199 author, 'PyAMSDocumentation', 'PyAMS a CMS based on Pyramid and Zope', |
|
200 'Miscellaneous'), |
|
201 ] |
|
202 |
|
203 |
|
204 |
|
205 # -- Options for Epub output ---------------------------------------------- |
|
206 |
|
207 # Bibliographic Dublin Core info. |
|
208 epub_title = project |
|
209 epub_author = author |
|
210 epub_publisher = author |
|
211 epub_copyright = copyright |
|
212 |
|
213 # The unique identifier of the text. This can be a ISBN number |
|
214 # or the project homepage. |
|
215 # |
|
216 # epub_identifier = '' |
|
217 |
|
218 # A unique identification for the text. |
|
219 # |
|
220 # epub_uid = '' |
|
221 |
|
222 # A list of files that should not be packed into the epub file. |
|
223 epub_exclude_files = ['search.html'] |
|
224 |
|
225 |
|
226 try: |
|
227 from zope.schema.fieldproperty import FieldProperty |
|
228 except ImportError: |
|
229 raise |
|
230 else: |
|
231 def get_field_doc(self): |
|
232 field = self._FieldProperty__field |
|
233 if field.title and field.description: |
|
234 return '{0}: {1}'.format(field.title, field.description) |
|
235 elif field.title: |
|
236 return field.title |
|
237 else: |
|
238 return super(self.__class__, self).__doc__ |
|
239 FieldProperty.__doc__ = property(get_field_doc) |
|
240 |
|
241 |
|
242 def setup(app): |
|
243 |
|
244 app.add_stylesheet('css/custom.css') |
|
245 |