forked from openhatch/oh-mainline
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow render_docs.py tool to be run on any directory
- Loading branch information
Daniel Mizyrycki
committed
Jun 25, 2012
1 parent
5ebaabe
commit 8a9a5df
Showing
3 changed files
with
28 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,26 @@ | |||
"""Generate html documentation""" | |||
|
|||
__requires__ = 'Sphinx>=1.1.2' | |||
|
|||
import sys,os,re | |||
from pkg_resources import load_entry_point | |||
|
|||
# Allow this script to find its doc config resource | |||
docs_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),'../docs') | |||
sys.path.insert(0,docs_path) | |||
|
|||
import conf | |||
|
|||
def main(argv=None): | |||
if argv: | |||
sys.argv = argv | |||
# Generate documentation | |||
return load_entry_point(__requires__, 'console_scripts', | |||
'sphinx-build')() | |||
|
|||
if __name__ == "__main__": | |||
|
|||
# generate rendered html on the docs/html directory. | |||
os.chdir(docs_path) | |||
sys.exit(main(['generate_docs.py','-b','html','-d','_temp','.','html'])) | |||
|