doc/tools/generate_modules.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 08 Oct 2010 07:43:38 +0200
branchstable
changeset 6410 2e7a7b0829ed
parent 5424 8ecbcbff9777
child 8930 6a02be304486
permissions -rw-r--r--
[test] fix tests broken by transaction behaviour on Unauthorized/ValidationError (no rollback but connection marked as non-commitable)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5421
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
     1
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
     2
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
     3
#
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
     4
# This file is part of CubicWeb.
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
     5
#
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
     6
# CubicWeb is free software: you can redistribute it and/or modify it under the
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
     7
# terms of the GNU Lesser General Public License as published by the Free
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
     8
# Software Foundation, either version 2.1 of the License, or (at your option)
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
     9
# any later version.
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
    10
#
5424
8ecbcbff9777 replace logilab-common by CubicWeb in disclaimer
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5421
diff changeset
    11
# CubicWeb is distributed in the hope that it will be useful, but WITHOUT
5421
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
    13
# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
    14
# details.
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
    15
#
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
    16
# You should have received a copy of the GNU Lesser General Public License along
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4831
diff changeset
    17
# with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
1977
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1808
diff changeset
    18
"""generate list of modules for sphinx doc
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1808
diff changeset
    19
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1808
diff changeset
    20
"""
1693
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
    21
299
4761e0ca406d [doc] Adds scripts to auto-generate modules list to index and add to the documentation.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    22
import sys
4761e0ca406d [doc] Adds scripts to auto-generate modules list to index and add to the documentation.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    23
2612
c3059d308dc2 [doc] update generate_modules to match new sphinxutils API
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1977
diff changeset
    24
EXCLUDE_DIRS = ('test', 'tests', 'examples', 'data', 'doc', 'dist',
c3059d308dc2 [doc] update generate_modules to match new sphinxutils API
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1977
diff changeset
    25
                '.hg', 'migration')
1693
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
    26
if __name__ == '__main__':
299
4761e0ca406d [doc] Adds scripts to auto-generate modules list to index and add to the documentation.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    27
2612
c3059d308dc2 [doc] update generate_modules to match new sphinxutils API
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1977
diff changeset
    28
    from logilab.common.sphinxutils import ModuleGenerator
c3059d308dc2 [doc] update generate_modules to match new sphinxutils API
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1977
diff changeset
    29
    cw_gen = ModuleGenerator('cubicweb', '../..')
c3059d308dc2 [doc] update generate_modules to match new sphinxutils API
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1977
diff changeset
    30
    cw_gen.generate("../book/en/annexes/api_cubicweb.rst",
c3059d308dc2 [doc] update generate_modules to match new sphinxutils API
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1977
diff changeset
    31
                    EXCLUDE_DIRS + ('cwdesklets', 'misc', 'skel', 'skeleton'))
4831
c5aec27c1bf7 [repo] use logilab.db instead of lgc.adbh/lgc.db/lgc.sqlgen/indexer, test new date extranction functions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4212
diff changeset
    32
    for modname in ('logilab', 'rql', 'yams'):
2612
c3059d308dc2 [doc] update generate_modules to match new sphinxutils API
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1977
diff changeset
    33
        cw_gen = ModuleGenerator(modname, '../../../' + modname)
c3059d308dc2 [doc] update generate_modules to match new sphinxutils API
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1977
diff changeset
    34
        cw_gen.generate("../book/en/annexes/api_%s.rst" % modname,
c3059d308dc2 [doc] update generate_modules to match new sphinxutils API
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1977
diff changeset
    35
                        EXCLUDE_DIRS + ('tools',))