doc/tools/generate_modules.py
author Emile Anclin <emile.anclin@logilab.fr>
Tue, 05 May 2009 17:18:49 +0200
changeset 1693 49075f57cf2c
parent 299 4761e0ca406d
child 1808 aa09e20dd8c0
permissions -rw-r--r--
use logilab.common.sphinxutils
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)