doc/tools/generate_modules.py
author sylvain.thenault@logilab.fr
Thu, 14 May 2009 12:48:11 +0200
changeset 1808 aa09e20dd8c0
parent 1693 49075f57cf2c
parent 1802 d628defebc17
child 1977 606923dff11b
permissions -rw-r--r--
backport tls-sprint
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1693
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
     1
"""generate list of modules for sphinx doc"""
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
     2
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
     3
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
     4
1693
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
     5
EXCLUDE_DIRS = ('test', 'tests', 'examples', 'data', 'doc', '.hg', 'migration')
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
     6
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
     7
1693
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
     8
    from logilab.common.sphinxutils import generate_modules_file
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
     9
1693
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
    10
    gen = generate_modules_file(sys.argv[1:])
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
    11
    gen.set_docdir("cubicweb/doc/book/en")
49075f57cf2c use logilab.common.sphinxutils
Emile Anclin <emile.anclin@logilab.fr>
parents: 299
diff changeset
    12
    gen.make(['cubicweb', '/indexer', '/logilab', '/rql', '/yams'], EXCLUDE_DIRS)