1. Georg Brandl
  2. sphinx


Georg Brandl  committed 1af69dc

Changelog entry and cleanup for PR#131.

  • Participants
  • Parent commits 471c8e3
  • Branches default

Comments (0)

Files changed (2)


View file
   include members imported from different modules.
 * New locales: Macedonian, Sinhala, Indonesian.
 * Theme package collection by using setuptools plugin mechanism.
+* PR#161: ``apidoc`` can now write each module to a standalone page instead of
+  combining all modules in a package on one page.
 Incompatible changes

File sphinx/apidoc.py

View file
             heading = ':mod:`%s` Module' % py_file
         # option to have each module go on its own page
-        if (opts.separatepages):
-            if (is_package):
+        if opts.separatepages:
+            if is_package:
                 # we handle packages SLIGHTLY differently in this case; no need
                 # for double nested heading for package that apidoc usually does
                 # since all other modules are going to be on separate pages
                 # with separatepages option, instead of embedding all module
                 # file contents on the one package page, each module will have
                 # its own page.
-                outfilepath = py_path + '.singlepage'
+                outfilepath = makename(master_package, py_path)
                 # text for this page just links to standalone page
                 text += '.. toctree::\n\n'
                 text += '    %s\n\n' % outfilepath
                 # heading.
                 filetext = format_heading(1, heading)
                 filetext += format_directive(is_package and subroot or py_path,
-                                         master_package)
+                                             master_package)
                 # write out standalone page file
                 write_file(outfilepath, filetext, opts)
                       'with collective.recipe.omelette.')
     parser.add_option('-n', '--dry-run', action='store_true', dest='dryrun',
                       help='Run the script without creating files')
+    parser.add_option('-E', '--separate', action='store_true',
+                      dest='separatepages',
+                      help='Put documentation for each module on its own page')
     parser.add_option('-T', '--no-toc', action='store_true', dest='notoc',
                       help='Don\'t create a table of contents file')
     parser.add_option('-s', '--suffix', action='store', dest='suffix',
     parser.add_option('-R', '--doc-release', action='store', dest='release',
                       help='Project release, used when --full is given, '
                       'defaults to --doc-version')
-    parser.add_option('-E', '--separate', action='store_true', dest='separatepages',
-                      help='Put each module file in its own page, ')
     (opts, args) = parser.parse_args(argv[1:])