diff options
author | Georg Brandl <georg@python.org> | 2012-10-28 17:56:12 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2012-10-28 17:56:12 +0100 |
commit | 5d7b75fbb0d8712cf3449c1a699c64f5ca6e749d (patch) | |
tree | 84e70ad3abf887b8835bce0d9210977f1fdcc69f /sphinx/apidoc.py | |
parent | f514af7bdaad6158a6cf4303e5731ab5f7d67a70 (diff) | |
parent | c127ac19bde9cf8b8cb2b7bea4fd83094f3e4e54 (diff) | |
download | sphinx-git-5d7b75fbb0d8712cf3449c1a699c64f5ca6e749d.tar.gz |
Merged in benoitbryon/sphinx/apidoc-symlinks (pull request #75)
Diffstat (limited to 'sphinx/apidoc.py')
-rw-r--r-- | sphinx/apidoc.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py index ec1a8a33f..0f937108d 100644 --- a/sphinx/apidoc.py +++ b/sphinx/apidoc.py @@ -157,7 +157,8 @@ def recurse_tree(rootpath, excludes, opts): root_package = None toplevels = [] - for root, subs, files in os.walk(rootpath): + followlinks = getattr(opts, 'followlinks', False) + for root, subs, files in os.walk(rootpath, followlinks=followlinks): if is_excluded(root, excludes): del subs[:] continue @@ -246,6 +247,10 @@ Note: By default this script will not overwrite already created files.""") '(default: 4)', type='int', default=4) parser.add_option('-f', '--force', action='store_true', dest='force', help='Overwrite all files') + parser.add_option('-l', '--follow-links', action='store_true', + dest='followlinks', default=False, + help='Follow symbolic links. Powerful when combined ' \ + '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('-T', '--no-toc', action='store_true', dest='notoc', |