Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow render_docs.py tool to be run on any directory #44

Merged
merged 1 commit into from

2 participants

@mzdaniel

This changeset allow our render_docs.py tool (old generate_html.py renamed with a more intuitive name and relocated a better place) to be invoked in any directory. (Before, it required to be invoked on docs)

@paulproteus
Owner

This is great!

@paulproteus paulproteus merged commit 3fb1e53 into from
@lrozanski lrozanski referenced this pull request from a commit in SocialCoding4Good/oh-mainline
Lech Rozanski SC4G #44: Add possibility to select which volunteer properties should…
… be visible on search result cards
be027aa
@lrozanski lrozanski referenced this pull request from a commit in SocialCoding4Good/oh-mainline
Lech Rozanski SC4G #44: Fixed field display; restricted editing of field labels to …
…admins only
8c25286
@lrozanski lrozanski referenced this pull request from a commit in SocialCoding4Good/oh-mainline
Lech Rozanski SC4G #44: Allowed project partners to change fields displayed on both…
… cards and list
6e1b88e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 25, 2012
  1. Allow render_docs.py tool to be run on any directory

    Daniel Mizyrycki authored
This page is out of date. Refresh to see the latest.
Showing with 28 additions and 19 deletions.
  1. +2 −1  docs/conf.py
  2. +0 −18 docs/generate_html.py
  3. +26 −0 tools/render_docs.py
View
3  docs/conf.py
@@ -3,7 +3,8 @@
import sys, os
# Import OpenHatch version
-sys.path.insert(0,'..')
+project_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),'..')
+sys.path.insert(0,project_path)
from setup import __version__
# The suffix of source filenames.
View
18 docs/generate_html.py
@@ -1,18 +0,0 @@
-"""Generate html documentation"""
-
-__requires__ = 'Sphinx>=1.1.2'
-
-import sys,os,re,conf
-from pkg_resources import load_entry_point
-
-
-def main(argv=None):
- if argv:
- sys.argv = argv
- # Generate documentation
- return load_entry_point(__requires__, 'console_scripts',
- 'sphinx-build')()
-
-if __name__ == "__main__":
- sys.exit(main(['generate_html.py','-b','html','-d','_temp','.','html']))
-
View
26 tools/render_docs.py
@@ -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']))
+
Something went wrong with that request. Please try again.