Pull requests

#75 Merged
Repository
benoitbryon benoitbryon
Branch
apidoc-symlinks
Repository
birkenfeld birkenfeld
Branch
default

Add --followlinks (or -l) option to sphinx-apidoc

Author
  1. Benoît Bryon avatarBenoît Bryon
Reviewers
Description

``sphinx-apidoc`` discovers packages and modules via os.walk(). By default, os.walk() skips symbolic links. So does ``sphinx-apidoc``.

This pull request introduces a --followlinks (alias -l) option to make sphinx-apidoc follow symbolic links.

By default, the former behaviour of sphinx-apidoc is preserved. I mean, symbolic links are skipped by default, so that the command remains backward-compatible.

Here is an use case... I am using http://pypi.python.org/pypi/collective.recipe.omelette/ to ease navigation in sourcecode. In this "omelette", I install some projects using namespace packages. Let's call them "foo.bar" and "foo.baz". So I get "omelette/foo/bar/" and "omelette/foo/baz folders". I'd like to run sphinx-apidoc on foo/ folder to generate API documentation for both foo.bar and foo.baz with one command. Since omelette uses symbolic links, I need sphinx-apidoc to care about symbolic links too. Or I only get documentation for the (empty) "foo" package.

Comments (0)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.