[doc] update generate_modules to match new sphinxutils API
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 31 Jul 2009 19:18:33 +0200
changeset 2612 c3059d308dc2
parent 2586 879912fe94e1
child 2613 5e19c2bb370e
[doc] update generate_modules to match new sphinxutils API
doc/tools/generate_modules.py
--- a/doc/tools/generate_modules.py	Fri Jul 31 10:47:15 2009 +0200
+++ b/doc/tools/generate_modules.py	Fri Jul 31 19:18:33 2009 +0200
@@ -8,11 +8,15 @@
 
 import sys
 
-EXCLUDE_DIRS = ('test', 'tests', 'examples', 'data', 'doc', '.hg', 'migration')
+EXCLUDE_DIRS = ('test', 'tests', 'examples', 'data', 'doc', 'dist',
+                '.hg', 'migration')
 if __name__ == '__main__':
 
-    from logilab.common.sphinxutils import generate_modules_file
-
-    gen = generate_modules_file(sys.argv[1:])
-    gen.set_docdir("cubicweb/doc/book/en")
-    gen.make(['cubicweb', '/indexer', '/logilab', '/rql', '/yams'], EXCLUDE_DIRS)
+    from logilab.common.sphinxutils import ModuleGenerator
+    cw_gen = ModuleGenerator('cubicweb', '../..')
+    cw_gen.generate("../book/en/annexes/api_cubicweb.rst",
+                    EXCLUDE_DIRS + ('cwdesklets', 'misc', 'skel', 'skeleton'))
+    for modname in ('indexer', 'logilab', 'rql', 'yams'):
+        cw_gen = ModuleGenerator(modname, '../../../' + modname)
+        cw_gen.generate("../book/en/annexes/api_%s.rst" % modname,
+                        EXCLUDE_DIRS + ('tools',))