]> SALOME platform Git repositories - modules/adao.git/blob - doc/fr/conf.py
Salome HOME
Documentation improvements and post analysis
[modules/adao.git] / doc / fr / conf.py
1 # -*- coding: utf-8 -*-
2 #
3 # Copyright (C) 2008-2021 EDF R&D
4 #
5 # This file is part of SALOME ADAO module
6 #
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License.
11 #
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 # Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 #
21 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #
23 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
24
25 import sys, os, time, sphinx, logging
26
27 # -- Module version information --------------------------------------------------
28
29 try:
30     sys.path.append(os.path.abspath("../../bin"))
31     import module_version
32     logging.debug('Using "module_version" that was found from "bin"...')
33 except:
34     pass
35 try:
36     sys.path.append(os.path.abspath("../../adao/adao/daCore"))
37     import version as module_version
38     logging.debug('Using "module_version" that was found from "daCore"...')
39 except:
40     pass
41 if "module_version" not in locals():
42     module_version = lambda : None
43     module_version.name    = "ADAO"
44     module_version.year    = "%s"%(time.localtime()[0],)
45     module_version.version = ""
46     logging.warning('Using fallback "module_version" because none was found')
47
48 # -- Project information -------------------------------------------------------
49
50 project   = u'%s'%module_version.name
51 author    = u'Jean-Philippe ARGAUD'
52 copyright = u'2008-%s, EDF R&D, %s'%(module_version.year,author)
53 version   = '%s'%module_version.version
54 release   = '%s'%module_version.version
55 doctitle  = u"Documentation %s"%module_version.name
56 docfull   = u"Assimilation de Données et Aide à l'Optimisation"
57
58 # -- General configuration -----------------------------------------------------
59
60 from distutils.version import LooseVersion #, StrictVersion
61 __lv = LooseVersion(sphinx.__version__)
62 if __lv < LooseVersion("1.4.0"):
63     extensions = ['sphinx.ext.pngmath']
64 else:
65     extensions = ['sphinx.ext.imgmath']
66 try:
67     import sphinx_rtd_theme
68     extensions += ['sphinx_rtd_theme']
69     use_rtd_theme = True
70     logging.debug('Using "sphinx_rtd_theme" that was found')
71 except:
72     use_rtd_theme = False
73     logging.debug('Not using "sphinx_rtd_theme" because none was found')
74 #
75 source_suffix    = '.rst'
76 source_encoding  = 'utf-8'
77 master_doc       = 'index'
78 language         = 'fr'
79 exclude_patterns = [
80     'snippets',
81     'scripts',
82     'resources',
83     '_build',
84     'Thumbs.db',
85     '.DS_Store',
86     'Grenier',
87     ]
88 pygments_style   = None
89 templates_path   = ['_templates']
90 exclude_trees    = ['snippets',]
91
92 # -- Options for HTML output ---------------------------------------------------
93
94 if use_rtd_theme:
95     html_theme       = "sphinx_rtd_theme"
96 else:
97     html_theme       = 'default' if __lv < LooseVersion("1.3.0") else 'classic'
98 #
99 html_title           = doctitle
100 html_static_path     = ['_static']
101 html_show_sourcelink = False
102 html_search_language = language
103 html_favicon         = 'resources/ADAO_favicon.ico'
104
105 # -- Options for HTMLHelp output -----------------------------------------------
106
107 htmlhelp_basename    = module_version.name+'doc'
108
109 # -- Options for LaTeX output --------------------------------------------------
110
111 latex_elements = {
112     'papersize': 'a4paper',
113     'pointsize': '10pt',
114     'figure_align': 'htbp',
115 }
116 latex_documents = [
117   ('index', '%s.tex'%module_version.name, doctitle,
118    author, 'manual'),
119 ]
120
121 # -- Options for manual page output --------------------------------------------
122
123 man_pages = [
124     (master_doc, '%s'%module_version.name, doctitle,
125      [author], 1)
126 ]
127
128 # -- Options for Texinfo output ------------------------------------------------
129
130 texinfo_documents = [
131     (master_doc, '%s'%module_version.name, doctitle,
132      author, '%s'%module_version.name, docfull,
133      'Miscellaneous'),
134 ]
135
136 # -- Options for Epub output ---------------------------------------------------
137
138 epub_title         = doctitle
139 epub_author        = author
140 epub_publisher     = author
141 epub_copyright     = copyright
142 epub_exclude_files = ['search.html']
143
144 # -- Options for PDF output ----------------------------------------------------
145
146 pdf_documents = [(
147     'contents',
148     u'%s'%module_version.name,
149     u'%s'%module_version.name,
150     author,
151     dict(pdf_compressed = True),
152 ),]
153 pdf_stylesheets = ['sphinx','kerning','a4']
154 pdf_compressed = True
155 pdf_inline_footnotes = True
156
157 # -- Extension configuration ---------------------------------------------------